ServletContext.getResource() against a Struts Action

  • Thread starter Travis Melhiser
  • Start date
T

Travis Melhiser

A vendors application is using ServletContext.getResource() to verify
that a URI is servicable by the webapp.

ie:

if (theServletContext.getResource("/TheApp/aStrutsAction.do") == null)
{
writeSomeErrorMessagesToTheLog();
} else {
workWithTheURI();
}

The catch is that this works under WebLogic 8.1sp2.

When this is run under Tomcat 5.0.28, the Struts action is not
returned. It appears that the getResource() call is looking for
physical files rather than including servlet mappings.

Is there a way to configure Tomcat so that it behaves like WebLogic?
(looking both at files deployed in the war, and at servlet mappings)

Thank you,

Travis Melhiser
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top