<span style= "Font-family:simsun; Background-color:rgb (255, 255, 255); > Presumably everyone is using Eclipse </span><span id= "4_nwp" style= "Font-family:simsun;" Background-color:rgb (255, 255, 255); Width:auto; Height:auto; Float:none; " ><a target=_blank id= "4_nwl" href= "http://cpro.baidu.com/cpro/ui/uijs.php?app_id=0&c=news&cf=1001" &ch=0&di=128&fv=17&is_app=0&jk=43a66e5c3fb727ac&k=%b1%e0%b3%cc&k0=%b1%e0%b3%cc &kdi0=0&luki=4&n=10&p=baidu&q=v77y4_cpr&rb=0&rs=1&seller_id=1&sid= Ac27b73f5c6ea643&ssp2=1&stid=0&t=tpclicked3_hc&tu=u2102575&u=http%3a%2f%2fwww%2eylzx8%2ecn %2fyingyongfuwuqi%2fapache%2f999161%2ehtml&urlid=0 "target=" _blank "mpid=" 4 "style=" Color:rgb (1, 70, 108); Text-decoration:none; " ><span style= "Color:rgb (0, 0, 255); Width:auto; Height:auto; " > Programming </span></a></span><span style= "FONT-FAMILY:SIMSUN; Background-color:rgb (255, 255, 255); >, this problem is often encountered.</span>
The reason is that the JSP did not compile successfully, so the class could not be found.
Here's how the JSP and Servlet are compiled.
Jsp
For example login.jsp: Each JSP page is compiled into a Java class by the Web container, which is invoked by the Web container and claims that the HTML page feeds back to the user.
For example, LOGIN.JSP will be compiled into Login_jsp.java files in the%tomcat_home%/work/catalina/localhost/project name/org/apache/jsp/directory, and then compiled into Login_ Jsp.class files, also placed in this directory.
Jsp=java+html
Servlet=java+out.print (HTML)
The first time the Web server is requested, the following procedure is performed:
1, the client sends the request to the Web container
2, the Web container will JSP first translation into the servlet source
3. The Web container compiles the servlet source code into a. class file
4, the Web container execution. class file
5. The Web container returns the result to the client
Therefore, the first request response will be slow, and subsequent requests will omit steps 2nd and 3rd.
-----------------------------------------------------
Three steps to solve the problem:
1, carefully check the JSP related path settings, may be the path is not written correctly
2, carefully check the code in the JSP, especially the property delivery is the corresponding (for struts), because the JSP code error is also unable to compile
3, if you determine the code level is no problem, the rest is to start Tomcat, pay attention to clear the Tomcat/work directory.
The error log is as follows: