You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ra...@ocs.com on 2003/05/01 13:02:03 UTC

prepopulation of page issue

My login page has a dropdown, I have code in LoginAction to get that
data.

If I call login.do it is fine.But If I call login.jsp, it will not go to
LoginAction.
Is there any way I still call login.jsp and it calls LoginAction.

<action-mappings>
<action path="/login" type="com.ocs.poetic.profile.LoginAction"
name="loginForm" scope="request" input="session/login.jsp" >
<forward name="success" path="/addCompany.do"/>
</action>
</action-mappings>

-Ramana

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


RE: prepopulation of page issue

Posted by Robert Taylor <rt...@mulework.com>.
I'm not quite sure I understand what you are asking here:

If LoginAction retrieves data for the drop down on the 
login page, then you should secure login.jsp such that the
only way to access it is through LoginAction.

You will want two actions, one to prepare the login
page for display (prepopulate dropdown), 
and one to process the user input entered
on the login page.

You could "secure" the login page be either placing it behind
WEB-INF (a common practice but not completely portable) or
setting up security constraints in web.xml.

robert

> -----Original Message-----
> From: ramana_dommata@ocs.com [mailto:ramana_dommata@ocs.com]
> Sent: Thursday, May 01, 2003 7:02 AM
> To: struts-user@jakarta.apache.org
> Subject: prepopulation of page issue
> 
> 
> My login page has a dropdown, I have code in LoginAction to get that
> data.
> 
> If I call login.do it is fine.But If I call login.jsp, it will not go to
> LoginAction.
> Is there any way I still call login.jsp and it calls LoginAction.
> 
> <action-mappings>
> <action path="/login" type="com.ocs.poetic.profile.LoginAction"
> name="loginForm" scope="request" input="session/login.jsp" >
> <forward name="success" path="/addCompany.do"/>
> </action>
> </action-mappings>
> 
> -Ramana
> 
> ---------------------------------------------------------------------
> 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: prepopulation of page issue

Posted by Sachin Chowdhary <cs...@pisoftek.com>.

You have to use two Actions for this refer :

       http://jakarta.apache.org/struts/faqs/newbie.html#prepopulate 



-----Original Message-----
From: ramana_dommata@ocs.com [mailto:ramana_dommata@ocs.com]
Sent: Thursday, May 01, 2003 4:32 PM
To: struts-user@jakarta.apache.org
Subject: prepopulation of page issue


My login page has a dropdown, I have code in LoginAction to get that
data.

If I call login.do it is fine.But If I call login.jsp, it will not go to
LoginAction.
Is there any way I still call login.jsp and it calls LoginAction.

<action-mappings>
<action path="/login" type="com.ocs.poetic.profile.LoginAction"
name="loginForm" scope="request" input="session/login.jsp" >
<forward name="success" path="/addCompany.do"/>
</action>
</action-mappings>

-Ramana

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