This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.servlet.jsp.JspException in Application

 
Praneet Mirchandani
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
You need to check this


in the JSP which is throwing the error.

Regards,
Amit
 
Praneet Mirchandani
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Praneet Mirchandani
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Followed your suggestion. The warning disappeared. Thanks:-).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic