Hi
I have put in my sevlet
<servlet-mapping>
<servlet-name>HOME </servlet-name>
<url-pattern>/*</url-pattern> --(1)
</servlet-mapping>
Which works fine, it maps all requests to the
controller servlet. However when this controlling
servlet wants to display a jsp/html page which has an
image in it, ie
<IMG SRC="/images/test.gif">
then this image is not displayed. Is the mapping (1)
causing the image request to be replaced by a call to
the servlet HOME? If so/not what can I do so I can
display the image?
Cheers
Antony
--- Pierre-Yves Saumont <[EMAIL PROTECTED]> wrote:
> Hi,
>
> From what you say now, I see that my former answer
> was inaccurate. You could
> use :
>
> <web-app>
> <servlet>
> <servlet-name>HOME</servlet-name>
>
>
<servlet-class>org.mytestingservlet.Home</servlet-class>
> </servlet>
> <welcome-file-list>
> <welcome-file>home/</welcome-file>
> </welcome-file-list>
> <servlet-mapping>
> <servlet-name>
> HOME
> </servlet-name>
> <url-pattern>
> /home/
> </url-pattern>
> </servlet-mapping>
> </web-app>
>
> So that your welcome file is the home directory.
> This directory is mapped to
> the HOME servlet, but you can still acess the home
> directory content.
>
> Pierre-Yves
>
> -----Message d'origine-----
> De : A mailing list for discussion about Sun
> Microsystem's Java Servlet
> API Technology.
> [mailto:[EMAIL PROTECTED]]De la part de
> t t
> Envoy�: mardi 17 juillet 2001 11:08
> � : [EMAIL PROTECTED]
> Objet : Re: Deployment of Servlets
>
>
> Thanks for the reply.
>
> I want to have a welcome servlet, not a welcome html
> or jsp file. This is what I have at the moment with
> a
> redirect to the servlet I want in it. But it looks
> messy.
>
> Cheers
>
> Tony
>
>
> --- suhas <[EMAIL PROTECTED]> wrote:
> > how about using this -
> >
> > <welcome-file-list>
> > <welcome-file>home.jsp</welcome-file>
> > </welcome-file-list>
> >
> >
> > ----- Original Message -----
> > From: t t <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, July 17, 2001 9:13 AM
> > Subject: Deployment of Servlets
> >
> >
> > > Hi Folks
> > >
> > > I am trying to deploy my servlets but am having
> a
> > > problem. Instead of a welcome file, I want to
> > have
> > > a welcome servlet. In my web.xml file I have
> > tried
> > > something like
> > >
> > > <welcome-file-list>
> > > <welcome-file>home</welcome-file>
> > > </welcome-file-list>
> > >
> > > <servlet>
> > > <servlet-name>HOME</servlet-name>
> > >
> >
>
<servlet-class>org.mytestingservlet.Home</servlet-class>
> > > </servlet>
> > >
> > > <servlet-mapping>
> > > <servlet-name>HOME</servlet-name>
> > > <url-pattern>home</url-pattern>
> > > </servlet-mapping>
> > >
> > > But is dosent seem to welcome me with this
> > servlet.
> > > How can I make it so when the user types in the
> > url
> > >
> > > http://localhost:8080/home
> > >
> > > that they are "welcomed" by the contents of the
> > HOME
> > > servler.
> > >
> > > Cheers
> > >
> > > Tony
> > >
> > >
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Get personalized email addresses from Yahoo!
> Mail
> > > http://personal.mail.yahoo.com/
> > >
> > >
> >
>
___________________________________________________________________________
> > > To unsubscribe, send email to
> > [EMAIL PROTECTED] and include in the
> > body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives:
> >
>
http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
> >
>
http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help:
> > http://www.lsoft.com/manuals/user/user.html
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to
> [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
> >
>
http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> >
>
http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html