You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vangelis Konstantinis <Va...@eurodyn.com> on 2003/05/06 12:30:46 UTC
Html:select
Hi to all,
I am now learning Struts and i have a question ?
I pass a vector with beans (UserBean) into a session from the
ActionServlet,
UserBean has 2 properties (id, name)
Now in the next jsp I want to show the values of the UserBean(id ->
hidden, name ) in the select option.
With old way I can do this, how this is done with struts tags?
Thanks in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Problem while using actionForward.setRedirect(true)
Posted by ashokd <as...@visualsoft-tech.com>.
Hi,
I am using Struts1.0.2.
this below configuration works with this version.
Thanks for your help.
Thanks & Regards,
Ashok.D
----- Original Message -----
From: "Max Cooper" <ma...@maxcooper.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, May 06, 2003 7:37 PM
Subject: Re: Problem while using actionForward.setRedirect(true)
> That does seem strange, but this might work around that behavior;
> specify:
>
> <forward name="loginloadsuccess" path="/login/login.jsp"
> redirect="true"/>
>
> instead of calling:
>
> actionForward.setRedirect(true);
>
> -Max
>
> On Tue, 2003-05-06 at 04:45, ashokd wrote:
> > Hi,
> >
> > In my jsp pages while doing any action i am redirecting to another jsp
page.
> >
> > In my browser location bar I am not getting my jsp page name, I am
getting
> > the my action.
> >
> > If I refresh the page, the same action invoking once again, but I don't
want
> > this scenario.
> >
> > For that before redirection ActionForward in Action classes I kept
> >
> > ActionForward actionForward = pMapping.findForward("success");
> > actionForward.setRedirect(true);
> >
> >
> >
> > Now I am getting the jsp page, upto here it is ok.
> >
> > My Problem is:
> > I configured like below:
> >
> > <action path = "/loginAction"
> > type = "com.test.LoginAction"
> > name = "loginForm"
> > scope = "session"
> > input = "/login/login_form.jsp">
> >
> > <forward name = "loginloadsuccess" path="/login/login.jsp"/>
> >
> >
> > I kept my application in a ear, my web-application Name is:
> > authentication_web
> >
> > If I tested now I am getting
> >
http://localhost:8080/authentication_web/authentication_web/login/login.jsp
> >
> > Why authentication_web is coming twice?
> >
> > If I kept <forward name = "loginloadsuccess"
path="login.jsp"/>
> >
> > I am getting http://localhost:8080/authentication_web/login/login.jsp
> >
> > It is ok. But I want to use relative paths in my configuration.why
> > authentication_web (my web application name) is coming twice.
> >
> > Thanks & Regards,
> > Ashok.D
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> --
> Max Cooper <ma...@maxcooper.com>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Problem while using actionForward.setRedirect(true)
Posted by Max Cooper <ma...@maxcooper.com>.
That does seem strange, but this might work around that behavior;
specify:
<forward name="loginloadsuccess" path="/login/login.jsp"
redirect="true"/>
instead of calling:
actionForward.setRedirect(true);
-Max
On Tue, 2003-05-06 at 04:45, ashokd wrote:
> Hi,
>
> In my jsp pages while doing any action i am redirecting to another jsp page.
>
> In my browser location bar I am not getting my jsp page name, I am getting
> the my action.
>
> If I refresh the page, the same action invoking once again, but I don't want
> this scenario.
>
> For that before redirection ActionForward in Action classes I kept
>
> ActionForward actionForward = pMapping.findForward("success");
> actionForward.setRedirect(true);
>
>
>
> Now I am getting the jsp page, upto here it is ok.
>
> My Problem is:
> I configured like below:
>
> <action path = "/loginAction"
> type = "com.test.LoginAction"
> name = "loginForm"
> scope = "session"
> input = "/login/login_form.jsp">
>
> <forward name = "loginloadsuccess" path="/login/login.jsp"/>
>
>
> I kept my application in a ear, my web-application Name is:
> authentication_web
>
> If I tested now I am getting
> http://localhost:8080/authentication_web/authentication_web/login/login.jsp
>
> Why authentication_web is coming twice?
>
> If I kept <forward name = "loginloadsuccess" path="login.jsp"/>
>
> I am getting http://localhost:8080/authentication_web/login/login.jsp
>
> It is ok. But I want to use relative paths in my configuration.why
> authentication_web (my web application name) is coming twice.
>
> Thanks & Regards,
> Ashok.D
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
--
Max Cooper <ma...@maxcooper.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Problem while using actionForward.setRedirect(true)
Posted by ashokd <as...@visualsoft-tech.com>.
Hi,
In my jsp pages while doing any action i am redirecting to another jsp page.
In my browser location bar I am not getting my jsp page name, I am getting
the my action.
If I refresh the page, the same action invoking once again, but I don't want
this scenario.
For that before redirection ActionForward in Action classes I kept
ActionForward actionForward = pMapping.findForward("success");
actionForward.setRedirect(true);
Now I am getting the jsp page, upto here it is ok.
My Problem is:
I configured like below:
<action path = "/loginAction"
type = "com.test.LoginAction"
name = "loginForm"
scope = "session"
input = "/login/login_form.jsp">
<forward name = "loginloadsuccess" path="/login/login.jsp"/>
I kept my application in a ear, my web-application Name is:
authentication_web
If I tested now I am getting
http://localhost:8080/authentication_web/authentication_web/login/login.jsp
Why authentication_web is coming twice?
If I kept <forward name = "loginloadsuccess" path="login.jsp"/>
I am getting http://localhost:8080/authentication_web/login/login.jsp
It is ok. But I want to use relative paths in my configuration.why
authentication_web (my web application name) is coming twice.
Thanks & Regards,
Ashok.D
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Html:select
Posted by Shweta Kumari <sh...@globalcase.net>.
Hi,
use logic Iterate to loop thru your vector and then use bean to show the
corr element values.
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<logic:iterate id="ref" name="UserBean" >
<bean:write name="ref" property="id"/>
<bean:write name="ref" property="Name"/>
</logic:iterate>
regards
shweta
-----Original Message-----
From: Vangelis Konstantinis [mailto:Vangelis.Konstantinis@eurodyn.com]
Sent: Tuesday, May 06, 2003 4:07 PM
To: Struts Users Mailing List
Subject: Re: Html:select
In session I dont store the bean, but a vector which contains beans?
harm@informatiefabriek.nl wrote:
> Use:
>
> <bean:write name="yourbeanname" property="id"/>
>
> Where "yourbeanname" is the same name as you have stored it in the session
> object.
>
> Cheers,
>
> Harm de Laat
> Informatiefabriek
>
> Vangelis Konstantinis <Va...@eurodyn.com>
> 05/06/2003 12:30 PM
> Please respond to
> "Struts Users Mailing List" <st...@jakarta.apache.org>
>
> To
> struts-user@jakarta.apache.org
> cc
>
> Subject
> Html:select
>
> Hi to all,
>
> I am now learning Struts and i have a question ?
>
> I pass a vector with beans (UserBean) into a session from the
> ActionServlet,
> UserBean has 2 properties (id, name)
>
> Now in the next jsp I want to show the values of the UserBean(id ->
> hidden, name ) in the select option.
>
> With old way I can do this, how this is done with struts tags?
>
> Thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Html:select
Posted by Vangelis Konstantinis <Va...@eurodyn.com>.
In session I dont store the bean, but a vector which contains beans?
harm@informatiefabriek.nl wrote:
> Use:
>
> <bean:write name="yourbeanname" property="id"/>
>
> Where "yourbeanname" is the same name as you have stored it in the session
> object.
>
> Cheers,
>
> Harm de Laat
> Informatiefabriek
>
> Vangelis Konstantinis <Va...@eurodyn.com>
> 05/06/2003 12:30 PM
> Please respond to
> "Struts Users Mailing List" <st...@jakarta.apache.org>
>
> To
> struts-user@jakarta.apache.org
> cc
>
> Subject
> Html:select
>
> Hi to all,
>
> I am now learning Struts and i have a question ?
>
> I pass a vector with beans (UserBean) into a session from the
> ActionServlet,
> UserBean has 2 properties (id, name)
>
> Now in the next jsp I want to show the values of the UserBean(id ->
> hidden, name ) in the select option.
>
> With old way I can do this, how this is done with struts tags?
>
> Thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Html:select
Posted by ha...@informatiefabriek.nl.
Use:
<bean:write name="yourbeanname" property="id"/>
Where "yourbeanname" is the same name as you have stored it in the session
object.
Cheers,
Harm de Laat
Informatiefabriek
Vangelis Konstantinis <Va...@eurodyn.com>
05/06/2003 12:30 PM
Please respond to
"Struts Users Mailing List" <st...@jakarta.apache.org>
To
struts-user@jakarta.apache.org
cc
Subject
Html:select
Hi to all,
I am now learning Struts and i have a question ?
I pass a vector with beans (UserBean) into a session from the
ActionServlet,
UserBean has 2 properties (id, name)
Now in the next jsp I want to show the values of the UserBean(id ->
hidden, name ) in the select option.
With old way I can do this, how this is done with struts tags?
Thanks in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org