No problem,
There are three variables involved in the url
servlet name:
This is defined in the web.xml descriptor. This is automatically given the name of
your app in turbine. To change it, simply edit
the web.xml file to read:
<servlet-name>
la
</servlet-name>
Or a similarly short name.
You will also need to edit Tomcat's server.xml file. This defines the servlet prefix
tomcat will look for when trying to determine
if the request is for a servlet.
Edit the following lines:
<RequestInterceptor
className="org.apache.tomcat.request.InvokerInterceptor"
debug="0" prefix="/s/" />
Now tomcat will handle a url request to a servlet zone containing /s/ in the url as a
servlet request and will look the servlet up
in the web.xml descriptor.
The final thing to do is register the context with Tomcat. If you have given your app
a short name like 'po' then you won't need to
do anything. Tomcat will find the directory (as long as it is in the webapps dir), and
add a context. If you have a long app name
like mywonderfulapp, add the following lines to the server.xml file:
<Context path="/po"
docBase="webapps/mywonderfulapp"
reloadable="true"
debug="0"
trusted="false" >
</Context>
Everthing after the docBase= line is obviously up to you. This tells tomcat to add a
context 'po' with the docbase of your app.
If you are using tomcat standalone, this should be all you need to do:
Your url is now:
http://servername:port:/po/s/la
WONDERFUL.
If you are running apache and mod_jk, you will need to change your mod_jk.conf file to
have:
#########################################################
# Auto configuration for the /po context starts.
#########################################################
#
# The following line makes apache aware of the location of the /rmsites context
#
Alias /po "serverroot/webapps/mywonderfulapp"
<Directory "serverroot/webapps/mywonderfulapp">
Options Indexes FollowSymLinks
</Directory>
#
# The following line mounts all JSP files and the /servlet/ uri to tomcat
#
JkMount /po/s/* ajp12
JkMount /po/*.jsp ajp12
#
# The following line prohibits users from directly accessing WEB-INF
#
<Location "/mywonderfulapp/WEB-INF/">
AllowOverride None
deny from all
</Location>
#
# The following line prohibits users from directly accessing META-INF
#
<Location "/mywonderfulapp/META-INF/">
AllowOverride None
deny from all
</Location>
#######################################################
# Auto configuration for the /po context ends.
#######################################################
Hope this works
Gareth
> -----Original Message-----
> From: Eric Dobbs [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 13, 2001 17:06
> To: [EMAIL PROTECTED]
> Subject: Re: Turbine servlet extension mapping?
>
>
> On Monday, August 13, 2001, at 08:48 AM, Gareth Coltman wrote:
>
> > FYI alex, I also shortened the
> > servlet_context/servlet_directory/servlet_name part if the url by
> > modifying web.xml, server.xml and
> > mod_jk.conf (if you're not using apache then you won't need this
> > modified obv.)
> >
> > and now have a site url like:
> >
> > http://hoststuff/me/s/home
> >
> > which is much easier to use and (as Jon so kindly pointed out ;) )
> > nothing to do with turbine.
>
> Gareth,
> Would you mind posting your solution, even if it isn't
> Turbine related.
> This question gets asked often enough that it would be nice
> to include
> in the Turbine docs somewhere. If you'll describe your
> solution, I'll
> convert it to an xdoc.
> -Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]