A total of nine such objects are pre-defined in JSP: request, response, session, application, out, pagecontext, config, page, exception1. The request object is javax. servlet. httpServletRequest objects. This object represents the client request
Jsp tag technology is very practical. This is not the case, so it will be used for internships at the company. I use a jsp label to encapsulate jqGrid (a table plug-in of jQuery). Using a select statement, I can automatically build a table and
1. Basic concepts of requests and responses in JSP 1.1: when a user enters a URL in a browser and submits or submits a form, a request is created and sent to the server. Response: when the server receives a user's request, it performs corresponding
Nv. jsp uses javascript to display lower-level menus on the page "> My JSP 'nv. jsp 'starting page Main Menu dwr. configure the ajax class and bean to be used in the xml configuration file. ajax
Examples of directory login Difference Time Property Verification Mechanism ------------------------------------------------------------------------------ in Struts1, we often contact ActionForm as a static ActionForm. Static means that the
First: override the validate method of ActionForm. In actionForm, form verification is required rather than business verification. For example, the user name is not empty, the password is a number, and the date is in the time format. In the validate
1. The request parameters on the request page need to be transcoded using encodeURI, and Character Set conversion is required on the page receiving the request. The character set of the request and receive page in this example are both UTF-8: 1. the
1: The property value in the output action is displayed on the jsp page with: 2: to automatically add sequence numbers on the page, use the index attribute eg: // inOoutAccountList must have the getting and setting methods 3: Obtain the
Sp initiates a request. Actionform encapsulates request parameters. Action accepts the request and receives the encapsulated actionfromaction to call the service. After the service is processed by the business logic, it then calls DAO (or directly
The s tag of the Struts2 framework is used here.
Name = name executeResult configured in struts. xml must be set to false. Does this attribute contain the returned result page,
If the returned result page is also the current page, it will be
When I made a project today, garbled characters appeared. I submitted the form to the background to receive the garbled data and checked the configuration items.
Solution:
1. Configure In struts. xml
Result: The error is still garbled. It seems
JSP custom tag. The part between the start and end tags of a custom tag is the Body ).
Tag handler class: defines the behavior of a tag and calls and executes it when the JSP Engine encounters a custom tag.
Tag library Descriptor (TLD) file:
Get reference of Map type request, session, application, actual type HttpServletRequest, HttpSession, and ServletContext:
First three: dependent on Containers
First three: IOC (only this type)
The following three: dependent on Containers
Third:
This function is better when there are many Struts configuration files that need to be divided or separated into multiple configuration files.
Use the label to introduce other configuration files to the Struts. xml configuration file.
For example,
1. Comparison of the Action Implementation class: Struts 1 requires the Action class to continue with an abstract base class; a specific problem of Struts 1 is the use of abstract class programming rather than interfaces. Struts 2 Action class can
The Sales class of the vo package: package com. vo; public class Sales {public String salestime; public float salesnum; public String getSalestime () {return salestime;} public void setSalestime (String salestime) {this. salestime = salestime;}
Initial solution of JSP web page Programming
JSP is one of the most important parts in today's Web development. It is a part of the direct and customer interface. JSP is especially important for commercial software.
1. Introduction to JSP
JSP is
1. Create a javaweb project and copy the struts jar package to WebRoot/WEB-INF/lib.
2. The jar package cannot be copied. the user's request must reach the ActionServlet before processing the request through struts. Therefore, the ActionServlet
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