Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Root application in Tomcat6 and servlet-mapping

Reply
Thread Tools

Root application in Tomcat6 and servlet-mapping

 
 
stefan.machwirth@debeka.de
Guest
Posts: n/a
 
      10-19-2007
Hi everybody!

I have the following cheesy problem: I'd like to place a servlet as a
default root application within Tomcat6.

So I put the following ROOT.xml into "conf\Catalina\localhost":

<Context crossContext="true" docBase="D:\apache-
tomcat-6.0.14\startapp">
</Context>

So in "D:\apache-tomcat-6.0.14\startapp" is my application content,
including a WEB-INF, but some plain html-files, too. In the web.xml
there is following servlet mapping:

<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

The idea is, that on a simple server request ("localhost:8080") this
servlet should answer the request as the root default application.
This works fine. But there are - as mentioned - these static GUI
files. The problem is, that all request-URLs to the other root
webcontent ("localhost:8080/gui.jsp", "localhost:8080/my.gif" or
others) are catched by this servlet-mapping, too

The problem is, that this mapping "/" recognizes *ALL* requests. Is
there a way to configure a servlet-mapping which directs all requests
for the server name into the servlet, but serves other resources under
the root context like normal files?

Thanx a lot!

Stefan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java GC options for tomcat6 service Gerard H. Pille Java 4 04-16-2011 08:46 PM
changes in application after upgrading tomcat4 to tomcat6 ruds Java 27 12-16-2007 03:03 AM
non root users accessing application installed with root instance hector C Programming 5 12-05-2006 01:01 PM
SRT DIvision, Square root and reciprocal square root alghazo@siu.edu VHDL 0 05-27-2004 06:23 AM
Tertiary Conditional: what does this evaluate to ("docRoot == null ? this.root : doc root")? Rick Osborn Java 10 02-08-2004 02:25 AM



Advertisments