• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

http response problem

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using out object of PrintWriter class to write response message to the client m/c.but some of the clients are unable to see it.[I am using css,javascript and content[html] objects and passing them to response by out.println()]but from some clients' browser it is not seen.i.e no login page is shown.I have inspected my code and sure that code written for showing login html is correctly called and executed.I am confused because some clients are able to see the login page but some are not.Is it due to some problem related to printwriter class[out object] which is unable to write the response back to the HttpResponse object?
Please reply soon... to my mail bunty.nil@gmail.com or here.
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Souvik,

What did the clients see ? any error ? blank page ? whats the view source of it?



.I am confused because some clients are able to see the login page but some are not.Is it due to some problem related to printwriter class[out object] which is unable to write the response back to the HttpResponse object?



It cant be. response writer behaves same for all client
 
Souvik Basu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
client is getting blank page and waiting for long to get any response.After few minutes browser is showing timeout error.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

There are many cases to be evaluated.. check logs for any errors ? app log , context log or SOP .
if logs are fine , then issue can be only sorted through brainstorming questions..
What browsers do they use ? do they same clients alternate behavior? or is the problem with same clients.
 
Souvik Basu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
problem is with the client .not with the browser.Some client can access it peacefully.but some are not.Is it due to firewall issue which drops the response object?
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

firewall wouldn't allow the site itself to be accessed.

problem is with the client .not with the browser.



What do you mean by client then?

 
Souvik Basu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
client means those who are accessing the application.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One possible cause of a blank page is failure to flush and close the output stream. Your client browser may be waiting for the final chunk of output - which it never gets because you didnt close the output stream.

Bill
 
Souvik Basu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this happens then it must be same for all the clients. Right? but some client can access without any problem.and some are not.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If this happens then it must be same for all the clients. Right?



Only if they are using identical browsers with identical settings performing identical requests.

Did you actually check your code to see if all possible paths result in closing the output stream? Did you check the logs for errors? Did you "view source" to see if any output has been received? When you have experienced servlet developers giving suggestions, you should follow up.


Bill
 
Souvik Basu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes all of them are using same browsers.But don't know about the settings.Yes output streams are closed.Those who are not been able to access,when they try to "view source" nothing is showing [probably nothing is responded back].Is it possible that due to some difference in settings browsers will behave differently?If it is so, then please tell me what to do to change the settings.And this problem is occurring mainly in the corporate access.Is it due to the fact that corporate firewall setting is blocking our response?
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would expect a corporate firewall to prevent the request from going through in the first place - once the request has been allowed, the response should be allowed, assuming everything is HTTP requests on port 80.

client is getting blank page and waiting for long to get any response.After few minutes browser is showing timeout error.



Perhaps your code is throwing an exception which is not being properly recorded. I have yet to see where you examined all the log files and found no errors.

Am I correct in assuming that this "login page" does not involve database access for the initial display?

Bill
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Souvik Basu wrote:Yes all of them are using same browsers.But don't know about the settings.Yes output streams are closed.Those who are not been able to access,when they try to "view source" nothing is showing [probably nothing is responded back].Is it possible that due to some difference in settings browsers will behave differently?If it is so, then please tell me what to do to change the settings.And this problem is occurring mainly in the corporate access.Is it due to the fact that corporate firewall setting is blocking our response?



If you still suspect firewall , access simple html and see if you get the complete html page , then there is no issue with firewall , but with the browser settings..
 
reply
    Bookmark Topic Watch Topic
  • New Topic