It's not a secret anymore!*
The moose likes Struts and the fly likes Combining two different struts modules of a big 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 "Combining two different struts modules of a big application" Watch "Combining two different struts modules of a big application" New topic
Author

Combining two different struts modules of a big application

Dishpal Bhaluja
Ranch Hand

Joined: Dec 30, 2007
Posts: 96
Scenario:
Developer1 creates a struts based dynamic web application
Developer2 creates another struts based dynamic web application
Environment: Struts 1.3.10 and IDE:Eclipse

How can we combine these two into One big application,each having separate Configuration files

Any complete tutorials regarding this aspect?Please
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

You have to configure and build a new module for second (or first, whatever you wnat to integrate) we app, To make a struts module, Have look at this and this.

HTH


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Dishpal Bhaluja
Ranch Hand

Joined: Dec 30, 2007
Posts: 96
Environment:Netbeans 6.5 Struts Web Project

I created a module named Basics and put it under my WebPages Folder
It has two files index2.jsp and myNewIndex.jsp

Index2.jsp has one form which gets submitted and action class forwards it to myNewIndex.jsp
But on running index2.jsp its showing :Cannot retrieve mapping for action /mynewAction error.

And my GlassFish server is showing the error:Missing configuration file for struts-config-moduleBasics.xml

I guess the problem is that server is loading only struts-config.xml and not the other xml and checking the action mappings in that xml file.


My configuration file:struts-config-moduleBasics.xml


My WEB.XML is


My index2.jsp is:


Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1


Have you checked the path for your "config/Basics" struts configuration file, whether this path is correct or not ?
"/WEB-INF/Basics/struts-config-moduleBasics.xml"

If yes, then checked whether that .xml is valid and well formed or not

Once you're able to configure it, you have to modify action like this



OR use switch Action

and the resulted URI
http://localhost:8080/toModule.do?prefix=/moduleB&page=/index.do
Dishpal Bhaluja
Ranch Hand

Joined: Dec 30, 2007
Posts: 96
I tried all things as you said:
Checked paths,Validated XML's everything correct.

My Form tag: -->moduleBasics is the name in struts-config-moduleBasics.xml where as i define it like config/Basics in my web.xml ,Anyway I tried changing that too,But in vain


Still getting the error like:


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Combining two different struts modules of a big application
 
Similar Threads
displaying unicode charachters on frame
some question about writing CV , it is my first CV
Is this right architecture
JSP Application on a simple website.
UI issue with Struts 2 tags