aspose file tools*
The moose likes Tomcat and the fly likes Why does Tomcat 5.0 include struts.jar? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Why does Tomcat 5.0 include struts.jar?" Watch "Why does Tomcat 5.0 include struts.jar?" New topic
Author

Why does Tomcat 5.0 include struts.jar?

Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 146
As I found out after spending 3-4 hours,the new Tomcat 5.0 contains struts.jar at TOMCAT_HOME\server\webapps\admin\WEB-INF\lib.
This jar was conflicting with my app's struts.jar and gave me severe headache.
Anyone knows why it was included with the server itself?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The admin app was written in struts.
The jar file should not be affecting your app if it's in the location you've specified. Unless it's in either common/lib or shared/lib, it's not accessible to your app.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 146
I have every reason to believe,conflict happens.
Here is what happened:
I have a jsp which uses <logic:messagesPresent> tag at two places.One of the tags was having message attribute as true(first) while the other(second) did not have anything specified.
For clarity reasons ,I commented everything inside the second tag.So it looked like :
<logic:messagesPresent>
</logic:messagesPresent>
It resulted in giving errors and jsp was not compiling.
As soon as I copied my app's struts.jar file in the Tomcat's admin location the error vanished!
Although your answer seems logical and mine illogical,that is what has happened and I am perplexed.
Any help will be greatly appreciated.
Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 146
Any pointers to this one?Am I missing something?Is my installation of Tomcat screwed up?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

A clean install might be a good idea at this point.
Did you explicitly state: crossContext="true" for any of your context declarations? Otherwise, I have no idea why a jar file in another app would affect your app.
 
Consider Paul's rocket mass heater.
 
subject: Why does Tomcat 5.0 include struts.jar?