In jsp learning, variables on the other jsp page are often called on one jsp page. The following is a summary of the learning over the past few days.
There are multiple methods to call variables between jsp pages:
1. Get parameters through the
There are several methods for jsp to obtain the session value from the action:
For example, there is a session ("sessionid", "sessionValue") in my action ")
1. Obtain it using the struts Tag:
Ii. session is also one of the built-in objects and
Access or add request/session/application1. Use ActionContext// Place it like thisPublic String execute (){ActionContext ctx = ActionContext. getContext ();Ctx. getApplication (). put ("app", "lll ");Ctx. getSession (). put ("ses", "session range ");
Due to the introduction of package commands and other processing in JSP, the source code of the rendered page contains many line breaks. There are many ways to solve the problem in the past, such as 1. Pay attention to the format in the source code,
Preface
This document describes how to use Tomcat as the j2ee container and Sqlserver2005 as the database. Struts version 2.3.15.3Struts Introduction
Struts is an open-source project sponsored by the Apache Software Foundation (ASF. Struts is an
When a url comes in, such as http: // localhost: 8080/pro/demo/hello. jsp? Name = john. On the hello. jsp page, we can get the name value as follows:Copy codeThe Code is as follows:String path = request. getContextPath ();String basePath = request.
1. dynamically register beans with spring in some special scenarios2. spring version 2.5.6
Copy codeThe Code is as follows:Public class ServiceServiceImpl implements ServiceService, ApplicationContextAware {
@ OverridePublic void
Unlike the compilation command, the compilation command notifies the Servlet engine to process messages, and the Action Command is only a script action during running. The compilation command works when compiling JSP into Servlet: The processing
header name . The names of the headers that were last clicked on the page are compared with the names of the headers of this click, if the two are the same, they are arranged in the reverse order. Otherwise, the new columns are listed in ascending
Preface
This document describes how to use Tomcat as the j2ee container and Sqlserver2005 as the database. Struts version 2.3.15.3 and Spring version 3.2.5
Spring Introduction
Spring is also an open-source project under appache. The powerful
Possible reasons why the Struts2 verification framework does not work1. Whether the name complies with the Conventions:-Validation. xml-- Validation. xml2. Check whether the validation. xml tag is correct, such as whether to disable all tags and
1. the jsp sends a value to the action. The jsp sends the value to the action.
1. form submission method
2. href Method
"> Delete
Ii. Pass a value to the action in jsp. method accepted by the action
1. Define form attributes in the Action class.
Previously, JSP table template upgrade (1) -- Dynamic specifying methods and parameters using Java reflection has implemented dynamic specifying specific business methods, achieving a certain degree of reusability, however, in actual use, a list
In the past, I only knew that spring has an IOC mechanism. Recently, I checked the source code of struts2 and found that struts2 also provided this mechanism. So I wrote an example to test it. I didn't expect it to be a good one. This example is
DebuggingInterceptor: the interceptor processes the seventh position of defaultStack. It can be called for debugging. I personally think that although the interceptor contains the most code, it is the most useless Interceptor. This interceptor
ScopedModelDrivenInterceptor: the interceptor is in the eighth position of defaultStack. Its main function is to retrieve the corresponding model settings from the specified scope to the Action. This class has three related attributes: scope: where
The StrutsConversionErrorInterceptor interceptor is at the position of defastack stack 16th and is used to handle type conversion errors. The interceptor inherits from ConversionErrorInterceptor and most of its functional logic is in
In the past, the web Development page layer was basically used. Recently, the webpage Layer Technology of the company's java project was velocity. I heard that jsp is going to be eliminated, and I do not know whether it is true or false, but I still
To implement JSONP cross-origin access, you must first understand what is cross-origin? What is the relationship between JSONP and JSON? 1. What is cross-origin? Cross-Domain simply means that the program under one domain name interacts with the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service