struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kunal H. Parikh" <kun...@carsales.com.au>
Subject RE: One Forward Action Multiple JSPs
Date Fri, 04 Jun 2004 01:37:10 GMT
Hi Glenn!

I would recommend creating an "Action", with two action-forwards:

1. TermsAndConditions_default
2. TermsAndConditions_fr

In Action.execute, detect the appropriate locale and forward control to the
appropriate action-forward.


HTH,

Kunal


-----Original Message-----
From: gdeschen@cmhc-schl.gc.ca [mailto:gdeschen@cmhc-schl.gc.ca] 
Sent: Friday, 4 June 2004 03:45
To: user@struts.apache.org
Subject: One Forward Action Multiple JSPs

Greetings,

What I would like to do is to be able to display different JSPs for the 
same ForwardAction.

I now have this:
<action path="/TermsAndConditions"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/secure/credentials/termsAndConditions.jsp">
</action>

What I would like is based on the Locale show a different JSP.
I cannot use the i18n for this with resource bundles since the page 
contains lots of text and the format is different for both languages.

So if I create my own ForwardAction 
(secure.credentials.TermsAndConditionsForwardAction) how would I set the 
parameter value to either
/WEB-INF/secure/credentials/termsAndConditions_en.jsp
or
/WEB-INF/secure/credentials/termsAndConditions_fr.jsp

Is this the best way to go about or are there other suggestions?

TIA,
Glenn.



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


Mime
View raw message