Bugs item #611044, was opened at 2002-09-18 04:36
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=611044&group_id=22866
Category: JBossServer
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Michael Pichler (mpichler)
Assigned to: Nobody/Anonymous (nobody)
Summary: JBoss+Jetty: redirect bug on welcomefile
Initial Comment:
JSP sendRedirect into subdirectory broken from JSP welcome-file
for JBoss 3.0.2 with Jetty.
Take a webapplication (the attached hello.war) that defines a
welcome-file Hello.jsp and page Hello.jsp does a redirect to a
a relative URL:
<% response.sendRedirect ("subdir/target.html"); %>
This works with Jetty and Tomcat alone, and also with
JBoss 3.0.2 with Tomcat 4.0.4, i.e. the redirect is performed
relative to the actual location of Hello.jsp. (The difference
is that tomcat uses a client redirect for the welcome page whereas
jetty directly serves the welcome page under the original URL).
When using JBoss 3.0.2 with Jetty 1.4 and accessing just
the URL of the webapplication (http://hostname:8080/hello/),
the redirect is done relative to a wrong base URL
and the wepappliction part disappears from the forwarded URL.
When accessing the welcome-file explicitly, it works in any case.
See also http://www.jboss.org/forums/thread.jsp?forum=50&thread=20933
--- JBoss+Jetty ---
GET /hello/ HTTP/1.0
HTTP/1.1 302 Moved Temporarily
Server: Jetty/RELEASE_MAJOR_MINOR (Linux 2.4.18-64GB-SMP i386)
Servlet-Engine: Jetty/RELEASE_MAJOR_MINOR (Servlet 2.3; JSP 1.2; java 1.4.0)
Location: http://192.168.x.y:8080/subdir/target.html
^--- web context /hello/ lost
Server Info: <code>Jetty/RELEASE_MAJOR_MINOR</code>
<BR>Request URI: <code>/hello/Hello.jsp</code>
<BR>Full URL: <code>http://192.168.x.y:8080/hello/</code>
--- JBoss+Tomcat ---
GET /hello/ HTTP/1.0
HTTP/1.1 302 Moved Temporarily
Location: http://192.168.x.y:8080/hello/Hello.jsp
(redirect to the host defined as defaultHost in tomcat4-service.xml)
GET /hello/Hello.jsp HTTP/1.0
HTTP/1.1 302 Moved Temporarily
Location: http://192.168.x.y:8080/hello/subdir/target.html
^--- OK
(contents of Hello.jsp not served by tomcat)
----------------------------------------------------------------------
>Comment By: Scott M Stark (starksm)
Date: 2002-09-28 22:28
Message:
Logged In: YES
user_id=175228
This appears to be fixed in the Jetty version included for the
jboss-3.0.3 release:
system 112>wget http://localhost:8080/hello/
--22:24:55-- http://localhost:8080/hello/
=> `index.html'
Resolving localhost... done.
Connecting to localhost[127.0.0.1]:8080... connected.
HTTP request sent, awaiting response... 302 Moved
Temporarily
Location: http://localhost:8080/hello/subdir/target.html
[following]
--22:24:55-- http://localhost:8080/hello/subdir/target.html
=> `target.html'
Connecting to localhost[127.0.0.1]:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 153 [text/html]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=611044&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development