File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Error in sample proxy servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

Error in sample proxy servlet

rajesh anguraj
Greenhorn

Joined: Feb 06, 2008
Posts: 15
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

Joined: Jan 10, 2002
Posts: 60041
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
rajesh anguraj
Greenhorn

Joined: Feb 06, 2008
Posts: 15
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

Joined: Jan 10, 2002
Posts: 60041
    
  65

Which I have closed. Please continue in this topic.
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in sample proxy servlet
 
Similar Threads
Sample proxy servlet
Can't access aspx page from Apache HTTPClient
how to acces a remote servlet from a java client?????
Can a servlet architecture download a file?
Servlet redirect to another server