Step 1: Install jdk(1) install jdk (default installation)(2) Under the environment variable, select system variable and choose new:1) variable name: JAVA_HOMEVariable value: X: jdk ("X" indicates the drive letter for jdk installation)2) variable
1. RequestDispatcher. forward ()Is used on the server. When forward () is used, the Servlet engine transmits the HTTP request from the current Servlet or JSP to another Servlet, JSP or common HTML file, that is, your form is submitted to. jsp, in.
When processing custom tags, We need to overload the doStartTag () and doEndTag () of the parent class. If the tag attribute is defined in the tld file, you need to define the corresponding setxxx/getxxx method for each attribute in tag handler.In
On a classic website, visitors can browse several webpages and perform some interactive activities. If you are writing such a website, it is very useful to use some data of each user. For this purpose, we can use "sessions" in JSP ".Session is a
(Editor: when the original article appeared abroad for the first time, JSP was just a new technology and was not as popular as it is now. It seems that some of the ideas in this article may have some limitations, but I have to admit that this is a
Jakarta-Tomcat Simplified Chinese version User Guide Part 1
This document provides the following basic information about Tomcat:Tomcat binary InstallationMain content of Tomcat-related scriptsMain content related to server. xml, main configuration
Jakarta-Tomcat Simplified Chinese version User Guide Part 2
Element and description
ServerThe most important element in the server. xml file. Server defines a Tomcat Server. You do not have to worry about it too much. The server element can
You only need to keep the settings in the following places so that your JSP will not have any Chinese problems.1. charset of JSP2. Your jsp server uses the character set for compiling JSP. By default, it is the same as the operating system. You may
There are about three redirect Methods Using JSP:1. response. sendRedirect ();2. response. setHeader ("Location ","");3.
The following rules are obtained after testing:
I. response. sendRedirect ()
Out. flush () is not allowed before this statement.
Because the browser stores the previously viewed data in the browser's cache, the browser sometimes fetches the data directly from the cache, because after we modify the program, the old data is displayed.
The following code can fix this problem.
Jsp (preferred for SUN Enterprise applications)Mark learning notes
Ginkou. fly2002-9-18
1.Overview
1)What isJsp (preferred for SUN Enterprise applications)Mark
As the name suggests,Jsp (preferred for SUN Enterprise applications)Mark is
Jsp (preferred for SUN Enterprise Applications) has the following nine basic built-in components (which can correspond to the six internal components of ASP ):
Request client request, which contains parameters from the GET/POST request
Response
Jsp (preferred for SUN Enterprise applications)Research on page Encoding
Motivition
A netizen once asked me this question:
China
Why does the "China" page become garbled during operation?
Analysis
Key Step
For the analysis of the above
Friends who frequently access the Internet may have visited such websites. when they enter the home page, a window will pop up immediately, or a connection or button will pop up, this window usually displays some precautions, copyright information,
/** This is the class used to manage user information.
The file name is onLineUser. java.
*/Import javax. servlet. http .*;Import javax. servlet .*;Import java. util .*;Public class onLineUser implements HttpSessionBindingListener {Public onLineUser
1. garbled characters about the FORM parameters received by jsp (preferred for SUN Enterprise Applications:
Public String getStr (String str ){Try {String temp_p = str;Byte [] temp_t = temp_p.getBytes ("ISO8859-1 ");String temp = new
1.3 compile a servletIf you have written a servlet, how can you compile it into a class file;First you need to check if the servlet-api.jar is configured under your classpath. Then you can use the javac command to compile other java source files.
String strName = "";String strSex = "";Try{Class. forName ("com. MySQL (the best combination with PHP). jdbc. Driver"). newInstance ();String url = "jdbc: MySQL (the best combination with PHP): // localhost: 3306/samp_db ";String strUser = "root
Jsp (preferred for SUN Enterprise applications), relative paths and absolute paths in Servlet
Jsp (preferred for SUN Enterprise applications)AndServletThe absolute path and Relative Path Problems have plagued me for several days. After some efforts,
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