A site created by JSP can obtain some information only after logon. Generally, websites, ASP, and aspx maintain the logon status through cookies or sessions (marked by cookies, therefore, access the logon page to obtain the cookie, and then attach
First, let's look at the directory structure.
-- + Login---------- + WEB-INF----------------------- + Classes-Beans-Tags----------- + TLDsLogin is the JSP file in the main directory. In the example login. jsp, loginfailed. jsp, login_form.jsp,
/*The file name can be saved as: Download. jspFor HTTP requests and responses, you can use flashget to download http: // connection process monitoring:The blue part is: client requestPurple: Server
When a cookie is set in JSP, the corresponding cookie cannot be read and retrieved in servlet, and a lot of information is searched. The solution is solved by referring to the cookie API documentation. In fact, the solution is very simple. You only
There are two page files in total:
1ininput.html is mainly used to display the page and input and submit the input information to the page;
Input.html
1 Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"
JSP Abbreviation: Java Server Page 1. operating principles of web resources
HTML: static Web resource. DefaultServlet reads HTML files and outputs them to IE browser through response
Servlet: Dynamic Web resources. The Web Container (Servlet
1 // First: include command: When JSP is converted to servlet, the specified file 2 3 4 5 // Type 2: action element: Introduce the specified file when the JSP page is requested 6 7 8 9 10 11 12 // The second method can
The struts2 value is stored in valuestack. Suppose there is a string 'str', which is generally the value:
or $ {STR}
If you want to use it in JSP, you can use the following:
@ PageImport="Com. opensymphony. xwork2.util. valuestack"
Address: http://www.blogjava.net/wonderer/archive/2007/10/25/155980.html
Recently, I was developing a testing system and encountered the request. getparameter garbled problem. After discussing with Lin Bin, I still think the old method works.
A Conversion Method for Java/jsp garbled characters
In fact, many people are confused about Garbled text. There are also manyArticleThis section describes how to handle Garbled text.
Many people try to solve the problem after finding garbled code
When we do the verification code, it is often due to anti-cheating. Sometimes the verification is intentionally added to many interference factors. At this time, the verification code is not clearly displayed and users often enter errors. In this
1. when the println () method is used for objects of the string type, if the object is null, null is printed instead of nullpointerexception, which may lead to the illusion of reference, subsequent operations on strings may cause problems.
2.
1.Introduction
For convenienceProgramStaff accesses common objects, and implicitly objects are defined in JSP,These objects can be used directly without declaration.When converting from JSP to servlet, they will convert to the corresponding
I modified the ictclas4j Chinese word segmentation system a few days ago and called it in JSP. when loading the dictionary, the path problem occurs. The call method is to instantiate the Java class in JSP, call the Java class method to complete
I recently tested WebService. I used myeclipse5.1.1 to create a WebService named "user" and added two methods to the service.
Public String example (string message ){Return message;}
Public String [] usercheck (string username, string password
I encountered a problem when I was using myeclipse6.0. I searched for it online and it has been resolved.I created a WEB project under myeclipse, created a folder jsp/user under WebRoot, and created a file index. jsp under the jsp/user file,Write a
Overview of JSP built-in objects
(1) Request object of the HttpServletRequest classRole: indicates the request object. It is mainly used to receive data transmitted from the client to the server over HTTP.(2) Respone object of the
Visifire statistical charts have been introduced in previous articles. Visifire can be embedded in pages such as Asp, Asp.net, Php, and Jsp, however, when using Visifire on these pages, splicing xmal strings in javascript or server code is
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