You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by MA...@de.ibm.com on 2001/06/11 15:04:09 UTC
Session handling with wml
I'm trying to get struts working with wml. Everything works fine beside the
fact, that struts always thinks it is able to place a cookie at the browser
(Nokia 6210). This seems not to be working, as nothing keeps stored in
session. I can't reproduce this error with the blueprint from Nokia
Toolkit, even if cookies are deactivated. Manual URL-encoding has no
effect, as the session-id is never added to url if a cookie was set...
Anybody solved similar problem?
Thanx, Maik.
Re: Session handling with wml
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 11 Jun 2001 MAVOSS@de.ibm.com wrote:
>
>
> I'm trying to get struts working with wml. Everything works fine beside the
> fact, that struts always thinks it is able to place a cookie at the browser
> (Nokia 6210). This seems not to be working, as nothing keeps stored in
> session. I can't reproduce this error with the blueprint from Nokia
> Toolkit, even if cookies are deactivated. Manual URL-encoding has no
> effect, as the session-id is never added to url if a cookie was set...
> Anybody solved similar problem?
> Thanx, Maik.
>
>
>
In most servlet containers, you can turn off the use of cookies for
session maintenance -- check the docs for your container on how.
For URL rewriting to work, you need to remember the following:
* You must URL-rewrite (i.e. call response.encodeURL()) every single
hyperlink in the application. With Struts, the <html:form> and
<html:link> tags do this for you automatically.
* You must ensure that a session is created before the response is
committed back to the client. In general, that means be sure that
you call request.getSession() -- or call a JSP page -- before the
first buffer-full of output has been committed.
Craig