From Servlet to JSP, from Model1 to Model2

Servlet technology and JSP technology are two main technologies used to develop Web applications using Java language. In 1996, Sun released Servlet technology for the first time to solve the performance problems in Web applications. When the Servlet

Struts2 change the default resulttype

Recently, I encountered a small requirement. I want to set the resultType returned by some actions to freemarker by default. I first wanted to configure the global result on the action, and then use an expression for the name, and then type =

Jsp NULL pointer

Java. lang. nullPointerException at org. apache. jsp. index_jsp. _ jspInit (index_jsp.java: 22) may be caused by many reasons. The most important reason is that the jar package in your project conflicts with the jar package in release, many

Summary of struts2 interceptor implementation

1. inherit the AbstractInterceptor class or implement the interceptor interface. Because AbstractInterceptor is the implementation class of interceptor, the general methods in the interface are implemented, but they are used to inherit

Struts2 -- struts. xml

[Html] --> /Namespace. jsp /Namespace. jsp www.2cto.com description: the package is equivalent to the java package, struts. multiple packages with different names can exist in xml. [html] extends is equivalent to the inheritance

Notes on JSP principles (II)

JSP script elements: expressions, Scriptlet. The conceptual expression of the Declaration expression represents data, the system calculates and displays the expression as a value on the JSP page. Demo code: [html] jsp expression demo JSP

Simple JSP page display

1. mysql limit keyword (DAO) Select * from tablename limit startPoint, numberPerPage; Tablename is the name of the table to be displayed by page; StartPoint is the starting position-1; NumberPerPage is the number of entries displayed on a

Filter filters handle Chinese garbled characters

Note: When learning to use the selvert filter to process Chinese garbled characters, UTF-8 is used to process Chinese garbled Characters During filter configuration initialization, while gbk is used in the submitted jsp page. Although the two types

JSF -- J2EE Presentation Layer Technology

JavaServer Faces (JSF) is a new standard Java framework used to build Web applications. It provides a component-centric method for developing Java Web user interfaces, which simplifies development. JavaServer Faces has also aroused the interest of

Struts2 File Upload instance

Struts2 does not provide its own request parser. That is to say, struts2 does not process multipart/form-data requests by itself. It needs to call other request Resolvers, parse the form fields in the HTTP request. However, struts2 further

Two jump methods and differences in jsp

// Note: Chinese file names such as "target page. jsp" are not recommended. 1. response jump: // Jump with session and without request (client jump)Responst. sendRedirect ("target page. jsp "); 2. forward jump:// Jump with session and request

Struts File Download usage and Chinese name garbled Solution

Struts2 provides both a convenient file upload mechanism and a convenient File Download mechanism. 1. (1) Check the SteamResult class. Need to be configured in strut. xml (2) The two circles correspond to each other. (3) test Download Page

Basic knowledge point of struts1-DispachAction

DispachAction is a dynamic specified Action. That is to say, different request and url parameters at the view layer are intercepted by ActionServlet, And in the struts-config.xml according to the request to get different parameters to specify (CALL)

Wildcards in struts2

, Configure the Action wildcard (wildcard) Use wildcards to minimize the configuration quantity. However, you must abide by the principle that "conventions are better than configurations ". 1. wildcard characters Asterisk (*) indicates all {Number}

The jsp page is converted to the backend with Chinese garbled characters

1.   2. Background System. out. println ("=" + baseSVo. getVName ());String str = baseSVo. getVName ();Try {Str = new String (str. getBytes ("ISO8859-1"), "GBK ");} Catch (UnsupportedEncodingException e ){// TODO Auto-generated catch blockE.

[JSP] use application to count the number of times that all users access a webpage

Because the application object is used to complete the accumulative functions, when (1) the current Wen application is redeployed (2) the Tomcat server restarts the counter and starts counting again. The jsp code is as follows: Insert title

JSP print multiplication table

# Index. jsp: "> My JSP page 9x9 cheng shu "; %> start tomcat server and access the browser: http://127.0.0.1:8080/ Project name /: 9x9 cheng shu 1*1 = 1 2*1 = 2 2 2*2 = 4 3*1 = 3 3*2 = 6 3*3 = 9 4*1 = 4 4*2 = 8 4*3 = 12 4*4 = 1

Working principles of struts2, hibernate, and spring [concise and easy to understand]

Simply put, these three methods encapsulate some common functional methods to normalize these methods, avoiding repeated and fragmented compilation of similar code in jsp development. In other words, struts2 is responsible for processing customer

Relative and absolute paths in JSP/Servlet

Absolute path of the Windows operating system: the path starting from the drive letter, such as the relative path of C: \ windows \ system32 \ cmd.exe: The Path starting from the current path, for example, the current path is C: \ windows: To

Garbled characters appear when exporting EXCEL (HTML format) in JSP

The problem encountered in reality is: Export EXCEL 1. Use UTF-8 encoding only output header, no output data, garbled; when there is data output, it will not garbled. 2. Use GB2312 encoding output with the UTF-8 on the contrary, there are data

Total Pages: 1800 1 .... 1796 1797 1798 1799 1800 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.