Actionform Chinese garbled problem solving method in JSP tutorial
Let's take a look at actionform.
Actionform concept
Actionform is used to encapsulate the user's request parameters, and request parameters are passed through the form fields of
Today, my colleagues from the new energy Test team came to me to see a strange phenomenon. A tomcat application with only a single JSP page, and this JSP page does not have any Java code (want to use this JSP page to test the maximum QPS of a tomcat
Main contents: L Complete other basic functions of shopping cart; l generate orders; L Summary 1, other features of the shopping cart to the shopping Cart item quantity modification and the item deletion function are two outside two basic
JSP Working principle
All JSP pages, when executed, are converted to Servelet (. java) by the server-side JSP engine, and then by the JSP engine invoking the Java compiler, compiling Servelet (. java) into a class file (. Class) and by the Java
String agent = Request.getheader ("user-agent");
StringTokenizer st = new StringTokenizer (agent, ";");
St.nexttoken ();
Get the user's browser name
String userbrowser = St.nexttoken ();
Get the user's operating system name
String Useros =
Method One: The simplest is the most used method <%@ page language="java" pageEncoding="GBK" %>
or
This method is used for Chinese display in JSP pages.
Method Two: Use the filter
Filters are used primarily for form submissions, and data is
The latest simple and practical JSP Dynamic Web site environment to build the detailed steps, according to the internet appears the latest Web server Software UFO build site, tested n times, no problem:
Content tip: Sun's JSP (Java Server Pages) is
A lot of beginners easyui people will encounter such a problem, that is, in the page with the IFRAME tag, when the direct designated SRC page is a Easyui component of the page, when the parent window needs to access the object in the IFRAME, should
This article mainly introduces JSP to get action from the session and session empty and judge, need friends can refer to the following JSP gets the session value from the action there are several ways: For example, I have a session in the
This article mainly introduced in the JSP page to obtain the URL parameter method, the need friend may refer to the nextWhen a URL comes along, such as: Http://localhost:8080/pro/demo/hello.jsp?name=john, on the hello.jsp page, we can get the value
To automatically generate static pages, it is a good idea to intercept JSP requests with filter and preprocess them first to generate HTML automatically. An easy way to think of this is to redirect a servlet after the filter has been intercepted,
Review the JSP script element and annotation section today, the case writes out, everybody oneself debugging, the overall summary is as follows,1, JSP declaration statement:A variable with a declaration statement is a global variable, and multiple
In JSP, we often read data from the database back to the client, but we often in the production of garbled phenomenon, so we can use this method to ensure the correct output of Chinese, Here's an example,Before we catch the value of the form or
Struts+ajax+jsp request to the background garbled problem can be in the AJAX request URL before the parameters to encodeURI () transcoding to solve, encounter a similar situation friends can refer to theThe parameter is encodeURI () transcoding
Two common forms of data storage processing methods
1, for each form to write the appropriate program code
In a JSP page or JavaBean or servlet, use request. The GetParameter () function extracts the data submitted by the form individually, or
Content from http://www.imooc.com/video/28751-1 What is a Web application (04:31)1-2 static Web pages with Dynamic Web pages ... (01:39)1-3 Exercises1-4 Building a Java web development environment ... (05:27)1-5 Tomcat directory structure (03:00)1-6
The Java code in the project is as follows:@RequestMapping ("Readimage") Public voidReadimage (model, httpservletrequest request, httpservletresponse response)throwsioexception{String Magazineid= Request.getparameter ("Magazineid"); String SQL=
If the JSP is not developed using inheritance, but instead uses standard instructions or action elements to include, it is too much repeating code.Rapid-framework is a Google project, you can implement the JSP page inheritance, that is, the writing
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