Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Webpage source code
Joined: Feb 09, 2006
Apr 07, 2006 13:01:00
Is there any way to get a webpages source code using jsp? For example I want my jsp page to get the source code of lets say
and write it to a file, how can I do this? thanks.
Joined: Sep 23, 2004
Apr 07, 2006 13:25:00
Your best bet would be to look at
Apache Commons HttpClient
library. This makes it very simple to get a URL. It also handles things like cookies and authentication.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Joined: Mar 22, 2005
Apr 07, 2006 13:40:00
And of you want to process the page you got, have a look into HttpUnit (on SourceForge), which will give you a DOM view of the page. That way you can use the DOM API or
to get at the contents of the page.
Ping & DNS, my free Android app for network diagnostics
subject: Webpage source code
Server URL call issues in jsp/struts
Q for Kathy & Bert
"Type mismatch: cannot convert from Cookie to String"
Creating Java classes on fly
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013