aspose file tools*
The moose likes JSP and the fly likes can not compile JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "can not compile JSP" Watch "can not compile JSP" New topic
Author

can not compile JSP

Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
I successfully deploy an application but failed to view the welcome JSP page. I got this error

****
org.apache.jasper.JasperException: Unable to compile class for JSP
...
Compile failed; see the compiler error output for details.
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:409)
******

I further checked the generated java code for that jsp, it looks like

**************
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {

....
******************

Env: I am using sun system application server. Questions

1) why it is using apache jasper compiler ?

2) what can be wrong ? The jsp is nothing but a greeting page.
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
2) what can be wrong ? The jsp is nothing but a greeting page.

Can we see that?
Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
Vishal Pandya wrote:
2) what can be wrong ? The jsp is nothing but a greeting page.

Can we see that?


<html>
<body> Hello World ! </body>
</html>
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Raj Ohadi wrote:
Compile failed; see the compiler error output for details.

And?
Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
it was found that if I pre-compile the jsp on server during deployment, then the problem disappear. But if I don't pre-compile, the problem persists. Any idea why ? I checked the app server spec, there is not such pre-requiste for deployment.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61222
    
  66

Where is the compiler failure output that Bauke requested? We can't do a thing to help you without it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
Bear Bibeault wrote:Where is the compiler failure output that Bauke requested? We can't do a thing to help you without it.


It just shows it can not compile the JSP whenever I run the application and involves any JSP. It deploys the application well though.

But if I pre-compile the JSP when I deploy the app, then I don't see any of such errors when I run the application.
 
wood burning stoves
 
subject: can not compile JSP