File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 2579

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

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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating tools from existing application