This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Translating HTML pages into Java Objects 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
Bookmark "Translating HTML pages into Java Objects" Watch "Translating HTML pages into Java Objects" New topic
Author

Translating HTML pages into Java Objects

Master Rice
Greenhorn

Joined: Aug 05, 2001
Posts: 8
I am a relatively new programmer who is trying to write an application that parses/retrieves information from an HTML page, and extracts relevant parts of the HTML (usually from tables) into Java Strings.
I have heard of javax.swing.text.html.parser. Would this do the job, and if so, can somebody give me some pointers on how to use it. Some simple sample code would be useful, just so that I can work out how to use it.
Thanks, Neil.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
You're in the wrong forum. Try 'XML, XSL, DOM and SAX'
DAYANAND BURAMSHETTY
Ranch Hand

Joined: Aug 06, 2001
Posts: 34
//This is html page
<Html>
<from action="/servlet/xyz">
<input type="text" name="USERID">
</form>
</html>
//servlet
public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException,ServletException{
//This userid getting from html page
String userId=req.getParameter("USERID");
}


Dil se....,<BR>Dayanand<BR>0065-8839071(off)<BR>0065-7547034(Res0
 
Don't get me started about those stupid light bulbs.
 
subject: Translating HTML pages into Java Objects
 
Similar Threads
How to use a Java class into an HTML file
Convert Part Of HTML Table Into EXCEL
Converting HTML into Java code??
Converting HTML into Java objects? Help needed
Reporting Application + JSP