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 Struts:: non-module category folder to display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts:: non-module category folder to display" Watch "Struts:: non-module category folder to display" New topic
Author

Struts:: non-module category folder to display

Shin Hashitani
Ranch Hand

Joined: Dec 04, 2001
Posts: 54
Tomcat 4.0.4
Struts 1.1-b2
/--situation--/
The system hosts several sites, and one set of struts files.

Hi everybody,
forgive me to post a similar question as the one I just posted a couple of hours ago.
The system is not that big.
The idea is to host multiple sites on one system. But each site has a different folder of its on under the application root(Just the look of the URL.)
For example,
http://mysite.com/one_system/site1/login.do
http://mysite.com/one_system/site2/login.do
The app is installed under
$CATALINA_HOME/webapps/one_sysetm/
and above urls are directed to the same action. but ActionServlet (or Action) figure s out which site's the target and process the access accordingly.
module concept is not what I am lookig for.
The system is small, so I only need one struts-config.
I assume that it can be done by process the request URL in a basic servlet way to figure out, but I thought there might be a way to define that on struts-config.
The whole mapping and url business confuse the hell out of me. I guess I am missing something really big, but I just don't know what that is.
I'd greatly appreciate your help.
Thank you.


/*<br /> * Quants Inc.<br /> * Engineer<br /> *<br /> * Shin Hashitani<br /> * hashitani@quants.co.jp<br /> * <a href="http://www.quants.co.jp" target="_blank" rel="nofollow">www.quants.co.jp</a><br />*/
Ted Husted
Author
Ranch Hand

Joined: Dec 02, 2002
Posts: 37
Each "site" can have their own set of action-mappings that specify the appropriate paths.
path="/site1/logon"
type="myApp.action.logon"
...
path ="/site2/logon"
type="myApp.action.logon"
The can share the same Action classes, and use different local forwards, if necessary.
HTH, Ted.


<a href="http://husted.com/struts/book.html" target="_blank" rel="nofollow">Struts in Action</a>
Shin Hashitani
Ranch Hand

Joined: Dec 04, 2001
Posts: 54
Hi Ted,
thanks for the reply.
Okay, using the action mappings are one of the options that now I have.
However,
doesn't that make struts-config large and hard to maintain as the system grows? For example, if I have 10 mappings and host 10 sites on the system, that would make 100 entries in the config file.
Is there a clearer way to handle this problem?
Any suggestions?
Thank you in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts:: non-module category folder to display
 
Similar Threads
response.sendRedirect Problem
Dynamically Load Struts Config Based On URL
SwitchAction
resource bundle in struts 2
Switching between http and https in struts-config