Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call asp file with java

Status
Not open for further replies.

djabeur

Programmer
Jun 11, 2001
2
FR
I want to know how i call asp file with java
Thanks
 
From what do you need to call the ASP page? A servlet? A JSP page? An applet?
 
I want to call AP page from java application
Thanks
 
an asp page runs from a webserver. your java app runs from the command line. how do you expect your command line to interpret the asp file?? you need the asp output sent to a client browser. therefore you need one of the java programs types listed above.
 
You could try opening IE through JAVA then passing as a parameter the asp file with an associated querystring.
 
If you wanted to read the results of the asp you could open a URL and then open a connection and read the data. For instance, to read this thread you could do:



URL url = new URL(<the asp page with attributes goes here>);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String input = null;
while ((input = in.readLine()) != null)
System.out.println(input);

Which would print out the HTML response of the asp to your console.



Regards,

Charles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top