jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes re:tomcat error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "re:tomcat error" Watch "re:tomcat error" New topic
Author

re:tomcat error

Ahshan Md
Greenhorn

Joined: Sep 07, 2010
Posts: 4
hello to everyone,
I am running apache on ubuntu 9.04
please help me on this error as i would be very much grateful too you
I have written a program in jsp for login page which has two fiiles

html file




jsp file






when the html file is being posted to jsp
I receive an error with thw following details....please help me on tis error

HTTP Status 500 -

type Exception report

message

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:604)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/project/org/apache/jsp/Login_jsp.java (Permission denied)
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.setupContextWriter(Compiler.java:291)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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

[Devaka: Edited to add code tags]
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
Welcome to Java Ranch Ahshan.

You may get this sort of error when you have not placed the jsp file in the proper location. Could you tell us the folder structure in which you have placed your jsp file.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3019
    
  35

"ahshan md", please check your private messages regarding an important administrative matter.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60791
    
  65

Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ahshan Md
Greenhorn

Joined: Sep 07, 2010
Posts: 4
Naresh Shanmugam wrote:Welcome to Java Ranch Ahshan.

You may get this sort of error when you have not placed the jsp file in the proper location. Could you tell us the folder structure in which you have placed your jsp file.




The folder structure is:

/usr/local/tomcat/webapps/project/login.jsp

where project is my folder name
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Naresh Shanmugam wrote:You may get this sort of error when you have not placed the jsp file in the proper location.

No. The JSP file has been found, and it has been translated to Java source code. The problem is that the Java source code now can't be written to a file (as the error message says).

Check that whatever user account is used to run Tomcat has write permissions to all directories in the /usr/local/tomcat/work/Catalina/localhost/project/ path.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60791
    
  65

"ahshan md", please check your private messages for an important administrative matter. Thanks.
Ahshan Md
Greenhorn

Joined: Sep 07, 2010
Posts: 4
Bear Bibeault wrote:"ahshan md", please check your private messages for an important administrative matter. Thanks.




how do i change to write permission of the /usr/local/tomcat/work/Catalina/project

as it seems that the permission is allocated to root but not the user mentioned below .

The user name is : ahshan
operating system:Ubuntu 9.04

drwxr-xr-x 3 root root 4096 2010-09-09 00:57 project


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60791
    
  65

"ahshan md", please check your private messages for an important administrative matter prior to your next post. Failure to do so may result in the removal of your account.
 
jQuery in Action, 2nd edition
 
subject: re:tomcat error
 
Similar Threads
The absolute uri: http://java.sun.com/jstl/core cannot be resolve
Unable to load tag handler class "com.opensymphony.webwork.views.jsp.PropertyTag
Tomcat + NetBeans deploying, need help.
Suddenly stopped working
Compile .java file on JSP