Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Need to emulate browser behviour from a java class

Thread view: 
shacoof@gmail.com - 26 Oct 2005 10:47 GMT
I am trying to use the URL class in order to emulate browser behavior.
the scenario I'm working on is as follow :
call a web-application - page a
read page a , inside the page I find an <img src=.../some-servlet>
I just need the img so I write just this tag to the out stream (e.g.
the html that the page create).
When the browser get the html with the img tag it perform the call, but
the img is not returned properly.
I believe that this is happening because the application return data
using cookies mechanism or something like that, this data is lost
because it didn't pass to the html.

How can I solve the problem ?
Roedy Green - 26 Oct 2005 11:18 GMT
>I am trying to use the URL class in order to emulate browser behavior.
>the scenario I'm working on is as follow :
[quoted text clipped - 9 lines]
>
>How can I solve the problem ?

The general way to solve the problem is to get a packet sniffer and
watch you browser solve them. Then you emulate what it does.

See http://mindprod.com/jgloss/sniffer.html
http://mindprod.com/jgloss/cgi.html
http://mindprod.com/jgloss/screenscraping.html
http://mindprod.com/jgloss/http.html

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.