Solved

servlet question

Posted on 1998-04-23
5
250 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

734 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