tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burkard Endres" <bEnd...@i-te.com>
Subject AW: jsps and servlets in same context?
Date Mon, 11 Jun 2001 10:39:55 GMT
i have followed your instructions but it doesn't work
the Webbrowser tells me that he could not find the page



-----Urspr√ľngliche Nachricht-----
Von: Amos Shapira [mailto:amos.shapira@webcollage.com]
Bereitgestellt: Montag, 11. Juni 2001 12:14
Bereitgestellt in: tomcat-user
Unterhaltung: jsps and servlets in same context?
Betreff: RE: jsps and servlets in same context?


You should map url's to your servlets. See the <servlet> and
<servlet-mapping>
tags in web.xml, e.g.:

  <servlet>
    <servlet-name>
      login
    </servlet-name>
    <servlet-class>
      com.yourcompany.LoginServlet
    </servlet-class>
  </servlet>

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

The .class file have to be under WEB-INF/classes or in a JAR under
WEB-INF/lib

-----Original Message-----
From: Burkard Endres [mailto:bEndres@i-te.com]
Sent: Monday, June 11, 2001 12:58 PM
To: tomcat-user@jakarta.apache.org
Subject: jsps and servlets in same context?


Hi

i want my servlets and my jsps be served out of the same directory.
this means:
the servlet shoud be mapped to a folder so that they are accessible via:
/myfolder/myservlet
the jsps should also be accessible via
/myfolder/myjsp.jsp

if i copy the jsps in the /myfolder/... it works if i provide the full
path to the jsps
but if i access only /myfolder/ i recieve a directorylisting where i can
download
my jsps in sourcecode and this is of course not acceptable.

Kind regards

Burkard Endres

i-te systems GmbH
Wilhelm-Dahl-Strasse 16
97082 Wuerzburg
Germany

Mime
View raw message