just map your servlet to a name of some kind. I like to use .html
mappings in your web.xml...
<web-app>
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>com.my.servlets.myservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/mypage.html</url-pattern>
</servlet-mapping>
</web-app>
Arafat Mohamed wrote:
>
> Is there a way to hide the fact that the user is accessing a servlet? using
> /servlets/ in your path kinda gives it away :)
>
> -----Original Message-----
> From: Rob Tanner [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 08, 2001 11:44 AM
> To: Huiyuan Ma; [EMAIL PROTECTED]; Rob Tanner
> Subject: Re: web.xml configuration
>
> Presuming you have already created the application root, you should
> have a subdirectory in the root called WEB-INF which contains the
> web.xml file as well as one or both of two additional subdirs,
> "classes" and "lib". The servlet-class tags in web.xml should contain
> the full classpath within either of those directories. If, for
> example, you have a hierarchical directory structure in classes, say
> my/favorite/servlets, and a servlet named foo.class, the servlet-class
> is my/favorite/servlets/foo. If you simply have foo.class directly in
> the classes directory, the servlet-class is simply foo. If you're
> using a jar file, again it's the full classpath within the jar file
> that you need to declare within the servlet-class tag set.
>
> Hope that helps.
>
> -- Rob
>
> PS: Download the servlet 2.2 spec java.sun.com. It's a pdf file and
> not a hard read. Most of the generic servlet type questions I see on
> the list, that is, those questions that are not actually tomcat
> specific, are already answered right there. In fact, without reading
> that spec, if someone has only worked with tomcat, how would they even
> know what's tomcat specific and what pertains to any and all 2.2
> compliant servlet containers (including jrun, servlet-exec, etc)?
>
> --On Thursday, March 08, 2001 07:58:59 AM -0800 Huiyuan Ma
> <[EMAIL PROTECTED]> wrote:
>
> >
> > --- Rob Tanner <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> --On Monday, March 05, 2001 11:34:13 AM -0500 "Brett
> >> W. McCoy"
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >> >
> >> > I think for your mapping you don't want that full
> >> directory path for
> >> > your url pattern. The idea is that you don't want
> >> to use that full
> >> > path, but something simple that will get mapped
> >> automagically to that
> >> > path. I think you just want
> >> <url-pattern>nData</url-pattern> in
> >> > there.
> >> >
> >>
> >> That probably won't work without a leading "/". Try
> >> this:
> >>
> >> <servlet-mapping>
> >> <servlet-name>nData</servlet-name>
> >> <url-pattern>/nData</url-pattern>
> >> </servlet-mapping>
> >
> >
> > I'm using a servlet but no jsp,so what is supposed to
> > be put in the <servlet-class> </servlet class>?
> > Thanks.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get email at your own domain with Yahoo! Mail.
> > http://personal.mail.yahoo.com/
>
> _ _ _ _ _ _ _ _ _ _
> /\_\_\_\_\ /\_\ /\_\_\_\_\_\
> /\/_/_/_/_/ /\/_/ \/_/_/_/_/_/ QUIDQUID LATINE DICTUM SIT,
> /\/_/__\/_/ __ /\/_/ /\/_/ PROFUNDUM VIDITUR
> /\/_/_/_/_/ /\_\ /\/_/ /\/_/
> /\/_/ \/_/ /\/_/_/\/_/ /\/_/ (Whatever is said in Latin
> \/_/ \/_/ \/_/_/_/_/ \/_/ appears profound)
>
> Rob Tanner
> McMinnville, Oregon
> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
begin:vcard
n:Goss;Matt
tel;fax:919-657-1501
tel;work:919-657-1432
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Matt
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]