Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Error in sample proxy servlet

 
rajesh anguraj
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all,
I have implemented a simple proxy servlet. My requirement is whenever a call is made to the servlet , the servlet must make a http call to the particular site, make a request for the content and then display the same in the browser.
At present i am able to fetch the html content, but i am facing problem in retrieving the sources such as .js,.css files and also the alignment of the site is totally wrong.
The code that i use in the servlet is as follows:

Kindly help me in retrieving the entire content of the site and in displaying it. How can i retrieve the entire content for all the sites the user requests.

Regards,
A.Rajesh
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.
 
rajesh anguraj
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
Thanks, for the response.I am sorry, i didnt know about the code tags. I have modified the post and put it in a new thread.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Which I have closed. Please continue in this topic.
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
Rajesh,

Please let people know when you are cross posting to other sites. The problem and a probable solution is discussed in this thread at sun (sorry oracle ) forum here.

cheers,
ram.
 
    Bookmark Topic Watch Topic
  • New Topic