Today, I have a little bit of blood, suddenly think about the entire Struts application, so I bought "Mass Struts: Based on MVC-based Java Web Design and Development", seeing the second chapter, there is a very simple example, so I feel Take it up. Start Tomcat 5.0.19, enter the address bar
Http: // localhost: 8080 / helloApp /,
......
Appeared a page of compilation errors, very depressed. The error message is as follows:
org.apache.jasper.JasperException: Unable to compile class for JSPNo Java compiler was found to compile the generated source for the JSP.This can usually be solved by copying manually $ JAVA_HOME / lib / tools.jar from the JDKto the common / lib Directory of the Tomcat Server, FOLLOWED by a tomcat restart.if saleized an alternate java compiler, please check its installation and access pat ...
After starting to find the reason, after setting the environment variable, restart Tomcat, the result is still, painful ~ Google, really use, find a solution:
1. Make Sures Are Set Correctly: >>> Java_Home Points To "C: /J2SDK1.4.2" (Correct Folder if Changd >>> ClassPath Points TO% Java_Home% / LIB >>> PATH POINTS TO% JAVA_HOME% / bin 2. copy $ JAVA_HOME / lib / tools.jar to the common / lib directory of the Tomcat server 3. Update your registry to reflect the new JVM location: key: HKEY_LOCAL_MACHINE / SYSTEM / ControlSet001 / Services / Apache Tomcat / Parameters / JVM Library Value: c: /j2sdk1.4.2/jre/bin/server/jvm.dll