Hi, 

I have a web application with context root /ServletTest.
The servlet-mapping for one servlet in the application is 

<servlet-mapping>
    <servlet-name>HelloWorldServlet</servlet-name>
    <url-pattern>/HelloWorldServlet/*</url-pattern>
 </servlet-mapping>

In my web application there is a file called file.html in the web root. 
 
Now, this servlet forward every request. It forwards it to "file.html" using a 
relative path as follows: 

  RequestDispatcher dispatcher = request.getRequestDispatcher("file.html");
  dispatcher.forward(request, response);

Now when I open the URL   http://:/ServletTest/HelloWorldServlet/abc.html, 
the browser shows the file file.html. In other words, it has forwarded to 
http://:/ServletTest/file.html.

Isn't this behavior wrong? As I understand it, the request should be relative to the 
servlet path so it should have tried to forward to 
http://:/ServletTest/HelloWorldServlet/file.html instead. 

Is the behavior of JBoss correct (JBoss v. 3.2.3)? 

Cheers
  Erik

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839599#3839599

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839599


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to