Tomcat 5 not finding JSP files on Mac OS X

N

nino9stars

Hello everyone,

I posted to two groups. Not sure if that is wrong or not?

Anyways, I have successfully installed Tomcat 5 on my Mac in order to
run JSP's. The examples all work and everything seems to be fine. I
then added a new context called apps. I was able to get that to work as
well by putting in a simple index.html page. Next, I tried to run the
HelloWorld.jsp and that worked as well. Finally, I created a very
simple test.jsp file (it's just an html file with the word TEST in it).
This is the problem.

When I try to call http://localhost:8080/apps/test.jsp I get this
error:

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.io.FileNotFoundException:
/usr/local/jakarta-tomcat-5.0.30/work/Catalina/localhost/apps/org/apache/jsp/test_jsp.java
(No such file or directory)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(FileOutputStream.java:179)
java.io.FileOutputStream.<init>(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.30 logs.


I move the exact same file to webapps/ROOT and it works fine... I don't
get it? I think I have everything set up properly in the context
folder. apps has:
index.html
test.jsp
WEB-INF/classes
WEB-INF/web.xml

I guess the one thing that concerns me (and is completely baffling)
from the error message is the line:
/usr/local/jakarta-tomcat-5.0.30/work/Catalina/localhost/apps/org/apache/jsp/test_jsp.java
(No such file or directory)
What does it mean?

I have been using Tomcat for a while, but never with JSPs, only
servlets.

Thanks for any help,
Nino Skilj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top