1. directive elements: controls the generated servlet structure.
JSP commands are used in the "conversion phase" to provide information about the entire JSP page, affecting the overall structure of the Servlet generated by the JSP page.
The
Because a line of Java code is not used in JSP, labels must be used to remove the displayed Java code. The development process of labels is listed below. 1. First write a java class that implements the tag Interface Package com. bird. web.
To query a database on the JSP page, you can connect to and query the java code section of the database and the html page code section. This page is implemented in three steps
1. Write the database connection code.
2. Write the code used to display
How to put the elephant in the refrigerator this time! Everyone knows this!
We have two main problems to solve:
1. How to obtain the input content
2. How to insert time.
Directly Add code
[Html]String path = request. getContextPath ();String
1. Session Save User NameWe often encounter this situation when surfing the Internet:Automatically log on after successful registrationAfter logging on, remember the user status and display the user name on multiple pages.
In fact, these effects use
In struts1, how does one redirect a request to a specified Action rather than execute? The Code is as follows: jsp code: User name: password: struts-config.xml code: java code: public class LoginAction extends DispatchAction
Urlrewrite, as its name implies, is to rewrite the URL. All users get are URLs that have been processed. I think there are three advantages: 1. improve security, this effectively prevents some parameter names and IDs from being completely exposed to
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
In jsp, if you need to process complex data, defining a java method above is a very effective solution, and pushing the responsibility for processing data to this method, then the main process of the jsp page will not be affected. Of course, you can
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
1. IntroductionTo facilitate Programmer access to common objects, implicit objects are defined in JSP. These objects can be directly used without declaration. When converting from JSP to servlet, they will convert to the corresponding servlet
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
In the page or background response, directly add your file with the file header and write the file stream. For example, if you write on a page like this, you 'd better write it in the background: "> My JSP 'test. jsp 'starting page -->
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
1. cocould not load class Interceptor2/Myinterceptor. Perhaps it exists but certain dependencies are not available? -Interceptor
Solution: log4j. jar is missing.
2. When your action processing class inherits ActionSupport
Public class Reg extends
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