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
I have never understood the role of JAVABEAN in MVC. Now let's look at an instance.Define a JAVABEANPackage com. bean;Public class User {Private String userName;Private String userPwd;Public String getUserName (){Return userName;}Public void
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 ;}
Previously, we reduced the number of bytes, the number of requests, and the loading order to make the page Load faster. Today, we are increasingly paying attention to another part that affects website performance-CPU utilization. Using jQuery and
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 $
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 (),
Data garbled during form submission:For get method submission:Find the server. xml in the conf folder under the tomcat installation path, and click Add URIEncoding = "UTF-8". See the red text section.ConnectionTimeout = "20000"RedirectPort = "8443"
when the types in the tag are password and text, their default length and width are inconsistent, and the length and width of the types in the logon box are usually set to be consistent. The following methods can be used to make them consistent
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
Set the JavaBean in the page range 0102030405 set the page range 06070809 page " class = "com. javaweb. ch07.UserBean "> 1011121314150102030405 set the page range 06070809 page " class = "com. javaweb. ch07.UserBean "> 1011121314Set the JavaBean in
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.
Public String getImgFromByte (){// Obtain the byte [] data of the Image Based on the business logic
.......
InputStream buffin = new ByteArrayInputStream (/* byte [] Data */);String str = picUrl. getImageType ();String imgtype [] = str. split
JSF is used in recent projects. The requirement is to download a page to download files to the client. In addition, unlike downloading a single file, this download is a ZIP file, which is to first compress the files in the specified directory before
1. Create a report style in Word or Excel.
The Row Height and column width in Excel cannot be expressed in mm or cm.
Computing required. In 1024*768, 1CM is about 38 pixels.
Based on this, you can calculate and control the row and column positions
1. Static Page garbled
The file encoding is inconsistent with the encoding to be displayed in the browser.
1) Check the original file encoding. open the file in notepad and save it as a file;
2) Add a command to the current page to recommend that
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
After downloading the JDBC driver on the internet, I often see Type4 as the vendor's standard. Recently, I have reviewed the data and it turns out to be the JDBC standard defined by SUN.Type 1 JDBC-ODBC BridgeLater than JDK, it is part of the sun.
These technologies are used to display the tree-like list of accounting subjects. You can also turn pages up and down. I hope to help people in need. The functions of each part are as follows:1. JAVABEAN: DB is mainly used to obtain the account
A jsp (first choice for SUN Enterprise Applications) learning process for beginners (IV)TheUnforgivenChapter 4 first Javabean1. First, let's see how to get the current time and display the Code:------------------------------------------------Java.
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.