This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes javax.servlet.jsp.JspException in Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "javax.servlet.jsp.JspException in Application" Watch "javax.servlet.jsp.JspException in Application" New topic
Author

javax.servlet.jsp.JspException in Application

Praneet Mirchandani
Ranch Hand

Joined: Dec 16, 2009
Posts: 46

Hi,

I am trying to migrate my application from weblogic 9.2 to Tomcat 6.

Most of the pages work fine. However, there is one page that doesnt work properly. I am getting the below errors on the console. I have included servlet-api.jar in the lib folder of my application.

Any idea what's causing this. I searched the web, but couldnt figure out what's the issue. Please let me know if you need some more information.



Thanks,
Praneet
amit punekar
Ranch Hand

Joined: May 14, 2004
Posts: 511
Hello,
You need to check this


in the JSP which is throwing the error.

Regards,
Amit
Praneet Mirchandani
Ranch Hand

Joined: Dec 16, 2009
Posts: 46
Thanks. I got the issue. The below code was causing a problem when null values were returned:



So, I enclosed it within a c:choose block:



This resolved the issue:-)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60740
    
  65

Praneet Mirchandani wrote:I have included servlet-api.jar in the lib folder of my application.

That is the first thing to fix. Remove it. It does not belong there, and it will cause problems.

Tomcat supplies its own implementation.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Praneet Mirchandani
Ranch Hand

Joined: Dec 16, 2009
Posts: 46

Thanks for the info. I will keep that in mind. As of now the application seems to be working fine. It does give me the following line on the console though (when I start the server).

INFO: validateJarFile(C:\apache-tomcat-6.0.29\webapps\WMCPricingWeb\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class.

However, this doesnt seem to be causing an issue as of now, but if any issues come up, I will try removing the the servlet-api.jar file. Any idea what kind of issues it would cause?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60740
    
  65

You are confusing the class loaders no end as evidenced by the message. Remove it now and save headaches in the future.
Praneet Mirchandani
Ranch Hand

Joined: Dec 16, 2009
Posts: 46

Followed your suggestion. The warning disappeared. Thanks:-).
 
 
subject: javax.servlet.jsp.JspException in Application
 
Similar Threads
JBoss 5.1 throwing error for missing jsp files in /WEB-INF folder
javax.servlet.jsp.JspException: Cannot create rewrite URL: java.net.MalformedURLException:
Struts JSP exception
Struts 1.2 Cannot find bean org.apache.struts.taglib.html.BEAN
NullPointerException on Liferay