Solved

servlet question

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

707 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

12 Experts available now in Live!

Get 1:1 Help Now