Tomcat cannot find packages to compile JSP
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Declan_Shanaghy
Posted On:   Monday, April 2, 2001 03:09 AM

I've set up tomcat to run inside VAJ. Everything seems to be ok except when it tries to compile the jsp's it seems it cant find some packages. The classpath is set up correctly. The strange thing is that it can find packages such as javax.servlet.http.* and org.apache.jasper.*; but hte ones listed below cannot be found, and they are in the same project?!?!?! Does anyone have any idea why this might be happening, Ive included the output it gives me, it may or may not help. Error: 500 Location: /personal/jsp/content/skating.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSPD:IBMVJava2ideproject_re   More>>

I've set up tomcat to run inside VAJ.
Everything seems to be ok except when it tries to compile the jsp's it seems it cant find some packages.
The classpath is set up correctly.
The strange thing is that it can find packages such as javax.servlet.http.*
and org.apache.jasper.*;
but hte ones listed below cannot be found, and they are in the same project?!?!?!

Does anyone have any idea why this might be happening, Ive included the output it gives me, it may or may not help.





Error: 500
Location: /personal/jsp/content/skating.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for JSPD:IBMVJava2ideproject_resourcesTomcatworklocalhost_8080\_0002fpersonal_0002fjsp_0002fcontent_0002fskating_0002ejspskating_jsp_0.java:5: Package javax.servlet.jsp not found in import.
import javax.servlet.jsp.*;
^
D:IBMVJava2ideproject_resourcesTomcatworklocalhost_8080\_0002fpersonal_0002fjsp_0002fcontent_0002fskating_0002ejspskating_jsp_0.java:6: Package javax.servlet.jsp.tagext not found in import.
import javax.servlet.jsp.tagext.*;
^
D:IBMVJava2ideproject_resourcesTomcatworklocalhost_8080\_0002fpersonal_0002fjsp_0002fcontent_0002fskating_0002ejspskating_jsp_0.java:12: Package org.apache.jasper.runtime not found in import.
import org.apache.jasper.runtime.*;
^
D:IBMVJava2ideproject_resourcesTomcatworklocalhost_8080\_0002fpersonal_0002fjsp_0002fcontent_0002fskating_0002ejspskating_jsp_0.java:16: Package com.shanaghy.webspeed.core not found in import.
import com.shanaghy.webspeed.core.*;
^
D:IBMVJava2ideproject_resourcesTomcatworklocalhost_8080\_0002fpersonal_0002fjsp_0002fcontent_0002fskating_0002ejspskating_jsp_0.java:17: Package com.shanaghy.personalweb.entity not found in import.
import com.shanaghy.personalweb.entity.*;
^
D:IBMVJava2ideproject_resourcesTomcatworklocalhost_8080\_0002fpersonal_0002fjsp_0002fcontent_0002fskating_0002ejspskating_jsp_0.java:18: Package com.shanaghy.personalweb.handlers not found in import.
import com.shanaghy.personalweb.handlers.*;
^
D:IBMVJava2ideproject_resourcesTomcatworklocalhost_8080\_0002fpersonal_0002fjsp_0002fcontent_0002fskating_0002ejspskating_jsp_0.java:19: Package com.shanaghy.personalweb.pagebean not found in import.
import com.shanaghy.personalweb.pagebean.*;
^
7 errors

java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.ServletException(java.lang.String)
org.apache.jasper.JasperException(java.lang.String)
boolean org.apache.jasper.compiler.Compiler.compile()
boolean org.apache.jasper.runtime.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)

   <<Less

Re: Tomcat cannot find packages to compile JSP

Posted By:   AlessandroA_Garbagnati  
Posted On:   Monday, April 2, 2001 08:40 AM

Declan,

It looks like that your classpath is missing of the /lib/tools.jar that is required by the compiler.

Check your classpath. If you have trouble in adding it, you can copy that file in the /lib directory (If you're on a unix system, you can just use a symbolic link).
About | Sitemap | Contact