You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Nekkalapudi, Viplava" <VN...@erac.com> on 2002/08/02 21:47:29 UTC
URL Rewriting support in Struts and
<Craig>
All containers that implement Servlet 2.2 or 2.3 are required to support
"URL rewriting", which encodes the session identifier in the url as a path
parameter (not a query parameter). However, it is up to your application to
make sure you call response.encodeURL() as you are creating such links. The
good news for Struts users is that tags like <html:form> and <html:link> do
this for you, so that if you create all your links with the tags, you don't
have to worry about URL rewriting yourself.
</Craig>
This means if I disable Cookies in my browser (either by disabling from
browser settings or through weblogic.xml with <session-descriptor>,
our web application developed with Struts 1.0.2 and Weblogic Server 6.1
should work fine.
But it is not working if we disable cookies.
Please clarify.
--- Vip
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: URL Rewriting support in Struts and
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 2 Aug 2002, Nekkalapudi, Viplava wrote:
> Date: Fri, 2 Aug 2002 14:47:29 -0500
> From: "Nekkalapudi, Viplava" <VN...@erac.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: URL Rewriting support in Struts <html:form> and <html:link>
>
> <Craig>
> All containers that implement Servlet 2.2 or 2.3 are required to support
> "URL rewriting", which encodes the session identifier in the url as a path
> parameter (not a query parameter). However, it is up to your application to
> make sure you call response.encodeURL() as you are creating such links. The
> good news for Struts users is that tags like <html:form> and <html:link> do
> this for you, so that if you create all your links with the tags, you don't
> have to worry about URL rewriting yourself.
> </Craig>
>
> This means if I disable Cookies in my browser (either by disabling from
> browser settings or through weblogic.xml with <session-descriptor>,
> our web application developed with Struts 1.0.2 and Weblogic Server 6.1
> should work fine.
> But it is not working if we disable cookies.
>
If you always construct your hyperlinks using <html:link>, then this
should indeed work. It sounds like there might be a problem with URL
rewriting in WebLogic.
A quick way to check this would be to put something like this in your
page:
<a href='<%= response.encodeURL("/foo/bar.jsp") %>'>Test Link</a>
and examine the HTML output that gets created. You should see a URL that
has a ";JSESSIONID=" path parameter if cookies are turned off. Because
this bypasses the Struts tag, it can directly prove whether there is a
problem with your container or not.
> Please clarify.
> --- Vip
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>