Alison Lindores wrote:

> Hi,
>
> I have a class that is used to output a response to a browser. The
> constructor for that class is as follows.....
>
> public HTML(String title)
> {
>    buffer = new StringBuffer(4096) ;
>    this.buffer.append("<HTML><HEAD><TITLE>") ;
>    this.buffer.append(title) ;
>    this.buffer.append("</TITLE></HEAD>") ;
>    this.buffer.append("<LINK REL='STYLESHEET'
> HREF='http://localhost:8080/servlet/mystyle.css' TYPE='text/css'>") ;
>    this.buffer.append("<BODY><IMG
> SRC='http://localhost:8080/servlet/images/search_banner.gif' BORDER='0'>") ;
> }   // end of constructor
>
> When the broswer displays this HTML, the servletrunner produces a message
> stating that the stylesheet and the image could not be found. I am using
> JSDK2.0 and my servlets are run from the /examples directory. Even when I
> place the files in that directory they are still 'not found'. Where should
> I be putting them so that they will be displayed??
>
> Help appreciated!
>

The servlet runner that is in JSDK 2.0 does not know how to serve files -- it
only serves servlets.  You need to switch to a servlet runner that can serve
files as well, such as JSWDK 1.0.1 (http://java.sun.com) or Tomcat 3.0
(http://jakarta.apache.org).

Alternatively, you can place the stylesheet and the image on a regular web
server, and modify the URLs to point there instead.

>
> Alison Lindores

Craig McClanahan

___________________________________________________________________________
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

Reply via email to