ASP重定向隐藏参数没有形式把jsp [英] ASP to redirect to jsp with hidden parameters without form

查看:116
本文介绍了ASP重定向隐藏参数没有形式把jsp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP页那里是它被传递到用JSP另一个域中的链接。
我需要通过从ASP页JSP页面参数,但它应该由用户被抓被隐藏。
在JSP页面中另一边,我会检索参数,并相应地使用它。我怎样才能做到这一点?

I have a ASP page where there is a link which is passed to another domain written in JSP. I need to pass a parameter from ASP page to JSP page but it should be hidden from being caught by user. On other side in JSP page I will retrieve the parameter and use it accordingly. How can I achieve this?

推荐答案

您可以做一个的 WebRequest的在.NET页面JSP页面,设置任何你需要在服务器端JSP,然后重定向到一个JSP URL与服务器端的状态已经到位。

You could do a WebRequest in the .NET page to the JSP page, set whatever you need on the server side JSP, then redirect to a JSP URL with the server side state already in place.

// Create a request for the URL.        
WebRequest request = WebRequest.Create ("http://www.contoso.com/default.html");
// If required by the server, set the credentials.
request.Credentials = CredentialCache.DefaultCredentials;
// Get the response.
HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
// Display the status.
Console.WriteLine (response.StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream ();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader (dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd ();
// Display the content.
Console.WriteLine (responseFromServer);
// Cleanup the streams and the response.
reader.Close ();
dataStream.Close ();
response.Close ();

//redirect after

这篇关于ASP重定向隐藏参数没有形式把jsp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