Solved

servlet question

Posted on 1998-04-23
5
249 Views
Last Modified: 2013-11-24
Hi folks,
I am not sure whether I should put this question here. But I could not find any other place. I am writing
a java servlets using JDK 1.1.5 and JSDK 1.0.1. Instead of using servlet enabled Web server, I am using
srun.exe ( standalone servlet -runner that comes with JSDK1.0.1). In the servlet, I am generating html
dynamically. In the html, I am loading a image(.gif) file. The problem is the browser cannot find the gif
file though it is in the same directory from where I am running srun. I can access servlet from the directory,
but not gif. How can I do it?? I tried giving absolute path like http://maha-pc:8080/servlet/title.gif in the html.
Still it did not work. The documentation does not say anything. Has anybody tried it ??

Thanx
Maha
0
Comment
Question by:maha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

by:sdaxm11
ID: 1219507
could you post the servlet ?
0
 

Author Comment

by:maha
ID: 1219508
yes, I can do eveything except that I can't load the image file.

0
 

Expert Comment

by:sdaxm11
ID: 1219509
no, can you post or email me the servlet (code) at miss.jones@mcmail.com
0
 

Accepted Solution

by:
acidburn earned 0 total points
ID: 1219510
This is an HTTP question, not a java question really.

Only executable objects (serialized objects or class files) may be served by srun.  You need to run an HTTPD server.  I suspect that if you telneted to your box with
      telnet localhost 80

and tried to access the document manually with
      GET /servlet/title.gif HTTP/1.0

It would definately fail to respond with the appropriate gif. I don't know what platform you are running on but you might be able to run a simple webserver of any type, along with srun on another port #, in order to fully accomplish what you are trying to do.

...Acidburn...

0
 

Author Comment

by:maha
ID: 1219511
Thanx acidburn,

I got it worked using IIS server and srun.

Maha
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iterator/ListIterator approach 17 53
Facing this issue for maven proxy setting 2 27
Print Rhino Java Array in Javascript 1 35
dao vs facade design patterns 2 33
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question