You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mohan <mo...@infotechsw.com> on 2005/05/16 09:37:09 UTC
session-problem
Hi,
I created a jsp page as follows,
<html:text property='pr' />
in the struts-config filie My action-mapping is as follows
<action path="/ex.do"
type="com.ex.ex1.ex1.actions.ExAction"
name="exForm"
parameter="method"
scope="session"
validate="false">
<forward
name="exfarward"
path="/jsp/ex.jsp"/>
</action>
I am retriving the values from Database and I am setting it using the set
method.
But if I keep the form bean scope in session,It is showing the value in the
text box.If I keep the form bean scope in the request it is not showing the
value.
Thanks,
Mohan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: session-problem
Posted by Rick Reumann <st...@reumann.net>.
Mohan wrote the following on 5/16/2005 3:37 AM:
>
> I am retriving the values from Database and I am setting it using the set
> method.
> But if I keep the form bean scope in session,It is showing the value in the
> text box.If I keep the form bean scope in the request it is not showing the
> value.
Could you explain a bit more the flow of your pages? And when you say:
"I am retriving the values from Database and I am setting it using the
set method" what does that mean? How does your form look on the page
that you are saying only shows a session based form?
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: session-problem
Posted by Hubert Rabago <hr...@gmail.com>.
When you switch from "session" to "request", do you remember to change
the scope where you set the form in your action class? What I mean
is, in your action class, you should also change
session.setAttribute("exForm", exForm);
to
request.setAttribute("exForm", exForm);
Hubert
On 5/16/05, Mohan <mo...@infotechsw.com> wrote:
> Hi,
>
> I created a jsp page as follows,
>
> <html:text property='pr' />
>
> in the struts-config filie My action-mapping is as follows
>
> <action path="/ex.do"
> type="com.ex.ex1.ex1.actions.ExAction"
> name="exForm"
> parameter="method"
> scope="session"
> validate="false">
> <forward
> name="exfarward"
> path="/jsp/ex.jsp"/>
>
> </action>
>
> I am retriving the values from Database and I am setting it using the set
> method.
> But if I keep the form bean scope in session,It is showing the value in the
> text box.If I keep the form bean scope in the request it is not showing the
> value.
>
> Thanks,
> Mohan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org