Hy,

  First, I move this thread to struts-user.

  You can check Tiles capabilities to have different "channels". In your case, a
channel correspond to a targeted device.
  This Tiles capability is an attempt to provide an answer to the multi-device
problem. You use the same actions for all channels, and different "views"
implementation for each. The struts-config file contains action declarations
declaring forwards to logical "views". Tiles select appropriate views according
to your own criteria (here the device type). The tiles mechanism works in the
same way that Java i18n properties work : you have one declaration file for each
device, each one declaring  tiles definitions for the device.
  Check the i18n Tiles capabilities, and the multi-channel example coming with
Tiles. It should be easy to adapt it to device switching.
  Hope this help,

    Cedric


Manuel Vilar wrote:

> Hello,
>
> First : I am a French developper, so I apologize for my poor English !
>
> Our society decided to use STRUTS because of it’s MVC approach !
>
> Our applications have to be accessed by differents customers devices.
> Each customer device supports different languages ( html, vdxml, WML,
> etc...)
>
> What’s on ?
>
> STRUTS having not intrisinc customer device notion, we are thinking about
> two ways
> for making STRUTS have a customer device notion.
>
> ========
> Method 1 :
> ========
>
> Upgrading ourself STRUTS to implement a device detection ( This info could
> be retrieved in
> the fisrt customer header request ).
> This approach would mean that all the specific device code ( Views,
> Forms,... ) should be selected
> automaticly by forwards functions, and generally by all the STRUTS functions
> expecting
> a parameter like path=”example.jsp” or any page indication parameter
>  input=”MyForm” in the case of an input action).
>
> Example :
> The first application page is “index.jsp”
>
> In struts-config.xml we define this action :
>     <!-- Display the "welcome" page -->
>     <action    path="/welcome"
>             forward="/welcome.jsp">
>     </action>
>
> There is no “welcome.jsp” but two pages named respectivly “welcome_A.jsp”
> and contains html code,
> and “welcome_B.jsp” which contains WML code.
>
> A Customer Device accept html ( Netscape browser )
> B Customer Device accept wml ( WAP )
>
> The “index.jsp” which is the common page could detect customer device and
> sets the Device Value to A or B.
> “index.jsp” contains a link wich page=“welcome.do”
>
> So we start !
>
> When the customer selects the link “welcome.do”, STRUTS action called
> forward could return “welcome_A.jsp”,
> assuming current device is A.
>
> We are here speaking of suffixed pages with A and B. We could  use the same
> pages names but in different directories like that :
> “A/welcome.jsp” for A Device ( html )
> “B/welcome.jsp” for B Device.( WML )
>
> ========
> Method 2 :
> ========
> Making two applications, the fisrt for A Customer Devices and the second for
> B Customer Devices, and force them to share ( if we can do so ! )
> the ressources that are not Device specific.
>
> ========
> Questions :
> ========
>
> Am I Wrong ? ( because none of these methods should be applied or there is a
> simple way )
>
> Best way ?
>
> Thank you all for your answers,
>
> Manuel Vilar,


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to