JSP笔记

JSP链接区分大小写

如果在eclipse项目中改了文件名,要在tomcat对应目录下的Catalina中的对应目录下把之前的文件删除,会重新编译生成,否则会报:java.lang.NoClassDefFoundError: 这个错误。必须要删除,只是修改文件名或者在java文件中修改类名,没有作用。


<Context path="" docBase="D:eclipseWorkspaceMentalArithmeticWebContent" debug="0" privileged="true">
</Context>

If you spell the class name wrong or the class isn't on the classpath, the JSP processor will say it "resolves to a package" rather than that it doesn't exist. This was driving me crazy today as I kept not seeing a typo I'd made.

JSP页面中,随便写个导入类的语句,如<%@ page import="a.b.c"%>,就会报下面这个错
Only a type can be imported. a.b.c resolves to a package
无论a.b.c是否真的存在,这说明系统没有找到a.b.c这个类,那么问题就集中在“如何让系统找到自定义的类”。

微软真的很伟大

null是基本类型,java的几个基本类型如下:
Literal:
IntegerLiteral
FloatingPointLiteral
BooleanLiteral
CharacterLiteral
StringLiteral
NullLiteral
对于这些类型的比较,要用==,其它的用equals
.net中的字符串比较可以使用==,应该是微软做的语法糖。

原文地址:https://www.cnblogs.com/Sabre/p/7596381.html