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 Creating tools from existing application 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 "Creating tools from existing application" Watch "Creating tools from existing application" New topic
Author

Creating tools from existing application

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

We have this huge application and we have identified that we can isolate some of its functionality and build tools from it. Now - I need to come up with some prototype in a week's time or so. I have identified core classes, actions etc here - some of the things that I am trying to figure out here are -

(1) How can I have multiple struts-cofig.xml in WEB-INF (is it even possible, using different names?) and include appropriate struts-cofig.xml in the deployable war such that my application will be in app.war and tools would be in tools.war and they both would use different struts-config.xml file. I can see that "war" task of ant allows using differnt web.xml but not differnt struts-config.xml. How can it be done?

(2) What other approach I can use in this case? We do not want to duplicate source code, any enhancement to main application must be propagated to tools if tools include those features. Thus, we are keen on using the *same* source code, but need to create two different wars from it where tools.war would be subset of app.war. How do I achieve this?

(3) This may be off topic a bit - so ignore if needed. We use Velocity with struts, so another thing I am trying to figure out is how to use different layout for these two different wars?

Any pointers, help would be highly appreciated. I am already digging into relevant docs to figure out things here.

TIA,
- Manish
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

Never mind, I think I figured out! You can specify struts-config.xml etc in the web.xml itself. And ANT war task allows to specify required web.xml. Guess I am good to go now...
 
jQuery in Action, 2nd edition
 
subject: Creating tools from existing application
 
Similar Threads
forwards in struts
"Many WARs in one EAR" or "Code organization with Spring/Hibernate"
How to call external WAR file in J2EE Project using WSAD 5.1.1
Difference Between Multiple Modules and Multiple Struts-config.xml in Default Module
Struts portlet in Liferay