Recently, I learned JSP and encountered Chinese display problems like most beginners. There are two Chinese problems:
(1) The Chinese characters that appear on the page itself. The solution is to add
Or
You can also change the above gb2312 to GBK,
Drop-down list select Dynamic initialization (JSP page)
HtmlCode:
smart fuzzy search only search for content only search for titles & nbsp;
JS script:
Function _ select (O, v ){For (VAR I = 0; I If (O. Options [I]. value = V ){O.
Type = button is simply a Button FunctionType = submit is the sending form
However, people engaged in Web UI should note that using submit to improve the ease of use of pages:After the submit is used, the page supports the Enter key operation. Many
Action commands in JSP include:
Include, forward, usebean, getproperty, setproperty, and plugin. I. include commands the tag indicates a static or dynamic file.
Syntax:Or
Note:1. Page = "path" is a relative path or a relative path expression.2.
File Upload (I) form requirements for the Form of the file to be uploaded, there are two requirements: 1. The method applies post, that is, method = "Post ". 2. Add attributes: enctype = "multipart/form-Data". The following is an example of a form
Introduction to JSP sessions
Abstract: Although the session mechanism has been adopted in Web applications for a long time, many people still do not know the nature of the session mechanism, and even cannot correctly apply this
List = (list ) session. getattribute ("list"); If (list = NULL | list. size () = 0) {list = new arraylist (); random r = new random (); For (INT I = 0; I my JSP 'pager. JSP 'starting page NO. content homepage |
The first is JSP pages and scripts.
This is a common function to check whether a user name exists.
Struts is used here.
Ajax ') "/>
The user name is not obtained on this JSP page. you can change the span parameter. For more information, see .
The
1. Traditional Chinese conversion tools
Classes used to process conversion between gb2312/big5 characters. You can search for them online.
2. Filter Interception Method
public class FileCaptureResponseWrapper extends HttpServletResponseWrapper ...
Modify the struts2 filter in Web. xml
struts2 org. Apache. struts2.dispatcher. filterdispatcher --> org. Apache. struts2.dispatcher. Ng. Filter. strutsprepareandexecutefilter struts2 /* request forward
Filterdispatcher is the core filter of
JSP: plugin action enables you to insert the object or EMBED element of a specific browser to specify the plug-in required for the browser to run a Java applet.
Syntax:
[Name = "instancename"][Archive = "uritoarchive,..."][Align = "bottom
">This is an example of JSP pager tag.The example is very simple. It can be seen that the amount of code that uses JSP pager tag to implement pagination is very small. Maxpageitems = "" // The majority of each pageMaxindexpages = "" // index display
It's okay to write a small probe to play, because it can only be embedded in the blog and so on, so this is just to get the user information, and I will write a powerful probe later.
The Code is as follows:
self-developed JSP probe mini edition:
I. servlet
We may often need to handle some Path Problems in the servlet, for example, to obtain the physical path of a file in the current application, or to know the specific path of a request, these methods are required.
1: Obtain the physical
Today, I looked at the page paging technology of JSP. By the way, I learned that the pages written this time are completely JSP pages, and there is no hierarchical processing. The pages are pure JSP pages, it is helpful to understand paging. I use
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
untitled document 11 title: content:
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