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

JasperException: Unable to load JSP

Griff George
Greenhorn

Joined: Jul 21, 2011
Posts: 1
Hello friends,

First, a quick word about my environment. I've got Liferay6 running on Tomcat6. I've installed them from the Liferay+Tomcat bundle from Liferay's website. All of this is running on Ubuntu 10.10.

I am trying to develop a sample portlet for Liferay. I'm new to jsp, Liferay, and web programming altogether, so really all I am trying to accomplish is to get thing to compute 2+3 and print 5.

I have created a portlet (I run Liferay's create.sh which creates a directory structure with all the files necessary), and that portlet works. I can navigate to the browser and see it work. Here is the working view.jsp file:



After verifying that this loads in the browser, I simply added one line to the end of the file:


This causes a very big error. After some investigation, I found that including any jsp at all on the page caused this error. In fact, including empty <% %> tags on the page produces same error, even if there is no java code in them. When I remove the empty tags, the portlet works again.

Here is what the tomcat/logs/catalina.out looks like. First, I deploy the portlet, and everything appears hunky dory:



No fun at all.

Some internet searching tells me that the JasperException: Unable to load class for JSP is caused by syntax errors in the jsp file but, as I mentioned before, even one pair of empty jsp tags causes this error. The file at /java/liferay/tomcat-6.0.26/work/Catalina/localhost/iCOE-test-v2-portlet/org/apache/jsp/view_jsp.java appears in all respects to be syntactically correct.

I am really at a loss here, and any help with this is appreciated. As I said, while I am a decent java programmer, my experience with programming for the web is practically zero, so it is very possible that I have forgotten a small detail.

Thanks in advance,
Griff


www.griffgeorge.com
E. Tse
Greenhorn

Joined: Oct 13, 2007
Posts: 19
when you try to type <%= 2+3 %> at the end of the jsp will cause error, can you do these experiment ?

1. type some comments in line 13 after details and see if there's error
2. type <%="Testing" %> in line 20 and see if there's error

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JasperException: Unable to load JSP