This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 684

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: 684


Hello All,

Please help if any body knows ...........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 + Dynamic Struts.xml ??
 
Similar Threads
Struts 2 checkboxlist error - list key could not be resolved
Autocompleter with ajax theme
appfuse validation problem
unable to exceute logout program
Struts2-Spring annotation