You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by dave sag <da...@portablewhole.com> on 2002/07/27 23:12:07 UTC

a question re forms in page fragments.

hey there,

i want my login form to exist in a small reusable fragment within my jsp page.

this is easy enough but when i specify my action mappings in the 
struts-config.xml file i need to specify an input attribute for the 
login action, and valid and invalid forwarding.

this way i could have login forms on the index.jsp page, the logout 
page, and a generic anauthorised entry error page.

   <action-mappings>
     <action
     	path="/login"
     	type="org.davesag.struts.LoginAction"
     	name="login"
     	input="/struts/LoginView.jsp"
     	validate="true">

	    <forward name="valid" path="/struts/MainMenu.jsp" />
	    <forward name="invalid" path="/struts/LoginView.jsp" />
	</action>
   </action-mappings>


what i guess i'd like it something like

   <action-mappings>
     <action
     	path="/login"
     	type="org.davesag.struts.LoginAction"
     	name="login"
     	input="*"
     	validate="true">

	    <forward name="valid" path="/struts/MainMenu.jsp" />
	    <forward name="invalid" path="*" />
	</action>
   </action-mappings>

i can see how i'd interpret the meaning of * in the case of

if (findForward("invalid) == '*') { // reload this same page }

but what effect would messing with the input attribute have?

cheers

dave


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>