wood burning stoves 2.0*
The moose likes Servlets and the fly likes Reading .asp file from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Reading .asp file from servlet" Watch "Reading .asp file from servlet" New topic
Author

Reading .asp file from servlet

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
does any body know how to read .asp file from a servlet by passing user id information to that file.(.asp file has all the user information)
Please give me the code if anybody knows
thanks
subbu v
Greenhorn

Joined: Oct 17, 2000
Posts: 5
From your servlet code use the url and urlconnection classes , passing the url to the asp page you need to access with the querystring having the userid.. do a read on the url and you will have the entire html output (asp throws back html output after processing the scripts on the server side). Now you can parse the html to have the necessary information in your servlet.. it is very simple and i am sure you should be able to do it.. just remember that i am assuming here that the asp page takes its input (the userid) as a querystring and the html output it throws is of a standard format that is already known to you.. best of luck..
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi
thanks for ur help, do u have the code for this byany chance.
(i am unable to post this with my privious name Kavin, that's why i am using other name)
thank u
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I tried your suggestion of using urlConnection, but it complains about "can't find the asp file". I am using IIS with servletExec as plug in. Is there configration that needs to be done?
 
 
subject: Reading .asp file from servlet
 
Similar Threads
applet and asp
Pass HTTPSession to ASP
help needed with jsp:getProperty
How to submit from ASP to Servlet
Change file name ending for JSP pages