This post is about a common question asked in java-
How to read page source of a website ? or how to get html source of an url?
so for that there is a simple piece of code to read html source of a webpage using it's url, and i have added af:richTextEditor (ADF Faces component for ricj text formatting) to show html form of url source
- I have a page with one input text to capture url entered by user, a button to fetch html source of that webpage and a af:richTextEditor to show source code in editing mode and in html mode
- See how to get webpage source from an url using java and save it to a html file (download a webpage ), Bind inputText and richInputText to managed bean and craete a actionListener on button to get source
- now click on button and see , here i am getting source code of this blog http://oracleadf-java.blogspot.in/
- now switch RichTextMode to see html preview of this source, it is exactly looking like live webpage, it shows one can practice in this ADF Faces's rickTextEditor to learn html tags
- and see in D drive of your system a file named web-content created , it contains whole source of this webpage