Hi Doug, Response inline Thanks...Ram
Parsons Technical Services wrote:
Ram,
Are the images served out ok on other pages?
Images are not being served at all in any page.
As a test can you serve out a static page from the same folder the gif is in?
In fact, I brought up the Tomcat index.jsp locally when only the webserver is running (without connection to the internet) and even that doesn't display the images.
When you say it is making the round trip, please explain what or how you know this.
I am debugging the servlet and the connected java application. When the gif is included in the page, the process displays the page and comes right back to my break-point in the java code. When I remove the gif, the page waits for a user to respond (the way one would expect Http to behave) and comes back to my code only when I click on one of the buttons on the page.
Is it possible that when you see the round trip, you are actually seeing the browser request for the image?
It is possible. Actually, that is what is may be happening. How can I make the browser not come to the servlet but go and pick up the file from the directory. I am using only one servlet (a single URL) and I route the process through request attribute in the HTTP request. I have done that with JBoss in the past and it worked fine. In this application, I am not using any app server.
I think there is a config in Apache to direct where the static resources are picked up from. I am not able to figure out where this configuration should be done for Tomcat. Or maybe it is not a configuration issue at all.
Doug
----- Original Message ----- From: "Ram Sriram" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Friday, December 10, 2004 10:10 PM Subject: Re: Display of Static Resources
Hi Jack,
Thanks for your response.
I understand how HTTP technology works. I have a working application with a Form with form elements including a button. When I do not have a gif in the HTML, the behaviour is what is expected of HTTP. In other words, the displayed page waits for the user to enter data and click on a button that does (in my case) a Post and gets back to the Servlet.
And when things work the way one would expect HTTP to work, I able to pick the Session Info, HttpServletRequest Name/ Value pairs including the button that was clicked on, and the attributes I put in the HttpSession when the servlet sent out the response (to survive the stateless session). All that is working just fine.
The problem I am having is two folds:
* One the gif doesn't get displayed. I have the gif in a directory image within ROOT. The properties on where the image should be displayed gives the correct location. So there is no problem with the HTML getting the correct location for the gif. * The other problem I have is, when I include the image (a gif, and I am having the same problem with a bmp, jpg etc.) the page doesn't wait for the user to respond, but makes the round trip back to the servlet. So even before the user clicks on the button, it comes right back. This problem goes away when I remove the gif from the page
I hope I have stated the problem with a little more clarity this time around.
Thanks...Ram
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dakota Jack wrote:
Hello,
Looks like you need to read an overview of how web based HTTP technology works. Essentially, in the typical and simple case, a request holding name/value pairs in a request object, HttpServletRequest in your case, and other information from the client makes a request and then your application either provides a static HTML page in the HttpServletResponse object or constructs an HTML page dynamically from an HttpServlet or a JSP page, which ultimately is a Servlet as well. Thus, a page never "gets displayed and continues back to the servlet". The page only would return to the servlet if it has a refresh or something akin to that.
Jack
On Fri, 10 Dec 2004 18:10:37 -0800, Ram Sriram <[EMAIL PROTECTED]> wrote:
Hi,
I use jakarta-tomcat-5.0.19 and Apache HTTP Server 2.0.49. I am having
problem displaying static resources such as gif. When I have gif in the
HTML, not only it doesn't display the gif, the page also doesn't wait
for user input. The page gets displayed and continues back to the servlet.
I am using form elements in the page and those gets displayed properly.
When I remove the gif from the page, everything works as expected. I
have a feeling this is some sort of a Tomcat config issue. I am not able
to figure what config it is and how to do the config. I looked at
Web.xml both in the conf directory and webapps\ROOT\WEB-INF directory. I
tried looking up the documentation in the Tomcat site and couldn't get
much help.
I am using XML for data from the server and XSL (and transformation) for
generating the HTML. I don't think it has any impact, but just to
complete the details, I am using Oracle Database with the Oracle Thin
JDBC driver.
Can someone help me solve this problem or point me to some reading
material that I could refer to.
Thanks...Ram
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
