In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to achieve page value transfer in JSP, the editor thinks it is very practical, so share it for you to do a reference, I hope you can get something after reading this article.
The interface of Alipay is being adjusted this week. During this period, we need to transfer the parameters (transaction amount) processed by our program to the interface of Alipay in accordance with the prescribed format. Because we have to design our program to deal with some data, it is not convenient to pass the value directly. After thinking about it, I decided to first submit our data to webwork's Action for processing, that is, to operate the database; then pass the transaction amount and other parameters needed by Alipay interface to a JSP page, and let this JSP page point the action directly to Alipay's gateway interface. Note: this JSP page is not displayed in the intermediate process. To do this, do the following tests: set up two JSP pages to pass values, tes1.jsp and test2.jsp. The code is as follows:
>
MyJSP'test1.jsp'startingpagetitle >
Functionexecute () {
Varobj=document.getElementById ("name")
Document.form1.action= "alipay/test2.jsp?param=" + obj.value
Document.form1.submit ()
}
Script >
Head >
Test the values passed by JSP pages
Td >
Tr >
Table >
Form >
Body >
Html >
The code for tset2.jsp is as follows:
> MyJSP'test2.jsp'startingpagetitle > head > body > html >
The specific ideas are as follows:
In the JSP page value test1.jsp, the value in the text box is obtained by JavaScript, so that the test1.jsp performs the page jump as soon as it is loaded.
In the JSP page passing the value test2.jsp, you can get the value passed by test1.jsp through request.getParameter ("parameter name");.
On "JSP how to achieve page value" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.