File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Unable to compile jsp's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Unable to compile jsp Watch "Unable to compile jsp New topic
Author

Unable to compile jsp's

Chandra S Marappa
Greenhorn

Joined: Apr 26, 2005
Posts: 19
hi everybody,

This is the error i am getting in jboss while i try to run a jsp file named AddConstraint.jsp. can some one help me what to do.
i am using jboss3.2.5.

try.ear
|
- try.war
|
- Addconstraint.jsp


D:\jboss-3.2.5\server\default\work\jboss.web\localhost\try\org\apache\jsp\AddConstraint_jsp.java:173:
handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to java.lang.Throwable)
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
^
1 error

15:58:43,218 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for ser
vlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
D:\jboss-3.2.5\server\default\work\jboss.web\localhost\try\org\apache\jsp\AddCon
straint_jsp.java:173: handlePageException(java.lang.Exception) in javax.servlet.
jsp.PageContext cannot be applied to (java.lang.Throwable)
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t
);
^
1 error



at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErro
rHandler.java:84)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher
.java:332)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext
.java:511)


Regds<br />---------------<br />Chandru
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Can you post your JSP code?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Chandra S Marappa
Greenhorn

Joined: Apr 26, 2005
Posts: 19
The following is the error i am getting in the browser.

Server Error
org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: D:\jboss-3.2.5\server\default\work\jboss.web\localhost\try\org\apache\jsp\index_jsp.java:116: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable) if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); ^ 1 error Unable to compile class for JSP Generated servlet error: D:\jboss-3.2.5\server\default\work\jboss.web\localhost\try\org\apache\jsp\index_jsp.java:116: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable) if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); ^ 1 error


The source of the jsp file nothing except html tags. infact the jsp file is a simple html file saved as jsp containing one line at the top as follows.

<%@ page language="java" import="java.lang.*;" %>


This is my first application in jboss, help me out in configuring the application, what are the settings that has to be done.


Thank you,

Chandru
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

And, have you tried removing that tag?
If it blows up with absolutly no JSP in it, it's probably safe to assume that JBoss is misconfigured.
Chandra S Marappa
Greenhorn

Joined: Apr 26, 2005
Posts: 19
i have not tried it, will try it today. if that does not work, what has to be done, ie. what is the configuration that has to be done in jboss so that it works correctly.

waiting for the same.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Chandra Shekar marappa:
i have not tried it, will try it today. if that does not work, what has to be done, ie. what is the configuration that has to be done in jboss so that it works correctly.


Well, I guess that would depend on whether or not JBoss was misconfigured and what configuration, exactly, is amiss.

My point is that, if a JSP with nothing but HTML code can't be compiled, then there is something wrong with the installation of the server.
It could also be that the application wasn't deployed correctly.

Nobody on a forum is going to be able to debug or fix this for you.
Look at your logs and see if there are any errors being generated.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If it does turn out to be a misconfiguration, you might want to take the question to the JBoss forum on this site. The people who frequent this list are using all kinds of different servers. Many (myself included) have never touched JBoss.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

Moved to the JBoss forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
johns jj
Greenhorn

Joined: May 18, 2005
Posts: 1
Am getting the same error for a simple jsp containing only html tags. Tried copying different versions of servlet.jar, but still no luck. Any suggestions would be appreciated.

thanks,
jj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to compile jsp's