Jim Reynolds wrote:
> I am running a struts application in a directory (context?) named "test".
> In my web.xml I configured the following:
>   <servlet>
>     <servlet-name>test</servlet-name>
>     <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> ......
>   <servlet-mapping>
>     <servlet-name>test</servlet-name>
>     <url-pattern>*.do</url-pattern>
>   </servlet-mapping>
>
>
> For whatever reason, I have alwasy called the application with
> /test/welcome.do or something like that.
>
> Question1) Does the name in the servlet-name, have to be the same name
> as the context? Or did it just work because of that.
>   
No. It doesn't matter what the servlet-name is, although most people use
'action'.
> Question 2) Because I am using Tomcat 5.5, the group says I need to
> run my struts app in the "root" of the webserver. So I am confused, do
> I need to change the servlet-name to "root" or can I just call
> welcome.do in the root folder.
>   
Uh...

- You don't need to run it in the root of the webserver, which would be
in (by default) ${tomcat-dir}/webapps/ROOT.
- If you deployed to ROOT you would use http://${hostname}/welcome.do.
> Question 3) Someone mentioned I may have better luck getting indexed
> if my app used path-mapping and not extension mapping. Can I change it
> after the app is up and running, Is it just a config?
>   
Sure. Normally Tomcat will restart the app if web.xml is touched.

Bear in mind that depending on your application/server setup you could
just extension map to *.html.

You might also want to brush up on basic J2EE web-app stuff.

Dave



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

Reply via email to