You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Reynolds <Ja...@intermountainmail.org> on 2006/03/29 00:44:33 UTC

[Shale] Getting the JSF Session Started

I'm having to click twice to get a session started.  I based my app on
the Shale-blank code, which includes an index.jsp file which contains a
<jsp:forward> tag to "welcome.jsf" to, as I understand it, get a session
started in the framework.

However, I still need to click twice on command buttons or command links
to get any action.  Should I be using a more thorough method to ensure a
session begins?

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Shale] Getting the JSF Session Started

Posted by Craig McClanahan <cr...@apache.org>.
On 3/28/06, James Reynolds <Ja...@intermountainmail.org> wrote:
>
>
> I'm having to click twice to get a session started.  I based my app on
> the Shale-blank code, which includes an index.jsp file which contains a
> <jsp:forward> tag to "welcome.jsf" to, as I understand it, get a session
> started in the framework.


JSF itself doesn't start the session -- in this particular application, the
session is created as a side effect of executing the index.jsp page ... JSP
pages always create a session (if it does not exist) unless you declare that
you do not want one.

So why the forward in this case?  Because some containers do not correctly
support a welcome file name of "welcome.jsf" where there is no actual
resource in the webapp at that location.

However, I still need to click twice on command buttons or command links
> to get any action.  Should I be using a more thorough method to ensure a
> session begins?


Without seeing your code, it's difficult to determine what might be causing
the behavior you are seeing, but it seems unlikely to me that session
existence has an impact.  One thing to check, though, is if your page is
triggering a validation error somehow -- unless you have an <h:message> or
<h:messages> component on your page, to show the messages when the page gets
redisplayed, this can be a bit puzzling to JSF newcomers.

Thanks


Craig


---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>