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
Copy codeThe Code is as follows:// Filter classPublic class EcondingFilter implements Filter {Private String charset = null;Private ServletContext context = null;Private String path = "";/*** Store data in a local file before destruction*/Public
In the past few days, we have encountered a problem in the design of JSP message boards. First read one:
This is a picture taken randomly on a news page. If there are too many messages, the entire page would have to be long and long, which directly
The initial space (-Xms) is 1/64 of the physical memory, and the maximum space (-Xmx) is 1/4 of the physical memory.You can use options such as-Xmn-Xms-Xmx provided by JVM to set
Example:Copy codeThe Code is as follows:JAVA_OPTS =
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
1. advantages of using the window. print () method: support for multiple browsers disadvantages: cancel printing, hide unnecessary printing information, and then display it in a complicated way. You can print the current page
2. Use third-party
Like starting struts2, it also has an entry, that is, the doFilter method of org. apache. struts2.dispatcher. ng. filter. StrutsPrepareAndExecuteFilter.
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws
Displaying with jstl is more neat and less code than displaying with jsp
SearchRetrieval time:
Total number of records:
" escapeXml="false" />
The
Entries
Title:
Date:
1 because struct2 functions such as file upload and data verification are all set by the system's defaultThe interceptor in defalutStack is implemented, so we define that the interceptor must reference the default defalutStackIn this way, other
When js processes json data returned by the api, it prompts a Unexpected token ILLEGAL error. In this case, it is easy to directly output js and find that there is a line break.
It is a matter of sauce. An interface returns JSON data, and I will
1. java is the code that runs on the server side. jsp is run on the server servlet, while javascript and html are the code that runs on the browser side. Therefore, the order of loading and execution is java> jsp> js.
2. Loading Sequence of js in
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
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.
Learn With your mind
Struts tag definition taglib
Set the Development Mode devmode in Struts. xml
Set the default encoding in Struts. xml
The Struts. xml file contains other modules.
Mark error in
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
The JSTL tag is used today.
When redirecting a tag, I encountered a very bad problem, that is, when I test the tag, I want to test other content, because it is redirected (the browser address will change), it will certainly affect my subsequent
Use jsp to achieve the most basic page flip:
Search
"); Out. println (" Total number of records: "+ intRowCount +""+""); Int PgFirst = (intPage-1) * 20 + 1; // The first entry of the number of pages to be displayed List articleList =
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