我需要在Tomcat中使用URL作为CASE-INSENSITIVE.我的意思是当我在浏览器的地址栏中写例如'http://localhost/index.htm'不等于'http://localhost/INDEX.htm'然后我得到错误因为这个页面(INDEX.htm)那里不是.我如何为不区分大小写的URL配置Tomcat6?谢谢
我怎样才能访问main是否check在Sample类是真还是假?
我应该在Main类写什么?
package annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface annotation {
public String name() default "Jimmy";
public boolean check() default false;
}
Run Code Online (Sandbox Code Playgroud)
package annotation;
@annotation(name = "Jack", check = false)
public class Sample {
public String str = "Hi";
public void printHi(String str) {
System.out.println(str);
}
}
Run Code Online (Sandbox Code Playgroud)
package annotation;
public class Main {
public static void main(String[] args) {
}
}
Run Code Online (Sandbox Code Playgroud)