John Thomas

Greenhorn
+ Follow
since Dec 19, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Thomas

David,
Finally I figured out , where to place the GIFs and how to code it in SRC parameter
As I said earlier, I copy all my Servlet classes to
C:\jak-tomcat\webapps\ROOT\WEB-INF\classes

Copied my GIF file (pic01.gif) to
C:\jak-tomcat\webapps\ROOT\

In my HTML file, for the SRC I coded
SRC='/pic01.gif'
(If Windows Explorer's properties say the pic01.gif is PIC01.GIF then you need to code in upper case )
What I was missing was the slash '/' before pic01.gif
The above solution is for a TOMCAT installation out of the box, with no changes to server.xml or any new Context entries.
In case you wondered how I figured this out...
Internet Explorer , when it is unable to load a pic shows a cross ( X ) at that particular location . Right click on the cross and under properties it will tell you the actual path where it tried to load from .
In my case it was http://122.76.141.31:8080/servlet/pic01.gif , which led me to believe that TOMCAT expected pic01.gif at the root, which prompted me to put a '/' before pic01.gif
Thanks for all your help !
Junuli, you are a nice guy. I should have appreciated your well intentioned replies.
Ernest, Pope in Italy needs people like you !

22 years ago
Sure, Expertise in TOMCAT is a MUST to be a moderator's helper.
Even the MODERATOR agrees that my issue IS related to TOMCAT
I don't understand what your freakin problem is !.

22 years ago
Thanks for the update David !.
- John
22 years ago
Junuli,
I wasn't challenging the moderator's authority, but rather had a disagreement on classifying my post under HTML & JavaScript
I wish you concentrated more on the subject matter rather than wasting your time explaining the lack of monetary benefits.
Also, I don't think you are qualified enough to be a moderator because the very suggestions that you made for my problem is ample evidence of your lack of knowledge in the fundamentals of TOMCAT.
22 years ago
Why should this question be posted under HTML and JavaScript forum ?. I believe my issue has more to do with TOMCAT.
Again, the gist of my question was where should I place the GIF files that the HTML generated by a Servlet needs and how should I code the path in the SRC parameter of IMG tag. So that when I access the Servlet using TOMCAT ( standalone mode ), TOMCAT is able to locate the GIFs.
I have posted the same question under TOMCAT forum, so far no one
has posted any replies.
Thanks for taking the time to answer my question.
22 years ago

My question is which directory in TOMCAT should I put the GIF files that the Servlet uses.
My Tomcat is installed at c:\jak-tomcat
I copy the Servlet classes ( e.g. Serv01.class ) to
c:\jak-tomcat\webapps\ROOT\WEB-INF\classes
I access the Servlet using
http://localhost:8080/servlet/Serv01
If I want to include a GIF file ( pic01.gif ) as part of the HTML that the Servlet (Serv01) generates, what is the path for SRC parameter in IMG tag and where should I place the GIF, in the directory structure ?.
Thanks
John
22 years ago

I guess I should have phrased my earlier question properly.
My question was which directory in TOMCAT should I put the GIF files that the Servlet uses.
My Tomcat is installed at c:\jak-tomcat
I copy the Servlet classes ( e.g. Serv01.class ) to
c:\jak-tomcat\webapps\ROOT\WEB-INF\classes
I access the Servlet using
http://localhost:8080/servlet/Serv01
My question is, in the HTML that the Servlet (Serv01) generates, if I want to include a GIF file ( pic01.gif ) as part of a IMG tag could someone please tell me how to code the path for SRC parameter ?.
Thanks
John

22 years ago
My Tomcat is installed at c:\jak-tomcat
I copy the Servlet classes ( e.g. Serv01.class ) to
c:\jak-tomcat\webapps\ROOT\WEB-INF\classes
I access the Servlet using
http://localhost:8080/servlet/Serv01
I am able access static HTML pages (e.g. main.html) using
http://localhost:8080/main.html
My question is, in the HTML that the Servlet (Serv01) generates, if I want to include a GIF file ( pic01.gif ) as part of a IMG tag could someone please tell me how to code the path for SRC parameter ?. I am looking for
<IMG SRC ='What goes here'>
Thanks.