I'm doing something wrong with the beta J2EE. Whenever I deploy an
application, I have to use (for instance):
http://localhost//myapp
Note the double /.
If I just use a single / it can find the opening .jsp page, but that page
can't open any relative images. For instance,
http://localhost/myapp/images/blah.gif doesn't work, where
http://localhost//myapp/images/blah.gif does.
The problem traces back to jakarta, in
org.apache.tomcat.core.ServletContextFacade, in the: URL getResource(
String ) method. It reads:
public URL getResource(String path)
throws MalformedURLException {
URL url = null;
if (path == null) {
String msg = sm.getString("scfacade.getresource.npe");
throw new NullPointerException(msg);
} else if (! path.equals("") &&
! path.startsWith("/")) {
String msg = sm.getString("scfacade.getresource.iae", path);
throw new IllegalArgumentException(msg);
}
Note the !path.startsWith( "/" ).
Reading all the documentation didn't help me, I expect that this is something
I'm doing wrong - can anyone tell me what it is?
Thanks,
Paul
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".