Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp-api.jar conflict  RSS feed

 
vasu chowdary
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have implemented my own custom tag and it is working fine when i add the jsp-api.jar file as an extenral jar from eclipse.If i copeid this one to web-inf/lib then it is giving error

org.apache.jasper.JasperException: Unable to read TLD "META-INF/tlds/struts-bean.tld" from JAR file "file:/C:/Eclipse-Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AppCaptureWeb/WEB-INF/lib/struts.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei


could you please tell me the reason
 
Devaka Cooray
Marshal
Posts: 5511
687
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vasu chowdary wrote:.If i copeid this one to web-inf/lib

It should be WEB-INF/lib (not web-inf/lib)
Was this the problem?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NEVER copy the servlet or JSP api jars to WEB-INF/lib. It will cause no end of problems.

Why would you do that?
 
vasu chowdary
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually this issue has been resolved.I just created a directory lib outside WEB-INF directory and i have placed jsp-api.jar in that and then added that jar to build path now every thing is working fine.

could any body tell me the reason?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has to do with the way the containers load classes with multiple class loaders. Bottom line: keep the servlet and JSP APIs out of the WEB-INF hierarchy.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!