Since both languages are used, we have to compare them. Let's first look at JAVA Implementation and then PHP, of course, there are many implementation methods, especially JAVA, for the implementation of the same function is definitely much more than
For details about how to use the jsp image Verification Code under Struts, refer to another article html "> jsp image verification code. The principle is to generate a four-digit Verification Code randomly, write it into the Session, and generate an
Js Code Feeds Lorem ipsum dolor sit amet, consectetuer adipiscing elit News Lorem ipsum dolor sit amet, consectetuer adipiscing elit Shopping Lorem ipsum dolor sit amet, consectetuer adipiscing elit Links Lorem ipsum dolor sit amet,
JQuery's selector is incredibly powerful. Here is a simple summary of common element search methods.
Java code$ ("# MyELement") Select the element whose id value is equal to myElement. The id value cannot be repeated. Only one id value in the
Servlet Page code: @ each request generates a token (usually a timestamp), which is stored in the session and submitted with hidden, in the servlet, check whether the received tokens are consistent with those in the session to determine whether
1. Jsp labels are the logical business functions provided, so you can avoid writing java code in jsp. The main labels are
Other jsp files can be included in double quotation marks.
jump to the tab jump page. You can directly add
You can
1. Use of simple labels
1) use custom tags to control whether the page content (TAG body) is output
Public void doTag () throws JspException, IOException {
// JspFragment jf = this. getJspBody ();
// Jf. invoke (null );
// Equivalent to jf.
Request object in jsp: The request object can be used not only to set and obtain request range variables, but also to obtain client request parameters, request sources, headers, cookies, and so on. GetParameter () method to obtain the client request
[Java]Response. setContentType ("application/x-download"); // set it to download application/x-downloadString filedownload = "/file name to be downloaded"; // relative path of the file to be downloadedString filedisplay = "the name of the file to be
1. array listVar arr = ["zx", "123", "4.7"];Each array has the length attribute.
Var arr = [1, 5];The empty element is undefeated.
Var arr = ["x +" + 1, 12.3];The array element can be an expression.
Var arr = [[1, 2], "hello", "3.8"];Array elements
There are three different ways to use assumerver Pages to process XML documents. Each method helps improve the level of separating Page code from XML data, it simplifies the development of web pages and improves the reusability of components and
Bean-related standard actions:
Jsp: useBean action automatically creates a person attribute when there is no person attribute, and assigns it null
Jsp: useBean body: www.2cto.com
When jsp: setProperty is in the jsp: useBean body, attributes are set
Today, when using Struts2, the running always prompts There is no Action mapped for namespace/and action name.According to the prompt, it can be determined that such action does not exist in the namespace.However, the configuration is correct after
1. demonstrate traditional custom labels (earlier than jsp2.0)
Use custom tags to control whether the page content (TAG body) is output, and use the doStartTag () return value to control
Return this. SKIP_BODY; // ignore the label body.
Return this.
Runtime Environment: myeclipse8.6 + jboss5.1 + jvm1.6 first look at the final directory structure: directly on the source code: complexFormTag. jsp: [html] complex example of using form labels doubleselect label example : If Struts2
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