This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Access ASP response from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Access ASP response from JSP" Watch "Access ASP response from JSP" New topic

Access ASP response from JSP

Sanjaya KasthuriArachchi

Joined: Feb 06, 2001
Posts: 5
I have a small proble. I want to access the response of a ASP page through a JSP page. Actually what happened is, for my project some of my friends have done a dynamic menu using a ASP page. So I was asked to use the same menu for my system. I am developing the system using JSP pages. So I want to get the same menu in to my page. I can do that If I can get the Response of that ASP Page. I tried to use tha "include" and "<jsp:include" but didn't work. If someone can give a clue, that will be a big help. Thanks in advance.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Since the ASP page has to be interpreted by a web server, you have to go through the web server to get the output. I think you could create a URLConnection to the server, addressing the ASP page, and slurp up the response. It will be a complete HTML page so you will have to cut out all the HTML you don't need.
I would certainly suggest you start by trying to do that from a freestanding application, NOT a JSP page.
Maybe it would be easier to recode the dynamic menu into Java methods in a Bean.

author of:
Sanjaya KasthuriArachchi

Joined: Feb 06, 2001
Posts: 5
Thank you very much for the info. I'll follow your guide-lines.
I agree. Here's the link:
subject: Access ASP response from JSP
It's not a secret anymore!