Yep, You just need to change the <servlet-mapping> in web.xml and any global-forwards in struts-config.xml. If you look at the documentation (see link below) you can see what I changed to facilitate the /do/* mapping - just follow the same path and change "/do/" to "/controller/".
If you doing this on your own application, I'd recommend that you put all your links in struts-config.xml as forwards, rather than coding them in your pages. It is easier to change then if you decide to change this mapping. For instance, the following forward: <forward name="signIn" path="/do/signIn" /> can be used in a page with <html:link forward="signIn" />Sign In</html:link>, rather than <html:link page="/do/signIn" />... Hope this helps, Matt --- Philip Tong <[EMAIL PROTECTED]> wrote: > Matt > > Can I configure action mapping as /controller/* rather than /do/* > Thx. > > Philip. > > --- Matt Raible <[EMAIL PROTECTED]> 的郵件內容:> I did convert the > struts-example to use this mapping. It can be found at > > http://www.icsynergy.com/downloads/index.html#struts-example > > > > Online documentation can be found at > > http://www.icsynergy.com/downloads/struts/strutsHowTo.html > > > > Hope this helps. > > > > Matt > > > > --- "Barry L. Kline" <[EMAIL PROTECTED]> wrote: > > > Did you ever figure out how to do this? I have seen many messages > > > about how great it is to use /do/ but haven't seen anyone mention how > > > to. I'm just starting with struts and have been modifying Ted's > > > sample (this same thing) but I'm been unable to get anything back from > > > the browser but a blank screen... > > > > > > Barry > > > > > > > > > Matt Raible wrote: > > > > > > > > I am trying to convert the struts-example application to use: > > > > > > > > <servlet-mapping> > > > > <servlet-name>action</servlet-name> > > > > <url-pattern>/do/*</url-pattern> > > > > </servlet-mapping> > > > > > > > > And in the index.jsp page, I've change the "tour" link from: > > > > > > > > <html:link page="/tour.do"> > > > > <font size="-1"><bean:message key="index.tour"/></font> > > > > </html:link> > > > > > > > > to: > > > > > > > > <html:link page="/do/tour"> > > > > <font size="-1"><bean:message key="index.tour"/></font> > > > > </html:link> > > > > > > > > And have changed nothing in struts-config.xml. However, when I try to > > > execute > > > > this link (http://localhost/NASApp/struts-example/do/tour), I get the > > > error: > > > > > > > > [18/Aug/2001 10:16:53:9] info: -------------------------------------- > > > > [18/Aug/2001 10:16:53:9] info: action: Processing a GET for /tour > > > > [18/Aug/2001 10:16:53:9] info: -------------------------------------- > > > > [18/Aug/2001 10:16:53:9] info: -------------------------------------- > > > > [18/Aug/2001 10:16:53:9] info: action: Setting locale 'en_US' > > > > [18/Aug/2001 10:16:53:9] info: -------------------------------------- > > > > [18/Aug/2001 10:16:53:9] info: -------------------------------------- > > > > [18/Aug/2001 10:16:53:9] info: action: No mapping available for path > > /tour > > > > [18/Aug/2001 10:16:53:9] info: -------------------------------------- > > > > > > > > But in my struts-config.xml, there is the entry: > > > > > > > > <action path="/tour" > > > > forward="/tour.htm"> > > > > </action> > > > > > > > > Anyone know how to fix this? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > > > -- > > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Send your FREE holiday greetings online! > > http://greetings.yahoo.com > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > _________________________________________________________ > Do you Yahoo!? > 行萬里路 http://travel.yahoo.com.hk > Comprehensive travel guide at http://travel.yahoo.com.hk > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>