p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

aspx thread: ASPX to JSP


Message #1 by "cheens2000" <cheens2000@y...> on Wed, 10 Jul 2002 06:36:40
How can values be passed from a aspx page to a jsp page (in different 
servers) and vice versa?
Message #2 by "Chadrick" <chadm@d...> on Wed, 10 Jul 2002 08:05:09 -0400
Web Services or xml might get you what you want. They are platform
independent so calling a web method like ImportVar(variableName) would
do it. There might be an easier way.

-----Original Message-----
From: cheens2000 [mailto:cheens2000@y...] 
Sent: Wednesday, July 10, 2002 6:37 AM
To: ASP+
Subject: [aspx] ASPX to JSP

How can values be passed from a aspx page to a jsp page (in different 
servers) and vice versa?



Message #3 by Feduke Cntr Charles R <FedukeCR@m...> on Wed, 10 Jul 2002 08:59:50 -0400
	Yeah, it doesn't get any easier than using XML (SOAP - simple object
access protocol I think).  Java and .NET both support it.

- Chuck

-----Original Message-----
From: Chadrick [mailto:chadm@d...]
Sent: Wednesday, July 10, 2002 8:05 AM
To: ASP+
Subject: [aspx] RE: ASPX to JSP


Web Services or xml might get you what you want. They are platform
independent so calling a web method like ImportVar(variableName) would
do it. There might be an easier way.

-----Original Message-----
From: cheens2000 [mailto:cheens2000@y...] 
Sent: Wednesday, July 10, 2002 6:37 AM
To: ASP+
Subject: [aspx] ASPX to JSP

How can values be passed from a aspx page to a jsp page (in different 
servers) and vice versa?




Message #4 by "Subraya Hegde" <subrayah@i...> on Thu, 11 Jul 2002 09:54:29 +0530
Hi,

   It's simple. Use a querystring to pass the value.

   For example,  to pass the data entered in the textbox of the check.aspx
page to a
JSP page (sample.jsp) running in the default root of a JRUN server,  write
the code
like this.


ASPX page

<%@ Page Language="C#" %>
<script language="C#" runat="server">
   void btnSubmit_Click(Object sender, EventArgs e)

      string strCode = txtCode.Text;
      Response.Redirect("http://localhost:8100/Sample.jsp?code=" + strCode);
   }
</script>
<HTML>
<HEAD>
<TITLE>Sample</TITLE>
</HEAD>
<BODY>
<CENTER>
<FORM method="POST" RUNAT="Server">
   <h3><font face="Verdana">ASPX Page</font></h3>
        <BR>
        <TABLE>
            <TR><TD>Enter Code:</TD><TD><ASP:Textbox Id="txtCode"
Runat="server"/></TD></TR>
            <TR><TD><ASP:Button id="btnSubmit" Text="<<<Pass>>>"
OnClick="btnSubmit_Click" Runat="server"/></TD></TR>
        </TABLE>
</FORM>
</CENTER>
</BODY>
</HTML>


JSP Page

<%
   out.println("Code Entered = " + request.getParameter("code"));
%>


Happy Programming,
-HegdeS

Message #5 by "Chadrick" <chadm@d...> on Thu, 11 Jul 2002 11:52:53 -0400
Now your just making things too easy ;)

-----Original Message-----
From: Subraya Hegde [mailto:subrayah@i...] 
Sent: Thursday, July 11, 2002 12:24 AM
To: ASP+
Subject: [aspx] RE: ASPX to JSP

Hi,

   It's simple. Use a querystring to pass the value.

   For example,  to pass the data entered in the textbox of the
check.aspx
page to a
JSP page (sample.jsp) running in the default root of a JRUN server,
write
the code
like this.


ASPX page

<%@ Page Language="C#" %>
<script language="C#" runat="server">
   void btnSubmit_Click(Object sender, EventArgs e)

      string strCode = txtCode.Text;
      Response.Redirect("http://localhost:8100/Sample.jsp?code=" +
strCode);
   }
</script>
<HTML>
<HEAD>
<TITLE>Sample</TITLE>
</HEAD>
<BODY>
<CENTER>
<FORM method="POST" RUNAT="Server">
   <h3><font face="Verdana">ASPX Page</font></h3>
        <BR>
        <TABLE>
            <TR><TD>Enter Code:</TD><TD><ASP:Textbox Id="txtCode"
Runat="server"/></TD></TR>
            <TR><TD><ASP:Button id="btnSubmit" Text="<<<Pass>>>"
OnClick="btnSubmit_Click" Runat="server"/></TD></TR>
        </TABLE>
</FORM>
</CENTER>
</BODY>
</HTML>


JSP Page

<%
   out.println("Code Entered = " + request.getParameter("code"));
%>


Happy Programming,
-HegdeS






  Return to Index