Solved

servlet question

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now