tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Troy Heninger" <thenin...@browz.com>
Subject Web Application Help
Date Wed, 13 Sep 2000 19:58:17 GMT
I still need help with this question.  I'll post it again, since I didn't
get any replies.

___________________________________

I am creating a variation of JSP, which I am calling DSP.  I currently have
this implemented as a web application in a .war file, which I place in the
tomcat webapps folder.  I am having a few problems getting it to work as
desired.  I want files with the extension *.dsp to be executed through my
servlet.  I do not want files accessed through /dsp/* to be executed through
my servlet.  In fact, there isn't a /dsp folder in my /webapps/ROOT folder
anyway.

What happens right now is the opposite of what I want.  Requests for *.dsp
files are just sent from ROOT without processing through my servlet, so the
user sees page source code.  But files accessed  with /dsp/* are sent to my
servlet.  This doesn't work well either because the resulting real path
includes the .../dsp/... which doesn't help because the files I want served
through my servlet are in webapps/ROOT folder.

I need some help configuring either Tomcat or my web application so I get
the desired processing results.  Below are the important parts of my
WEB-INF/web.xml file which is in my web application:

<web-app>
  <servlet>
    <servlet-name>
      dsp
    </servlet-name>
    <servlet-class>
      com.browz.dsp.servlet.BZServlet
    </servlet-class>
    <load-on-startup>
      1
    </load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>
      dsp
    </servlet-name>
    <url-pattern>
      *.dsp
    </url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>
      default.dsp
    </welcome-file>
  </welcome-file-list>
</web-app>

One other clue that may help is that when Tomcat initializes I get the
following lines in the console:
  Context log: path="/dsp" Automatic context load
docBase="C:\dev\jakarta-tomcat\webapps\dsp"
  Context log: path="/dsp" Adding context path="/dsp"
docBase="C:\dev\jakarta-tomcat\webapps\dsp"
But, I do not see similar lines for Tomcat's own JSP implementation.  Why
should there be a difference?

BTW, I am using Tomcat's own web server during development, not in
combination with any other web server.  This begs the question, "Will there
be a difference when I deploy this on a real web server?".

TIA,
Troy Heninger

Mime
View raw message