// First: include command: When JSP is converted to servlet, the specified file is introduced // type 2: action element: introduce the specified file when the JSP page is requested // The second method can easily use to pass
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
I recently registered to participate in a Web page production competition and had the opportunity to visit jiangda again in August 22. I was excited.
I can make up for my almost zero web page production knowledge, so today, cit3d was officially
It is used to include static and dynamic resources on the current page. Once the contained page is executed, request processing continues on the call page. the contained page cannot change the response status code or set the header, which prevents
Related Software:1. Eclipse 3.12. lomboz_3.0.13. emf-sdo-runtime-2.0.04. tomcatpluginv31beta (this plug-in is used to enable and disable tomcat in eclipse)
1. Install JDK and tomcat;The final result of environment variable configuration is as
Subject:
Share my JSP Chinese character processing experience (original) by the way)
Author:
Joyous (null)
Level 1:
Reputation value:
99
Community:
Java Web Development
JSP + SQL2000 Development Environment installation and configuration
I. Software preparation
Java Runtime Environment jdk1.4.1: install the software j2sdk-00004_000001-windows-i586.exe
JSP server tomcat5.5: install the software
I have been learning custom tags recently, so I want to implement some self-contained tag library functions in JSP. By the way, I will also review the reflection mechanism. (If you are not familiar with these two technologies, at the bottom of this
As we all know, every JSP page is compiled into a Java class by the Web container for the Web container to call and generate HTML foliar feedback to the user. Understanding the variant methods and rules is very beneficial for us to learn JSP. We can
Create a client to send data on the basis of the original one.
Step: Import flash. Text .*;
Use the textfield class to create two input boxes
For example:
Username = new textfield (); addchild (username); username. width = 200; username. height =
ServletObjects such as servletcontext, servletrequest, and servletresponse provided by servlet containers can be accessed.
InJSPHow to access these objects? For JSP, these objects are called built-in objects or implicit objects,Each object is
Several Methods for passing JSP page values:1. Hide the field transfer value:">
2. url transfer value:Use buttonA. '"Value = "Modify distributor"/>B. Set the onclick = "modifyregion ()" of input ()"Function modifyregion (){Window. Self. Location =
The reprinted content is as follows:
By default, Tomcat is all encoded in ISO-8859-1, No matter what display your page, Tomcat will eventually convert all the characters for you to ISO-8859-1. then, when GBK is used for translation on another
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:
TagThis label is used to access the "property" of the current file or its parent folder. "properties" are set in the "properties" dialog box in the "Browse" view of opencms.
Label description
Name
Description
Required
Name
I have found one for many websites and it is easy to use:
String queryresult = ...;
Response. setcontenttype ("application/CSV ");
Response. setheader ("content-disposition", "inline; filename =" result.csv "");
Printwriter out = new printwriter
There are several methods for page forwarding: 1 requestdispatcher. Forward () 2 response. sendredirect ()
3 4. Modify the location attribute of the HTTP header to redirect 5 pagecontext. forward () I wrote the code to check whether a user is
The code in action is as follows:
Code highlighting produced by actipro codehighlighter (freeware)
Http://www.CodeHighlighter.com/
--> List alluser = This. getloginserviceimpl (). Find ();Request. setattribute ("user", alluser );Return Mapping.
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