Re: Display of Static Resources

2004-12-16 Thread Ben Souther
form method=POST action=com.client.BizDispatcher

Take the package name out of the action attribute.
form method=POST action=BizDispatcher



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display of Static Resources

2004-12-16 Thread Ram Sriram
Thanks guys for the help. The issue got resolved once I changed the POST 
action value to be the same as the value in the pattern.

Just to make sure I understand the web.xml config better and to make 
sure I do the right thing in the future when I have to add additional 
servlets or such:

   * servlet name tag in the servlet tag and servlet-mapping tag should
 be the same.
   * The value of the url-pattern, welcome-file and the action value in
 the form tag should be all the same
   * I should have one set of servlet, servlet-mapping and welcome file
 for every servlet I use
   * I should never use / as a pattern because that is what Tomcat
 uses for static resources.
   * Can I have a url-pattern /foobar/foo2bar?
Please correct me if any of the above is wrong.
Thanks...Ram
---
Mike Curwen wrote:
but it's more than just take away the package.  

If you map your servlet to this:
url-pattern/foobar/url-pattern
then your form should say :
form method=POST action=foobar
(I just didn't want anyone to think that you invoke a servlet by calling
it's class name).
so in fact, you want bizDispathcer (no capital b). 


 

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 16, 2004 5:57 AM
To: Tomcat Users List
Subject: Re: Display of Static Resources

form method=POST action=com.client.BizDispatcher
Take the package name out of the action attribute.
form method=POST action=BizDispatcher

-
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]

 



Re: Display of Static Resources

2004-12-16 Thread Ben Souther
 * servlet name tag in the servlet tag and servlet-mapping tag should
   be the same.
Yes the servlet tag in web.xml is where you define the servlet's name.


 * The value of the url-pattern, welcome-file and the action value in
  the form tag should be all the same
Yes, the url-pattern in the mapping tag of your web.xml file defines the
string that a browser would need to send in order to invoke your
servlet.

 * I should have one set of servlet, servlet-mapping and welcome file
   for every servlet I use
NO.  The welcome file is the default file.  (ex:  index.html, or
index.jsp)  If you want your servlet to be the default servlet for your
app, this is where to set it up.



 * I should never use / as a pattern because that is what Tomcat
   uses for static resources.
Yes.  (unless you want to handle all the default behavior..)


 * Can I have a url-pattern /foobar/foo2bar?
Yes.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Display of Static Resources

2004-12-16 Thread Mike Curwen
but it's more than just take away the package.  

If you map your servlet to this:
url-pattern/foobar/url-pattern

then your form should say :
form method=POST action=foobar

