The static interface design is login.htm. The Code is as follows:
system logon system Logon User name password & nbsp; code & nbsp; Submit the information entered by the login user to login. jsp (preferred for SUN Enterprise
1. page ObjectThe page object represents jsp (the preferred choice for SUN Enterprise applications), and more accurately, it represents the Servlet after jsp (the preferred choice for SUN Enterprise Applications) is translated, it can call the
Jsp (the preferred choice for SUN Enterprise Applications) uses jsp (the preferred choice for SUN Enterprise Applications) forward Action to redirect pages. Syntax:
% >}"/> Or
% >}">
Value = "{parameterValue | }"/> +
Part 1 installation in the JAVA environment1. The latest J2SDK version is 1.4.2 _ 01,: http://java.sun.com/j2se/1.4.2/download.htmlDownload NetBeans IDE v 3.5.1 with J2SE v 1.4.2 COBUNDLEUse NetBeans IDE v 3.5.1 that includes J2SE v 1.4.22. Install!
1. include commandInclude can insert the JSP code into the JSP code before converting the JSP page to the Servlet. Its main advantage is its powerful functionality. The included code can contain JSP structures that affect the home page in general,
The Code is as follows:
Image. jsp
"image/jpeg" import="java.awt.*,java.awt.image.*,
Java. util. *, javax. imageio .*"%> // Obtain the random color in a given rangeColor getRandColor (IntFc,IntBc) {Random random =NewRandom ();If(Fc> 255) {fc = 255 ;}
Jquery: JS library;Jquery Selector1. jquery element selector $ ("p") select p element $ (". p") Select element of class = p $ ("# p") Select element of id = p2. jquery attribute selector $ ("[href]"); select an element with the href attribute $
Solutions for Chinese in JSP:After adding the following sentence, China Mobile can directly write Chinese characters on the page, without conversion. The submitted Chinese characters are directly obtained by request. getParameter (""), without
BodyTagSupport execution sequence
Methods for loading the BodyTagSupport class:
When writing the implementation class corresponding to the label, you need to reload several methods of the BodyTagSupport class: doStartTag (), setBodyContent (),
There are five jsp action elements The first category is related to the access to JavaBean, including: The second type is the basic elements starting with JSP1.2, including 6 action elements. The third type is the newly added elements of
Page1.jsp:
I put the value in the session.
Page2.jsp:
To display
Last Logon IP Address: [$ {sessionScope. lastLoginIp} ] Amount calculated the day before yesterday: [$ {sessionScope. total.pdf} ] RMB Last Logon Time: [$ {sessionScope.
I recently encountered some problems when I used jsp to output map data.
The result is that I didn't set the get Method for map in ation (all I have is the ssh framework)
Assume that there is a map variable in the action, and the key-value pair is a
1. struts2 type conversion, for 8 element data types and java. util. for common data such as Date and String, struts2 can use the built-in type converter for automatic conversion. However, for custom object types, We need to specify the type
Source of Request Parameters
1. query string of the request URL, such as/localhost/abc/test? Abc = ddd & bbb = ccc, the string following the question mark2. For a POST request, if Content-Type = "application/x-www-form-urlencoded", the parameter
I. origin and status quo:
AboutTemplateAndJsp (preferred for SUN Enterprise applications)The originWebIn the ancient days of development, people usedCGITo developWebApplication, inCGIWrite in the programHTMLLabel.
After that, the world began to
9.1 Cookie OverviewCookies are small plain text information sent by the server to the browser. When a user accesses the same Web server, the browser will send them to the server as they are. By allowing the server to read the information it
[Html](1) Configure struts2 in eclipse (2) copy the struts2-spring-plugin-2.0.11.2.jar package to the WEB-INF \ lib directory(3) Configure spring in web. xml org. springframework. web. context. ContextLoaderListener Remember, if you have used spring
Nine implicit objects The scope of JSP implicit objects is limited to Servlet's _ jspService method. Therefore, these implicit objects cannot be used in JSP declarations.PageContext pageContext = null;HttpSession session = null;ServletContext
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