Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Root application in Tomcat6 and servlet mapping :-(

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache2 + Remote Tomcat on Debian  
Author Message
stefan.machwirth

External


Since: Oct 19, 2007
Posts: 1



(Msg. 1) Posted: Fri Oct 19, 2007 6:40 am
Post subject: Root application in Tomcat6 and servlet mapping :-(
Archived from groups: alt>apache>configuration (more info?)

Hi everybody,

hope this is a right group for this question.

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 Sad

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

 >> Stay informed about: Root application in Tomcat6 and servlet mapping :-( 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
servlet files - hi.. i m using Web Logic as an application server, i understood Mr.David ur last message but the confusion is that i have set the path e:/shabir/personal/my website/ for jsp files. As u know that the configuration of servlet in web logic server is..

servlet files - hi. i m using apache 2.0.49 at windows XP. i have kept my jsp files at e:/personal/my website. the question is where i will put my servlet files(.java files) Thanx Shabir

where i shall put my servlet files - hi.. the path of my jsp files is e:/personal/my website, so where i will put my servlet files. i tell u that actually what i want to do, i have a jsp page(Login.jsp), when i press the ok button, it goes at servlet page(Login.java), in this page it check...

How to use jdb for debugging a servlet? - I'm using Apache/JServ with jdk 1.4 (via Textpad on win2K SP 3). The 'gospel' I'm using is: 'Start the server manually and record the password for remote debugging (this is displayed on the console).' 'Start the Java debugger:' 'jdb -host..

Tomcat + JSP/Servlet Problem - Hi Setup: Redhat Linux, Tomcat 5.5.4, using JDK j2sdk1.4.2_06 I have a JSP file, which calls several servlets. However when I access the file via a browser I get the following exception in the log file catalina.out. =========Exception Start..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]