Request. getrequesturi (): obtains the client address that sends a string request.
Request. getremoteaddr (): Get the customer's disconnected IP Address
Request. getremotehost (): Obtain the remote host name
Request. getservletpate (); obtain the
JSP internal objects strong 2008.10.9
Output object, used to output data to the client.
Request object. You can use the request object to obtain user request parameters, HTTP request headers, and user IP addresses.
Response response object. You
-- select -- $ {entry. Value}
The above directly pieces together the El expression, and then the running effect is also acceptable.
OK, directly splice the El expression above, and then the running effect is also acceptable.
1. JBoss should also be restarted to modify JSP, which is the most recent issue, and the JBoss startup speed is much slower. this problem occurs only when you try to use the jrebel plug-in and double-click server JBoss configuration in eclipse.
1. Add host Blocks Each jsp vm has its own host block. Each user must define at least the ID to specify the name of the VM and a root application.
Program . A is usually used to set a default web application for the host. Configuration File
When using the El expression in JSP, You need to identify iselignored = "false". Otherwise, the El expression is compiled as a normal string and the correct value is not displayed on the page.
You can see this in the
1. Understand JSP
1.1 Basic KnowledgeJava Server Pages dynamic web page technologyASP: VB and JS as scriptsJSP: Java Dynamic and Static Page SeparationRun after compilation from the hardware platformBasics: Java and HTML1.2 JSP pageThe xxx. jsp page
Http://blog.163.com/yangzhanghui_job/blog/static/17957506220127273348178/
COOKIE: the server saves user information on the client, such as the login name and password.Purpose:1. Save the user name and password. You do not need to log on again within
Strong page commands in JSP: 2008.10.9
The page command is used to define the global attributes in the JSP file. A JSP page can contain multiple page commands. In addition to the import attribute, other attributes can only appear once.
[Language = "
// initialize the global variable int totalnum = 6; // total number of records int numperpage = 2; // number of records displayed per page int maxpagenum = 0; // maximum number of pages for this search int curpage = 1; // current page int
Developers who use JSP know that the HTML generated after JSP compilation contains a large number of blank lines. These blank lines are generally not in the way, which at most reduces the friendliness of search engines and the readability of HTML.
Younger brother in 2004 to learn the MS classic ASP the oldest ASP, non net. Now, JSP is officially used. Although the younger brother has been familiar with Java for a long time, he may know a little bit about it, but he does not have. Therefore,
I wrote a simple example yesterday .. Only registration, login, and exit functions are available. The submission address written when writing to exit the function is , then, when configuring action in the actionservlet, write , and then in the
1. Request object
The request information of the client is encapsulated in the request object, so that the client can understand the customer's requirements and then respond. It is an instance of the httpservletrequest class.
Serial number method
1. Only numbers and English letters can be entered:Onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text'). Replace (/[^ \ D]/g ,''))"Id = "text1" name = "text1">2. Only numbers can be entered:Onbeforepaste = "clipboardData.
Two methods are available for JSP files:
1. jsp include pseudocommands, such as: cannot be dynamically called using variables?
2. jsp: Include tag, for example, " Flush = "true"/> can dynamically include files. Let's test this.
Test code:
Problem:
details Pass Chinese parameters through URL through click connection
The Chinese parameter of the URL in the hitinfoqueryservlet squadron is used to convert the character set recommended by most people.
The Code is as follows:New String
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.