aspose file tools*
The moose likes Struts and the fly likes Struts 2 + Dynamic Struts.xml ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 + Dynamic Struts.xml ??" Watch "Struts 2 + Dynamic Struts.xml ??" New topic
Author

Struts 2 + Dynamic Struts.xml ??

Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689

Hello All,

I am working on Struts 2 and we have functionality like change them by admin change all site according.

For that I have create folder as Theme name at server webapps and make jsp.

Admin update that jsp and make change at front side.

so can any one tell me how to change my struts.xml file only make code at one java class.

for ex:

<action name="aboutUs" class="com.action.FullScreenAction">
<result name="success">${themeFolder}/AboutUs.jsp</result>
</action>

this will effect like :

for theme name "Default"

<action name="aboutUs" class="com.action.FullScreenAction">
<result name="success">/jsp/front/AboutUs.jsp</result>
</action>

for theme Blue

<action name="aboutUs" class="com.action.FullScreenAction">
<result name="success">/jsp/front/blue/AboutUs.jsp</result>
</action>

waiting for your reply.



Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689


Hello All,

Please help if any body knows ...........
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Struts 2 + Dynamic Struts.xml ??