(I just didn't want anyone to think that you invoke a servlet by calling
it's class name).
 
so in fact, you want bizDispathcer (no capital b). 



 -Original Message-
 From: Ben Souther [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, December 16, 2004 5:57 AM
 To: Tomcat Users List
 Subject: Re: Display of Static Resources
 
 
 form method=POST action=com.client.BizDispatcher
 
 Take the package name out of the action attribute.
 form method=POST action=BizDispatcher
 
 
 
 -
 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]


Re: Display of Static Resources

2004-12-16 Thread Ram Sriram
Thank-you.
Ben Souther wrote:
   * servlet name tag in the servlet tag and servlet-mapping tag should
 be the same.
   

Yes the servlet tag in web.xml is where you define the servlet's name.
 

   * The value of the url-pattern, welcome-file and the action value in
the form tag should be all the same
   

Yes, the url-pattern in the mapping tag of your web.xml file defines the
string that a browser would need to send in order to invoke your
servlet.
 

   * I should have one set of servlet, servlet-mapping and welcome file
 for every servlet I use
   

NO.  The welcome file is the default file.  (ex:  index.html, or
index.jsp)  If you want your servlet to be the default servlet for your
app, this is where to set it up.

 

   * I should never use / as a pattern because that is what Tomcat
 uses for static resources.
   

Yes.  (unless you want to handle all the default behavior..)
 

   * Can I have a url-pattern /foobar/foo2bar?
   

Yes.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 



Re: Display of Static Resources

2004-12-15 Thread Ram Sriram
Hi,
The problem for static resources went away. But now http is not able to 
find the servlet class when I click on the button on the form. This used 
to work before I changed the config in web.xml. So I am assuming this 
problem is related to what I have done in web.xml.
Here is what is happening:

   * on http//localhost:8080, http invokes com.client.BizDispatcher.
   * The servlet constructs a login page and sends it to the browser.
   * Among other things, the login page has 2 submit, one login and
 the other cancel.
   * The form tag is as follows:
 o form method=POST action=com.client.BizDispatcher
   * I enter the user ID and password and click on the Login submit
 button.
   * I get a servlet error that says it is not able to find
 /com.client.BizDispatcher.
Have I done something wrong in the config?
   * Here are the entries in my web.xml under ROOT\WEB-INF:
 
 ?xml version=1.0 encoding=ISO-8859-1?
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
   display-nameWelcome to Tomcat/display-name
   description
  Welcome to Tomcat
   /description
 !-- JSPC servlet mappings start --
 servlet
 servlet-nameorg.apache.jsp.index_jsp/servlet-name
 servlet-classorg.apache.jsp.index_jsp/servlet-class
 /servlet
 servlet
 servlet-namebizDispatcher/servlet-name

 servlet-classbizDNA.bizClient.bizBrowserClient.BizDispatcher/servlet-class
 /servlet

 servlet-mapping
 servlet-nameorg.apache.jsp.index_jsp/servlet-name
 url-pattern/index.jsp/url-pattern
 /servlet-mapping
 servlet-mapping
 servlet-namebizDispatcher/servlet-name
 url-pattern/bizDispatcher/url-pattern
 /servlet-mapping
 !-- JSPC servlet mappings end --
 welcome-file-list
 welcome-filebizDispatcher/welcome-file
 welcome-fileindex.html/welcome-file
 welcome-fileindex.htm/welcome-file
 welcome-fileindex.jsp/welcome-file
 /welcome-file-list
 /web-app
  

Thanks...Ram
-
Ram Sriram wrote:
Hi,
Thanks for all the help everyone. The problem is solved.
Having my servlet mapped to / pattern was the problem. I changed the 
pattern for my servlet and added the entry in the welcome-file-list 
and the static resources show up and the page waits for the user 
response even with a gif image in the page.
Once again, thanks for all the help to all you guys who made valuable 
suggestions.
Thanks...Ram
--- 

Ben Souther wrote:
On Sat, 2004-12-11 at 15:52, Mike Curwen wrote:
 

you've named it 'myweb.xml', just so we can tell the attachments 
apart, or
is it actually named myweb.xml?  If the latter, change it to web.xml.

And having your servlet mapped to / is most likely the problem.
The default servlet is the one that Tomcat uses to serve up static
resources.  So either change your servlet to handle static resources 
or (way
better option), map your servlet to a pattern other than /, and then
change your web form accordingly.
  

Yes, If you don't want to have to type the name of the servlet-mapping
in the URL, create a welcome file listing with the same name as your 
url-pattern. (Servlet Spec 2.4 and up)

   servlet
 servlet-namebizDispatcher/servlet-name
 servlet-classcom.client.BizDispatcher/servlet-class
   /servlet
   servlet-mapping
 servlet-namebizDispatcher/servlet-name
 url-pattern/bizDispatcher/url-pattern
   /servlet-mapping
   welcome-file-list
 welcome-filebizDispatcher/welcome-file
 welcome-fileindex.html/welcome-file
 welcome-fileindex.jsp/welcome-file
   /welcome-file-list
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




Re: Display of Static Resources

2004-12-11 Thread Ben Souther
Looks like you've edited the global web.xml file instead of creating
your own under your app.

Do you have a web.xml file under YOUR_APP/WEB-INF/?

On Sat, 2004-12-11 at 11:02, Ram Sriram wrote:
 Doug,
 attached is the web.xml. This is the one from the conf directory.
 I do not have (or not aware of) any mappings other than what is there in 
 the web.xml.
 I have not configured any filters or valves
 Thanks...Ram
 
 Parsons Technical Services wrote:
 
  Ram,
 
  Post your web.xml. Only the active parts, leave out the factory comment
  sections.
 
  Also what are your mappings like?
 
  Also did you configure any filters or valves?
 
  Doug
 
 
 
  - Original Message - From: Ram Sriram [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]; 
  [EMAIL PROTECTED]
  Sent: Saturday, December 11, 2004 12:01 AM
  Subject: Re: Display of Static Resources
 
 
  Doug,
  This is what I did. I stopped Apache; I don't that made any 
  difference. I was the application on port 8080 anyways. I put a 
  static HTML page in the same directory as the image (and tried it 
  from the ROOT directory as well). When I access the html 
  (http://localhost:8080/image/test.html or 
  http://localhost:8080/test.html), the request is directed to the 
  servlet and I see the request coming through the break point in my 
  java code. So very clearly, even request for static resource is 
  being directed to the servlet.
  I think your suspicion something is wrong with config is correct. Do 
  you want me to send you the web.xml so you could see what is wrong 
  with the config.
  I have not done any config for the static resource at all; is there 
  any config I need to do?
  Thanks...Ram
  -
   
 
 
  Parsons Technical Services wrote:
 
  Are the images served out ok on other pages?
 
 
 
  Images are not being served at all in any page.
 
  This makes me think you have a configuration issue that is pointing 
  all content to your servlet other than *.jsp.
 
  Have you tried running Tomcat without Apache? And is there a reason 
  you need Apache?
 
  If you haven't disabled it or after reenabling it try your app on 
  http://localhost:8080
 
  If it still will not serve the pictures post your config files for 
  Tomcat. Something is sending all the request for the images to your 
  servlet or at least not allowing them to make it to the proper folder.
 
 
  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.
 
  Stick a JSP file in the image folder along with a html page and see 
  if they will serve. If they will, but the image will not you have a 
  config issue.
 
 
  I haven't used JSPs in a while so I am not able to do this at this time
 
 
 
  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.
 
  I am taking this to mean the code of your servlet.
 
 
  yes. the java code the servlet is invoking.
 
 
 
 
  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.
 
 
  As I do not run Apache, I am lost when it comes to it's config 
  files. But for now let's talk directly to Tomcat to take this out 
  of the picture.
 
 
  One last comment, you asked about serving static content in Tomcat, 
  understand that the static items in the app are served from the 
  same place as the jsps or subfolders. If you want several apps to 
  use a common source of static content, such as the images, this is 
  a whole different matter.
 
  But for now lets put out one fire at a time.
 
  Doug

Re: Display of Static Resources

2004-12-11 Thread Ram Sriram
I have edited the web.xml in conf directory. I have put my class 
directories under ROOT\WEB-INF and the image and params directories 
under ROOT.
I did not edit the web.xml under ROOT\WEB-INF.
I am pretty strong on Java, servlet, XML, XSL HTML etc. but weak on 
infrastructure stuff such as Tomcat. Would appreciate some advice and 
help here
-
Ben Souther wrote:

Looks like you've edited the global web.xml file instead of creating
your own under your app.
Do you have a web.xml file under YOUR_APP/WEB-INF/?
On Sat, 2004-12-11 at 11:02, Ram Sriram wrote:
 

Doug,
attached is the web.xml. This is the one from the conf directory.
I do not have (or not aware of) any mappings other than what is there in 
the web.xml.
I have not configured any filters or valves
Thanks...Ram

Parsons Technical Services wrote:
   

Ram,
Post your web.xml. Only the active parts, leave out the factory comment
sections.
Also what are your mappings like?
Also did you configure any filters or valves?
Doug
 

- Original Message - From: Ram Sriram [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; 
[EMAIL PROTECTED]
Sent: Saturday, December 11, 2004 12:01 AM
Subject: Re: Display of Static Resources

   

Doug,
This is what I did. I stopped Apache; I don't that made any 
difference. I was the application on port 8080 anyways. I put a 
static HTML page in the same directory as the image (and tried it 
from the ROOT directory as well). When I access the html 
(http://localhost:8080/image/test.html or 
http://localhost:8080/test.html), the request is directed to the 
servlet and I see the request coming through the break point in my 
java code. So very clearly, even request for static resource is 
being directed to the servlet.
I think your suspicion something is wrong with config is correct. Do 
you want me to send you the web.xml so you could see what is wrong 
with the config.
I have not done any config for the static resource at all; is there 
any config I need to do?
Thanks...Ram
- 

Parsons Technical Services wrote:
 

Are the images served out ok on other pages?
   

Images are not being served at all in any page.
 

This makes me think you have a configuration issue that is pointing 
all content to your servlet other than *.jsp.

Have you tried running Tomcat without Apache? And is there a reason 
you need Apache?

If you haven't disabled it or after reenabling it try your app on 
http://localhost:8080

If it still will not serve the pictures post your config files for 
Tomcat. Something is sending all the request for the images to your 
servlet or at least not allowing them to make it to the proper folder.

   

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.

 

Stick a JSP file in the image folder along with a html page and see 
if they will serve. If they will, but the image will not you have a 
config issue.
   

I haven't used JSPs in a while so I am not able to do this at this time
 

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.

 

I am taking this to mean the code of your servlet.
   

yes. the java code the servlet is invoking.
 

   

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.

 

As I do not run Apache, I am lost when it comes to it's config 
files. But for now let's talk directly to Tomcat to take this out 
of the picture.

One last comment, you

Re: Display of Static Resources

2004-12-11 Thread Ben Souther
For the most part, you should never need to edit the global web.xml file
(the one under conf).  Each app has it's own web.xml file stored under
it's WEB-INF directory.

Try removing your entries from the global one and put your
servlet/mapping into the one under WEB-INF.




My suspicion is that the problem is right here:
!-- The mapping for the default servlet --
servlet-mapping
servlet-namedefault/servlet-name
url-pattern//url-pattern
/servlet-mapping

servlet-mapping
  servlet-namebizDispatcher/servlet-name
  url-pattern//url-pattern
/servlet-mapping

You have two mappings to the same url-pattern.


Try that and see if it clears things up.





On Sat, 2004-12-11 at 12:38, Ram Sriram wrote:
 I have edited the web.xml in conf directory. I have put my class 
 directories under ROOT\WEB-INF and the image and params directories 
 under ROOT.
 I did not edit the web.xml under ROOT\WEB-INF.
 I am pretty strong on Java, servlet, XML, XSL HTML etc. but weak on 
 infrastructure stuff such as Tomcat. Would appreciate some advice and 
 help here
 -
 Ben Souther wrote:
 
 Looks like you've edited the global web.xml file instead of creating
 your own under your app.
 
 Do you have a web.xml file under YOUR_APP/WEB-INF/?
 
 On Sat, 2004-12-11 at 11:02, Ram Sriram wrote:
   
 
 Doug,
 attached is the web.xml. This is the one from the conf directory.
 I do not have (or not aware of) any mappings other than what is there in 
 the web.xml.
 I have not configured any filters or valves
 Thanks...Ram
 
 Parsons Technical Services wrote:
 
 
 
 Ram,
 
 Post your web.xml. Only the active parts, leave out the factory comment
 sections.
 
 Also what are your mappings like?
 
 Also did you configure any filters or valves?
 
 Doug
 
 
   
 
 - Original Message - From: Ram Sriram [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]; 
 [EMAIL PROTECTED]
 Sent: Saturday, December 11, 2004 12:01 AM
 Subject: Re: Display of Static Resources
 
 
 
 
 Doug,
 This is what I did. I stopped Apache; I don't that made any 
 difference. I was the application on port 8080 anyways. I put a 
 static HTML page in the same directory as the image (and tried it 
 from the ROOT directory as well). When I access the html 
 (http://localhost:8080/image/test.html or 
 http://localhost:8080/test.html), the request is directed to the 
 servlet and I see the request coming through the break point in my 
 java code. So very clearly, even request for static resource is 
 being directed to the servlet.
 I think your suspicion something is wrong with config is correct. Do 
 you want me to send you the web.xml so you could see what is wrong 
 with the config.
 I have not done any config for the static resource at all; is there 
 any config I need to do?
 Thanks...Ram
 -
  
 
 
 Parsons Technical Services wrote:
 
   
 
 Are the images served out ok on other pages?
 
 
 
 Images are not being served at all in any page.
 
   
 
 This makes me think you have a configuration issue that is pointing 
 all content to your servlet other than *.jsp.
 
 Have you tried running Tomcat without Apache? And is there a reason 
 you need Apache?
 
 If you haven't disabled it or after reenabling it try your app on 
 http://localhost:8080
 
 If it still will not serve the pictures post your config files for 
 Tomcat. Something is sending all the request for the images to your 
 servlet or at least not allowing them to make it to the proper folder.
 
 
 
 
 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.
 
   
 
 Stick a JSP file in the image folder along with a html page and see 
 if they will serve. If they will, but the image will not you have a 
 config issue.
 
 
 I haven't used JSPs in a while so I am not able to do this at this time
 
   
 
 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.
 
   
 
 I am taking this to mean the code of your servlet.
 
 
 yes. the java code the servlet is invoking

RE: Display of Static Resources

2004-12-11 Thread Mike Curwen
you've named it 'myweb.xml', just so we can tell the attachments apart, or
is it actually named myweb.xml?  If the latter, change it to web.xml.
 
And having your servlet mapped to / is most likely the problem.
 
The default servlet is the one that Tomcat uses to serve up static
resources.  So either change your servlet to handle static resources or (way
better option), map your servlet to a pattern other than /, and then
change your web form accordingly.
 

-Original Message-
From: Ram Sriram [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 11, 2004 1:10 PM
To: Tomcat Users List
Subject: Re: Display of Static Resources


Ben,
I removed all my application specific entries in web.xml under conf and
moved those to the web.xml under ROOT\WEB-INF. I am attaching both the
web.xml files. One under the WEB-INF is called myweb.xml. I am not sure if I
have reverted the global web.xml to its original state; I may not have.
I tried out with these changes; there is no change in the behavior. When I
start test.html, it still takes me to my servlet. index.jsp still doesn't
display graphics.
Thanks...Ram


 



RE: Display of Static Resources

2004-12-11 Thread Ben Souther
On Sat, 2004-12-11 at 15:52, Mike Curwen wrote:
 you've named it 'myweb.xml', just so we can tell the attachments apart, or
 is it actually named myweb.xml?  If the latter, change it to web.xml.
  
 And having your servlet mapped to / is most likely the problem.
  
 The default servlet is the one that Tomcat uses to serve up static
 resources.  So either change your servlet to handle static resources or (way
 better option), map your servlet to a pattern other than /, and then
 change your web form accordingly.

Yes, If you don't want to have to type the name of the servlet-mapping
in the URL, create a welcome file listing with the same name as your 
url-pattern. (Servlet Spec 2.4 and up)


servlet
  servlet-namebizDispatcher/servlet-name
  servlet-classcom.client.BizDispatcher/servlet-class
/servlet

servlet-mapping
  servlet-namebizDispatcher/servlet-name
  url-pattern/bizDispatcher/url-pattern
/servlet-mapping

welcome-file-list
  welcome-filebizDispatcher/welcome-file
  welcome-fileindex.html/welcome-file
  welcome-fileindex.jsp/welcome-file
/welcome-file-list


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display of Static Resources

2004-12-11 Thread Ram Sriram
Hi,
Thanks for all the help everyone. The problem is solved.
Having my servlet mapped to / pattern was the problem. I changed the 
pattern for my servlet and added the entry in the welcome-file-list and 
the static resources show up and the page waits for the user response 
even with a gif image in the page.
Once again, thanks for all the help to all you guys who made valuable 
suggestions.
Thanks...Ram
---

Ben Souther wrote:
On Sat, 2004-12-11 at 15:52, Mike Curwen wrote:
 

you've named it 'myweb.xml', just so we can tell the attachments apart, or
is it actually named myweb.xml?  If the latter, change it to web.xml.
And having your servlet mapped to / is most likely the problem.
The default servlet is the one that Tomcat uses to serve up static
resources.  So either change your servlet to handle static resources or (way
better option), map your servlet to a pattern other than /, and then
change your web form accordingly.
   

Yes, If you don't want to have to type the name of the servlet-mapping
in the URL, create a welcome file listing with the same name as your 
url-pattern. (Servlet Spec 2.4 and up)

   servlet
 servlet-namebizDispatcher/servlet-name
 servlet-classcom.client.BizDispatcher/servlet-class
   /servlet
   servlet-mapping
 servlet-namebizDispatcher/servlet-name
 url-pattern/bizDispatcher/url-pattern
   /servlet-mapping
   welcome-file-list
 welcome-filebizDispatcher/welcome-file
 welcome-fileindex.html/welcome-file
 welcome-fileindex.jsp/welcome-file
   /welcome-file-list
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 



Re: Display of Static Resources

2004-12-11 Thread Parsons Technical Services
Ram,
Post your web.xml. Only the active parts, leave out the factory comment
sections.
Also what are your mappings like?
Also did you configure any filters or valves?
Doug

- Original Message - 
From: Ram Sriram [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; 
[EMAIL PROTECTED]
Sent: Saturday, December 11, 2004 12:01 AM
Subject: Re: Display of Static Resources


Doug,
This is what I did. I stopped Apache; I don't that made any difference. I 
was the application on port 8080 anyways. I put a static HTML page in the 
same directory as the image (and tried it from the ROOT directory as 
well). When I access the html (http://localhost:8080/image/test.html or 
http://localhost:8080/test.html), the request is directed to the servlet 
and I see the request coming through the break point in my java code. So 
very clearly, even request for static resource is being directed to the 
servlet.
I think your suspicion something is wrong with config is correct. Do you 
want me to send you the web.xml so you could see what is wrong with the 
config.
I have not done any config for the static resource at all; is there any 
config I need to do?
Thanks...Ram
-

Parsons Technical Services wrote:
Are the images served out ok on other pages?

Images are not being served at all in any page.
This makes me think you have a configuration issue that is pointing all 
content to your servlet other than *.jsp.

Have you tried running Tomcat without Apache? And is there a reason you 
need Apache?

If you haven't disabled it or after reenabling it try your app on 
http://localhost:8080

If it still will not serve the pictures post your config files for 
Tomcat. Something is sending all the request for the images to your 
servlet or at least not allowing them to make it to the proper folder.


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.

Stick a JSP file in the image folder along with a html page and see if 
they will serve. If they will, but the image will not you have a config 
issue.
I haven't used JSPs in a while so I am not able to do this at this time

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.

I am taking this to mean the code of your servlet.
yes. the java code the servlet is invoking.

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.

As I do not run Apache, I am lost when it comes to it's config files. 
But for now let's talk directly to Tomcat to take this out of the 
picture.

One last comment, you asked about serving static content in Tomcat, 
understand that the static items in the app are served from the same 
place as the jsps or subfolders. If you want several apps to use a 
common source of static content, such as the images, this is a whole 
different matter.

But for now lets put out one fire at a time.
Doug

-
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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Display of Static Resources

2004-12-11 Thread Parsons Technical Services
- Original Message - 
From: Ram Sriram [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; 
[EMAIL PROTECTED]
Sent: Saturday, December 11, 2004 12:01 AM
Subject: Re: Display of Static Resources


Doug,
This is what I did. I stopped Apache; I don't that made any difference. I 
was the application on port 8080 anyways. I put a static HTML page in the 
same directory as the image (and tried it from the ROOT directory as 
well). When I access the html (http://localhost:8080/image/test.html or 
http://localhost:8080/test.html), the request is directed to the servlet 
and I see the request coming through the break point in my java code. So 
very clearly, even request for static resource is being directed to the 
servlet.
I think your suspicion something is wrong with config is correct. Do you 
want me to send you the web.xml so you could see what is wrong with the 
config.
I have not done any config for the static resource at all; is there any 
config I need to do?
Thanks...Ram
-

Parsons Technical Services wrote:
Are the images served out ok on other pages?

Images are not being served at all in any page.
This makes me think you have a configuration issue that is pointing all 
content to your servlet other than *.jsp.

Have you tried running Tomcat without Apache? And is there a reason you 
need Apache?

If you haven't disabled it or after reenabling it try your app on 
http://localhost:8080

If it still will not serve the pictures post your config files for 
Tomcat. Something is sending all the request for the images to your 
servlet or at least not allowing them to make it to the proper folder.


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.

Stick a JSP file in the image folder along with a html page and see if 
they will serve. If they will, but the image will not you have a config 
issue.
I haven't used JSPs in a while so I am not able to do this at this time

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.

I am taking this to mean the code of your servlet.
yes. the java code the servlet is invoking.

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.

As I do not run Apache, I am lost when it comes to it's config files. But 
for now let's talk directly to Tomcat to take this out of the picture.

One last comment, you asked about serving static content in Tomcat, 
understand that the static items in the app are served from the same 
place as the jsps or subfolders. If you want several apps to use a common 
source of static content, such as the images, this is a whole different 
matter.

But for now lets put out one fire at a time.
Doug

-
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]


Re: Display of Static Resources

2004-12-11 Thread Ram Sriram
Doug,
attached is the web.xml. This is the one from the conf directory.
I do not have (or not aware of) any mappings other than what is there in 
the web.xml.
I have not configured any filters or valves
Thanks...Ram

Parsons Technical Services wrote:
Ram,
Post your web.xml. Only the active parts, leave out the factory comment
sections.
Also what are your mappings like?
Also did you configure any filters or valves?
Doug

- Original Message - From: Ram Sriram [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; 
[EMAIL PROTECTED]
Sent: Saturday, December 11, 2004 12:01 AM
Subject: Re: Display of Static Resources


Doug,
This is what I did. I stopped Apache; I don't that made any 
difference. I was the application on port 8080 anyways. I put a 
static HTML page in the same directory as the image (and tried it 
from the ROOT directory as well). When I access the html 
(http://localhost:8080/image/test.html or 
http://localhost:8080/test.html), the request is directed to the 
servlet and I see the request coming through the break point in my 
java code. So very clearly, even request for static resource is 
being directed to the servlet.
I think your suspicion something is wrong with config is correct. Do 
you want me to send you the web.xml so you could see what is wrong 
with the config.
I have not done any config for the static resource at all; is there 
any config I need to do?
Thanks...Ram
- 

Parsons Technical Services wrote:
Are the images served out ok on other pages?

Images are not being served at all in any page.
This makes me think you have a configuration issue that is pointing 
all content to your servlet other than *.jsp.

Have you tried running Tomcat without Apache? And is there a reason 
you need Apache?

If you haven't disabled it or after reenabling it try your app on 
http://localhost:8080

If it still will not serve the pictures post your config files for 
Tomcat. Something is sending all the request for the images to your 
servlet or at least not allowing them to make it to the proper folder.


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.

Stick a JSP file in the image folder along with a html page and see 
if they will serve. If they will, but the image will not you have a 
config issue.

I haven't used JSPs in a while so I am not able to do this at this time

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.

I am taking this to mean the code of your servlet.

yes. the java code the servlet is invoking.

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.

As I do not run Apache, I am lost when it comes to it's config 
files. But for now let's talk directly to Tomcat to take this out 
of the picture.

One last comment, you asked about serving static content in Tomcat, 
understand that the static items in the app are served from the 
same place as the jsps or subfolders. If you want several apps to 
use a common source of static content, such as the images, this is 
a whole different matter.

But for now lets put out one fire at a time.
Doug

-
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

Re: Display of Static Resources

2004-12-10 Thread Dakota Jack
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]
 
 


-- 


You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display of Static Resources

2004-12-10 Thread Ram Sriram
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]
   


 



Re: Display of Static Resources

2004-12-10 Thread Parsons Technical Services
Ram,
Are the images served out ok on other pages?
As a test can you serve out a static page from the same folder the gif is 
in?

When you say it is making the round trip, please explain what or how you 
know this.

Is it possible that when you see the round trip, you are actually seeing the 
browser request for the image?

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]


Re: Display of Static Resources

2004-12-10 Thread Ram Sriram
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

Re: Display of Static Resources

2004-12-10 Thread Ram Sriram
Doug,
This is what I did. I stopped Apache; I don't that made any difference. 
I was the application on port 8080 anyways. I put a static HTML page in 
the same directory as the image (and tried it from the ROOT directory as 
well). When I access the html (http://localhost:8080/image/test.html or 
http://localhost:8080/test.html), the request is directed to the servlet 
and I see the request coming through the break point in my java code. So 
very clearly, even request for static resource is being directed to the 
servlet.
I think your suspicion something is wrong with config is correct. Do you 
want me to send you the web.xml so you could see what is wrong with the 
config.
I have not done any config for the static resource at all; is there any 
config I need to do?
Thanks...Ram
-

Parsons Technical Services wrote:
Are the images served out ok on other pages?

Images are not being served at all in any page.
This makes me think you have a configuration issue that is pointing 
all content to your servlet other than *.jsp.

Have you tried running Tomcat without Apache? And is there a reason 
you need Apache?

If you haven't disabled it or after reenabling it try your app on 
http://localhost:8080

If it still will not serve the pictures post your config files for 
Tomcat. Something is sending all the request for the images to your 
servlet or at least not allowing them to make it to the proper folder.


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.

Stick a JSP file in the image folder along with a html page and see if 
they will serve. If they will, but the image will not you have a 
config issue.
I haven't used JSPs in a while so I am not able to do this at this time

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.

I am taking this to mean the code of your servlet.
yes. the java code the servlet is invoking.

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.

As I do not run Apache, I am lost when it comes to it's config files. 
But for now let's talk directly to Tomcat to take this out of the 
picture.

One last comment, you asked about serving static content in Tomcat, 
understand that the static items in the app are served from the same 
place as the jsps or subfolders. If you want several apps to use a 
common source of static content, such as the images, this is a whole 
different matter.

But for now lets put out one fire at a time.
Doug

-
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]


Re: Display of Static Resources

2004-12-10 Thread Parsons Technical Services
Are the images served out ok on other pages?
Images are not being served at all in any page.
This makes me think you have a configuration issue that is pointing all 
content to your servlet other than *.jsp.

Have you tried running Tomcat without Apache? And is there a reason you need 
Apache?

If you haven't disabled it or after reenabling it try your app on 
http://localhost:8080

If it still will not serve the pictures post your config files for Tomcat. 
Something is sending all the request for the images to your servlet or at 
least not allowing them to make it to the proper folder.


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.

Stick a JSP file in the image folder along with a html page and see if they 
will serve. If they will, but the image will not you have a config issue.

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.

I am taking this to mean the code of your servlet.

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.

As I do not run Apache, I am lost when it comes to it's config files. But 
for now let's talk directly to Tomcat to take this out of the picture.

One last comment, you asked about serving static content in Tomcat, 
understand that the static items in the app are served from the same place 
as the jsps or subfolders. If you want several apps to use a common source 
of static content, such as the images, this is a whole different matter.

But for now lets put out one fire at a time.
Doug

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]