This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

javax.servlet.jsp.JspException in Application  RSS feed

 
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.

 
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:-)
 
Author and ninkuma
Marshal
Posts: 66809
168
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
Posts: 66809
168
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:-).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!