Check the web.xml.
The first [appname] is the context. That gets you to the application
named [appname], so the servlet container will check the [appname]
context path for WEB-INF/web.xml for other information....
/servlet/[appname] maps to the class org.apache.turbine.Turbine - the
/servlet/* path is picked up by
org.apache.tomcat.request.InvokerInterceptor, which redirects to the
appropriate servlet indicated in your web.xml file as a <servlet>.
You could shorten things (I *think*) by modifying your web.xml for your
application and adding something like this inside the <web-app>:
<servlet-mapping>
<url-pattern>/gofoo/*</url-pattern>
<servlet-name>[appname]</servlet-name>
</servlet-mapping>
Of course, replacing [appname] with your appname, and you don't (of
course) have to use gofoo. This would make the following work:
http://[servername]:8080/[appname]/gofoo/
And you COULD (I don't recommend it - see why in a second) do something
silly like
<servlet-mapping>
<url-pattern>/*</url-pattern>
<servlet-name>[appname]</servlet-name>
</servlet-mapping>
And then EVERYTHING in that context would be handled by the Turbine
class. The problem with this is that you can't have ANYTHING static in
your context - including images. I'm sure there's SOME way around this,
to specify that URL's including /images are NOT handled by the servlet,
but I'm not positive.
Now, all this to say that I've tested these with a very basic
application, but I can't gurantee that all of Turbine would function
properly with those changes. I'm not sure if anything else in the
framework needs the servlet to be handled by the interceptor.
And all the veterans are welcome to slap me on the hand for saying
something wrong.
All of this information is available in the Servlet specification, I
believe.
Will Stranathan
John wrote:
> This is a newbie question. I downloaded tdk and it worked out of box,
> that's great. I found it's weird to have something like
>
> http://localhost:8080/[appname]/servlet/[appname]
>
> Could someone explain the syntax of this url?
>
> John
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]