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
When writing Chinese characters in the JSP input box to the background, garbled characters often occur:
Today, I read a video from instructor Han shunping, got a preliminary understanding of the Garbled text, and wrote it out through my own
The struts2 interceptor is one of the core functions of the struts framework. First, the automatic data filling function implemented by the struts framework is implemented by the interceptor. Here we will summarize the experiences of the blocker
Sometimes we unify the style of the website, so we can separate the header and footer of the website, and reference the header and foot of other pages, but in practice, we often like to use html format because of footer. In this way, we will
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
It is more convenient to use components to upload images in JSP, but as a beginner, I still want to train my hands first and start from a trivial matter.
You can upload images in either of the following ways: Save the image to a directory on 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)
1. Create a new project and add a package under the src folder, for example, tianaoweb.com;
2. Add a class to the package:
Package com;Public class test {Public String sd (){Return "sd ";}}
3. introduce it at the beginning of the default homepage
1. request object
The request information of the client is encapsulated in the request object, so that the client can understand the customer's requirements and then respond. It is an instance of the HttpServletRequest class.
Serial number method
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
JSP permission control source code
By accident, I learned a piece of code when I first learned Java many years ago. Maybe I can't write it now. If the technology is so popular, it will move back if it is not in progress. It's still good to be young,
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
I have been working on the final project recently, so I have encountered many problems and solved them. I will write them here to share with you ....
After one morning, I thought about it myself, and referred to some things, I made the database
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
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