struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen J. Thompson" <step...@cass-ltd.co.uk>
Subject Tiles and parameters
Date Thu, 03 Jul 2003 21:06:53 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all,

I need to pass some parameters in an ActionForward to a tiles definition. Can 
someone suggest how to do this?

I have tried the following but all I get is :
java.lang.IllegalArgumentException: Path .secured.companypage?viewmode=address 
does not start with a "/" character

I know that I am doing something stupid but no idea what. Can anyone help?

Thanks 


Stephen.




Tiles definition:
	<definition name=".secured.companypage" path="/secured/Layout.jsp">
		<put name="title" value="ContactManager Company Page" />
		<put name="header" value="/secured/common/header.jsp" />
		<put name="menu"   value="/secured/tiles/menus/CompanyMenu.jsp" />
		<put name="footer" value="/secured/common/footer.jsp" />
		<put name="body"   value="/secured/tiles/companypage.jsp" />
	</definition>


Struts definition:
	<!-- Edit company -->
	<action path="/secured/EditCompany"
		type="uk.co.cass_ltd.contactmanager.gui.company.action.EditCompanyAction"
		attribute="CompanyForm"
		scope="request"
		validate="false"
		input=".secured.companypage">
			<forward name="success" path=".secured.companypage"/>
	</action>


Java code:
	ActionForward forward = mapping.findForward("success");
	StringBuffer url = new StringBuffer();
	url.append(forward.getPath());
	url.append("?");
	String parm;
	Iterator it = parameterMap.keySet().iterator(); 
	while (it.hasNext()) {
		parm = (String)it.next();
		System.out.println(parm);
		url.append(parm);
		url.append("=");
		url.append((String)parameterMap.get(parm));
		url.append("&");
	}
	url.deleteCharAt(url.length()-1);
	System.out.println("Returning " + url.toString());
	return (new ActionForward(url.toString()));     	
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/BJr0DAwPLUWQb6sRAsW1AJ9bMN1oGwGtSRZWsaV+ZNe1R0GOqgCfSv1x
q6pC4werfWGnAZjKFLZi3WA=
=spgG
-----END PGP SIGNATURE-----


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


Mime
View raw message