Recently, struts2 is used to locate all the data in the database and display it on the page. However, a button/connection must be used to trigger the action call.
I found some methods on the Internet and tried it myself. It is simple and
The biggest advantage of using annotations to configure actions is that zero configuration can be implemented, but transactions have both advantages and disadvantages. This makes it easier to use and maintain.
To use annotation, we must add an
Data garbled during form submission:For get method submission:Find the server. xml in the conf folder under the tomcat installation path, and click Add URIEncoding = "UTF-8". See the red text section.ConnectionTimeout = "20000"RedirectPort = "8443"
Variable value:
Output a variable value to the JSP page:
dddd
Debug Struts2.0 page Parameters
View plain
H 15:36:01
what does this sentence mean?
Where does mgrLevel variable come from?
Li 15:36:25
Er...
In the background action
H 15:
1. Introduce the dwr. jar package to lib in the project. 2. Configure dwr in web. xml as follows:
dwr-invoker
org. directwebremoting. servlet. DwrServlet
scriptCompressed
false
dwr-invoker
/dwr/*
3. Create a dwr. xml, and the
Programming: using the HttpSessionListener listener interface to listen to the current number of online usersRequirements:(1) Compile a class to implement the HttpSessionListener interface. In the public void sessionCreated (HttpSessionEvent se)
As the project progresses, I realized that 80% of the time will be spent on 20% of the features.
Improve the product as a developer to lay the foundation for product launch.Let's look at mature products, especially products of large companies, and
Struts and JSF/Tapestry both belong to the presentation layer framework. These two frameworks belong to different properties. The latter is an event-driven component model, while Struts is only a simple MVC model framework, foreigners are always
1. Nine implicit JSP objects (built-in objects)RequestResponseSessionApplicationConfigPageExceptionOutPageContext
2. Briefly describe the values of each attribute of the page command.
Import attribute: the unique attribute allowed to appear multiple
Objective: to call another program after an Action is successful.Struts2.xml[Html]Http://struts.apache.org/dtds/struts-2.0.dtd> --> Www.2cto.com/jsp/uploadresult. jsp analysisAction /jsp/uploadresult. jsp --> /jsp/Upload. jsp /jsp/error. jsp 4096
I have finally finished writing ~~ ^_^: During this period, I gave my colleagues a training course and wrote it once. The advantage of speaking it once again is that I have deepened my understanding of messages, events, and observer patterns.
For
Instance: Now, a parameter named username is passed to the action on the jsp page.
Url: http: // localhost: 8080/StudentSystem/role_list.action? Username = 1321312
1. get it through the get set Method
Define a variable with the same name in the
Built-in object (also known as implicit object, with nine built-in objects): You can use it in script code and expressions without pre-declaration.
1-out:
Javax. servlet. jsp. JspWriter type, representing the object of the output stream. Scope: page
Struts and spring integration first need to automatically assemble the ApplicationContext configuration information when the Web container is started. You can imagine that the corresponding configuration should be made in web. xml:[Html]
JSP TechnologyJSP OriginIn many dynamic web pages, most of the content is fixed, and only some content needs to be dynamically generated and changed.If the Servlet program is used to output webpages with only some content that needs to be
JSP custom tagOverview of custom JSP labelsA custom JSP tag is a type of JSP tag defined by the programmer. This tag encapsulates the information display logic in a separate Java class and describes its usage through an XML file. When you need to
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