Tomcat little problem

Hi,

I developped a web application with JSP.

I use Apache and Tomcat.

I want to reduce the URL...I explain...

Under the directory webapps of tomcat i have my

own directory myDirectory which contains

my jsp (under tomcat/webapps/mydirectory/myjsp)

and all my jar (under tomcat/webapps/mydirectory)

.

In the httpd.conf of apache I do this

DocumentRoot "c:/products/tomcat/webapps/mydirectory/"

<Directory "c:/products/tomcat/webapps/mydirectory/">

bu in my browser, to access to my application I need to write

http:/myIP/mydirectory/myjsp/main.jsp

(all works fine)

My aim is to write just http:/myIP/main.jsp

I can not use Alias in httpd.conf because we can not use it for Documentroot!

An idea?

thanks for your help.

Regards.

[879 byte] By [axeld] at [2007-9-26 1:38:15]
# 1
hello, You can put main.jsp in the ./tomcat/webapps/ROOT/,but you must rename main.jsp to index.jsp first.try it.good luck
zhongboqing790612 at 2007-6-29 2:26:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
hello, You can put main.jsp in the "./tomcat/webapps/ROOT/",but you must rename main.jsp to index.jsp first,and rename "./tomcat/webapps/ROOT/index.html" to another file.try it.good luck
zhongboqing790612 at 2007-6-29 2:26:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Which version of tomcat u are using?

if tomcat 3.2.1

in %tomcat_home%\conf\server.xml add following

application context

<Context path="/yourappnamehere"

docBase="your application path here" e.g. C:/xyz

crossContext="false"

debug="0"

reloadable="true"

>

</Context>

related help is available in tomcat doc.

pls. refer for more details

regards

ajhat at 2007-6-29 2:26:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Thanks for all.With your both ideas, I think I can makewhat I want.Regards.
axeld at 2007-6-29 2:26:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
Mr. Axeld, if you succeeded, could you please post the config file data - I'm attempting to do the same thing with Tomcat and Apache, but haven't got it working quite right yet. Thank you.
mbarsic at 2007-6-29 2:26:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...