It is quite handy to handle exceptions in struts, whether it's struts1 or struts2, and configuring global exceptions is OK ~
To print out the exception information in the page:
The processing method in Struts1:
Direct use of tags in struts2:
:
For JSP many people like to use El Expressions to value or to pass values, because it is very simple and convenient.
But for its specific to pass the value of the use of the method is not very familiar, then the blogger to introduce the expression
1. Enctype= "Multipart/form-data" attribute must be added to the label
For example:
2. You must have the name attribute in the label
For example:
3. Code in Action:
Boolean p=true;//whether to use the default pictureDiskfileitemfactory
Click on the page a delete button, pop-up ok dialog box, OK, the page will jump to the delselect.jsp page to perform the deletion of the data in the database, after the successful execution and automatically jump to a page. In the process and for
SetAttribute (String name,object): Sets the parameter value of the request named name
GetAttribute (String name): Returns the property value specified by name
Getattributenames (): Returns a collection of names for all properties of the request
Instance: Now the JSP page passes a parameter named username to the action
Url:http://localhost:8080/studentsystem/role_list.action?username=qk12333.com
first, the Get Set method is used to obtain
Define a variable with the same name in the
The previous system has been equipped with JSP's operating environment, then Google came to some information, today, the process of their own record down.
1. Development environment Configuration
1.1 Download Java SDK and Tomcat
Javase SDK download
One: Integration Simple steps
1, download Ueditor file
Download Address
2, add Jar pack
Open the downloaded file, as shown below, to add the jar package below Jsp-lib to the Lib folder under the project's Web-inf
3, Import source files
Create a
How does a normal button in a JSP submit a formA normal button How to manually submit this form of the operation Ah!It's best to simply use code to demonstrateMethod 1:
Method 2:
Method 3:
The last one is more flexible, for example, the
Servlet: Of course, in the servlet, the general jump occurs in Doget, Dopost and other methods.1) Redirect WayResponse.sendredirect ("/a.jsp");The path to the page is the relative path. Sendredirect can jump to any page, not necessarily limited to
(i) Control of file types
This is just a demonstration of the type of picture control, other controls need to see webroot/fckeditor/editor/dialog/below the corresponding JS file
fckeditor.properties Writing Reference fckeditor-java-core-2.4.1.jar/
This article from: Click to open the link
Accustomed to the JS frame ext,jquery and so on. Suddenly to use JSP+CSS to achieve the effect of the label page, suddenly do not adapt to the internet so a bit to find a good way to achieve, now quote:
Method 1. The following procedure executes the Opentheindexpage () method telecommunications Data Collection system
Method 2: Can be the following, but the effect is less than Method 1. function name ();
the second one can only
(i) Options for FCKeditor controls Select retention
This is the case by default.
By modifying this, here is what I want, and of course you can choose according to your needs.
Specific documents you can go to read
Request
Abstruct string getattribute (string name) {}//Returns the property value of the specified name
abstract void setattribute (String name,object Object) {}//substitution value
Abstract enumeration Getattributenames () {}//Gets the names of all
What is JavaBean
Bean from the practical value is to be used as a data model, that is, to render the template of the JSP page, when the business code and JSP code to separate, improve the view and processing code reuse, that is, the so-called MVC
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