How do I get modules to work with URLs like these:
 "http://server.com/webApp/module1/action1";
 "http://server.com/webApp/module2/action2";

Alternatively, is it now allowed to have multiple ActionServlets in one webapp? 
If so, I can use that technique rather than modules.


Here's what's happening:

I have an ActionServlet (not currently not using modules at all), where the 
servlet-mapping is <url-pattern>/action/*</url-pattern>.  This is deployed in a 
webapp called scsPortal, making my URLs look like:
   "http://server.com/scsPortal/action/action1";

I'd like to add a few other modules, hopefully making my URLs look like:
   "http://server.com/scsPortal/module1/action2";.
   
(I'm okay with any convention for my new module URLs, but my previous action/* 
 URLs must stay in the same place.)


However, when I add a new module to my ActionServlet and add a new <url-pattern>
for the module1 directory on the same ActionServlet, Struts reports the module 
URLs as invalid paths.

    <!-- Added to <servlet> named action -->
    <init-param>   
      <param-name>config/module1</param-name>
      <param-value>/WEB-INF/struts-config-module1.xml</param-value>
    </init-param>        

        ...
        
        <!-- Added <servlet-mapping> -->
    <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>/module1/*</url-pattern>
    </servlet-mapping>


Curiously, everything works fine if instead of having two <url-patterns> 
(one for /action/*, one for /module1/*), I only have <url-pattern>*.do


What's going on?  Can I not declare servlet-mapping directories for my modules? 
 
How can I use modules without having to resort to *.do style URLs?

I've traced this down to something in ModuleUtils.getModuleName(request,context)

A default url-pattern of "/" works for getting the correct action, but makes it 
so none of my static content can be served.


Anyone got a fix?  (I'm using Struts 1.2.4 and Tomcat 5.5.23)


 Thanks!
  Mark Piper




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to