How a JAVA servlet call an remote web page (servlet or html file) then display the content?
-
I need to create a servlet which would make a http request to a remote site. After it gets the content, it would modify the content then display it. For example, once the servlet starts, it will call "XYZ.com/...", and get the content from the "XYZ.com/..." and display the modified content on the browser. IT IS NOT REDIRECTION!!... Since the servlet need to modify the content before display it
-
Answer:
you can use the java.net packaged, use the HttpURLConnection or URL class..
JE at Yahoo! Answers Visit the source
Related Q & A:
- How can I make a dynamic web page in PHP?Best solution by Yahoo! Answers
- How to load a Java web app in the terminal?Best solution by stackoverflow.com
- How to translate a complete web page?Best solution by Server Fault
- How to check if a web page loads?Best solution by Server Fault
- How to convert a HTML file to XML file?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.