• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts:: non-module category folder to display

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Shin Hashitani
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic