This discussion is archived
2 Replies Latest reply: Apr 12, 2013 6:19 AM by 888525 RSS

Invoke an asp page from Java

888525 Newbie
Currently Being Moderated
Hi ,

I have a scenario where I have an asp page which has various buttons on the asp page.
I want to call this asp page from my Java application which uses swings,applets,servlets.
I am using IIS and weblogic for the Java application.

Once I call the asp page and hit on any button on the asp page the control will transfer to a .NET project which will do the processing as per the user request
and bring back a pdf page.

I can use the below to open the asp page from java

URL urltest = new URl("Location for the asp page");
appletContext.showDocument(urltest,"test");


So will this pdf page automatically show up ?What my concern is how will the interaction between java and .net take place like do I need to maintain the session or something or pass any cookie data? I dont have any ideas how to implement this

Any suggestions ?


thanks,
Thanks,
  • 1. Re: Invoke an asp page from Java
    gimbal2 Guru
    Currently Being Moderated
    885522 wrote:
    Hi ,

    I have a scenario where I have an asp page which has various buttons on the asp page.
    I want to call this asp page from my Java application which uses swings,applets,servlets.
    You don't 'call' asp pages, or php pages, or jsp pages, or whatever web resource you can think of. You make REQUESTS to them, like a browser does. That request will be processed by the webserver and you get a RESPONSE, which you might interpret in some way. A browser for example will parse the content and render it using complex technologies to apply CSS and run javascript. Generally browsers consist of millions of lines of code to be able to do that properly and quickly.
    So will this pdf page automatically show up ?
    What happened when you tried it? If I read the documentation of showDocument(), all it does is open the page in the browser that is currently hosting the applet. If that produces a PDF and the client computer is setup to be able to display PDFs, it will show up yes. Otherwise it will likely trigger a download.

    Communication between two applications, especially those built in two different technologies, generally require a special protocol to be able to exchange information and tasks. Web services (SOAP, RESTful) are a common solution.
  • 2. Re: Invoke an asp page from Java
    888525 Newbie
    Currently Being Moderated
    Thanks for such a good explanation.
    I will think about webservices approach to do this.I think that will be the best as I have to pass a few parameters
    from Java to .Net

    Thanks,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points