You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by an...@claire.co.jp on 2001/12/03 01:20:11 UTC
Want to use but do not want jsession included in new link
Hi
I have a log off action on my page
<html:link forward="logoff">
this gets rewritten by struts as
http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
so that on my logon screen, I have the link
http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
which looks ugly, I want it to have the link
http://localhost:8180/testapp/index.jsp
without any jsession ID and the page "index.jsp" shown instead of
"logoff.do".
How can I do this?
Cheers
Tony
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Want to use but do not want jsession included
in new link
Posted by Ted Husted <hu...@apache.org>.
You'd have to use a redirect, which tells the browser to request another
address. The browser only knows what it asked for.
John Ng wrote:
>
> Hi Ted,
>
> I have a similar question. For example, when writing
> a shopping cart application, in the URL:
> "http://locathost/shoppingcart/displayCart.do", I have
> a <html:form name=/shoppingcart/deleteItem.do
> method=post> for item deletion. Once the form
> submitted the URL would then become
> "http://locathost/shoppingcard/deleteItem.do"
> However, as what tony asked, how can I make the URL so
> that it becomes something like
> http://localhost/shoppingcart/displayCart.do again
> after the form submission? How can we "re-write" the
> URL?
>
> Thanks
> John
>
> --- Ted Husted <hu...@apache.org> wrote:
> > URL rewriting is built-into the tags, and would have
> > to be turned off in
> > the container. Though, I'm not sure that all
> > containers support
> > disabling URL rewriting as an option.
> >
> > antony@claire.co.jp wrote:
> > >
> > > Hi
> > >
> > > I have a log off action on my page
> > >
> > > <html:link forward="logoff">
> > >
> > > this gets rewritten by struts as
> > >
> > >
> >
> http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
> > >
> > > so that on my logon screen, I have the link
> > >
> > >
> >
> http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
> > >
> > > which looks ugly, I want it to have the link
> > >
> > > http://localhost:8180/testapp/index.jsp
> > >
> > > without any jsession ID and the page "index.jsp"
> > shown instead of
> > > "logoff.do".
> > >
> > > How can I do this?
> > >
> > > Cheers
> > >
> > > Tony
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> > -- Ted Husted, Husted dot Com, Fairport NY USA.
> > -- Custom Software ~ Technical Services.
> > -- Tel +1 716 737-3463
> > -- http://www.husted.com/struts/
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
> __________________________________________________
> Do You Yahoo!?
> Buy the perfect holiday gifts at Yahoo! Shopping.
> http://shopping.yahoo.com
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Want to use but do not want jsession included in new link
Posted by John Ng <jn...@yahoo.com>.
Hi Ted,
I have a similar question. For example, when writing
a shopping cart application, in the URL:
"http://locathost/shoppingcart/displayCart.do", I have
a <html:form name=/shoppingcart/deleteItem.do
method=post> for item deletion. Once the form
submitted the URL would then become
"http://locathost/shoppingcard/deleteItem.do"
However, as what tony asked, how can I make the URL so
that it becomes something like
http://localhost/shoppingcart/displayCart.do again
after the form submission? How can we "re-write" the
URL?
Thanks
John
--- Ted Husted <hu...@apache.org> wrote:
> URL rewriting is built-into the tags, and would have
> to be turned off in
> the container. Though, I'm not sure that all
> containers support
> disabling URL rewriting as an option.
>
> antony@claire.co.jp wrote:
> >
> > Hi
> >
> > I have a log off action on my page
> >
> > <html:link forward="logoff">
> >
> > this gets rewritten by struts as
> >
> >
>
http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
> >
> > so that on my logon screen, I have the link
> >
> >
>
http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
> >
> > which looks ugly, I want it to have the link
> >
> > http://localhost:8180/testapp/index.jsp
> >
> > without any jsession ID and the page "index.jsp"
> shown instead of
> > "logoff.do".
> >
> > How can I do this?
> >
> > Cheers
> >
> > Tony
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel +1 716 737-3463
> -- http://www.husted.com/struts/
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Want to use but do not want jsession included in
new link
Posted by Ted Husted <hu...@apache.org>.
URL rewriting is built-into the tags, and would have to be turned off in
the container. Though, I'm not sure that all containers support
disabling URL rewriting as an option.
antony@claire.co.jp wrote:
>
> Hi
>
> I have a log off action on my page
>
> <html:link forward="logoff">
>
> this gets rewritten by struts as
>
> http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
>
> so that on my logon screen, I have the link
>
> http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
>
> which looks ugly, I want it to have the link
>
> http://localhost:8180/testapp/index.jsp
>
> without any jsession ID and the page "index.jsp" shown instead of
> "logoff.do".
>
> How can I do this?
>
> Cheers
>
> Tony
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>