how to invoke perl URL which is running in netscape server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nsrikak
    New Member
    • Jul 2008
    • 5

    how to invoke perl URL which is running in netscape server

    Hi,

    I am Naresh. I am new to jsp technology.

    In my application I need to transfer controle and perameters from JSP to perl program which is running in other port. I dont know how to implement this.

    Could you please help me on this.
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Hello Naresh!

    Can you submit to a database using jsp?

    I am not sure how Perl handles stuff, but if Perl can make available data to be used by other systems, a jsp can get to it.

    Please write if I've missed your point.

    In a bit!

    Dököll

    Comment

    • nsrikak
      New Member
      • Jul 2008
      • 5

      #3
      Hi Dököll,

      Thanks for the response.

      Actually, My question is which command that I have to use to transfer controle from jsp(which is in server A) to Perl part(which is server B). Here Forward command is not working. Is there any special procedure to do this?


      Originally posted by Dököll
      Hello Naresh!

      Can you submit to a database using jsp?

      I am not sure how Perl handles stuff, but if Perl can make available data to be used by other systems, a jsp can get to it.

      Please write if I've missed your point.

      In a bit!

      Dököll

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        If you have the URL of that other page have a look at the URL class; you can
        construct such a URL and ask it for its Stream (which is an input stream to
        your JSP page). Simply read its content and pass it on in your JSP page to
        its own output stream. You need to program a bit of Java for that.

        kind regards,

        Jos

        Comment

        • nsrikak
          New Member
          • Jul 2008
          • 5

          #5
          But here I dont want controle back. I am using request.sendRed irect command. using this I am able to transfer controle to destination page(which is in another port).
          <%response.send Redirect("http://localhost:8080/check1/Success.jsp?xtn 2=9790");%>

          but can i pass dynamic content(here xtn2 variable) to destination page?
          <%response.send Redirect("http://localhost:8080/check1/Success.jsp?xtn 2=<%=xtn2%>");% > it is showing syntax error.

          or is there any other way that i should fallow?

          Could you please help me on this?

          Originally posted by JosAH
          If you have the URL of that other page have a look at the URL class; you can
          construct such a URL and ask it for its Stream (which is an input stream to
          your JSP page). Simply read its content and pass it on in your JSP page to
          its own output stream. You need to program a bit of Java for that.

          kind regards,

          Jos

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            I don't think putting <%=xtn2%> in a String literal makes it translate to the value
            of xtn.

            kind regards,

            Jos

            Comment

            • nsrikak
              New Member
              • Jul 2008
              • 5

              #7
              Hi JosAH,

              Thanks a lot for suggestions.

              Then can you guide me how to transfer controle from jsp to other other page(url which is in other port.).In this case I need to transfer variable, also it will be fine if the value of the variable is not displayed in browser and accessing session variable in destination url.
              Originally posted by JosAH
              I don't think putting <%=xtn2%> in a String literal makes it translate to the value
              of xtn.

              kind regards,

              Jos

              Comment

              • r035198x
                MVP
                • Sep 2006
                • 13225

                #8
                Originally posted by nsrikak
                Hi JosAH,

                Thanks a lot for suggestions.

                Then can you guide me how to transfer controle from jsp to other other page(url which is in other port.).In this case I need to transfer variable, also it will be fine if the value of the variable is not displayed in browser and accessing session variable in destination url.
                Why not use a routing servlet. Submit that JSP to the servlet and then forward to whatever path you want from that servlet.

                Comment

                • nsrikak
                  New Member
                  • Jul 2008
                  • 5

                  #9
                  But in this situation there is no manual trigering like submit button. Then how can I implement routing servlet? If possible Could you please guide me on this?

                  Originally posted by r035198x
                  Why not use a routing servlet. Submit that JSP to the servlet and then forward to whatever path you want from that servlet.

                  Comment

                  Working...