(1) Add:
Httpsession session = request. getsession (true );
Session. setmaxinactiveinterval (900 );The unit of the parameter 900 is seconds. That is, the session will expire after 15 minutes of no activity.Note that the time set for this session
Relearn JSP-set the catalina_home environment variable
1. catalina_home is the alias of the tomcat installation path to facilitate the use of Tomcat
2. Computer> Properties> environment variables: Create an environment variable. The variable name
Title: A simple solution for JSP RePort Printing
Keyword: JSP report
Author: jrq
Abstract: MS Office is a simple solution for JSP report output and printing. Make a memo.
Link: http://blog.csdn.net/jrq/archive/2005/10/21/510523.aspx
Body:
Today, I saw some people say JavaScript as JSP. I have already read this situation several times. Why is it so understandable? I am wrong and mislead others.
Below are JSP and JavaScriptJSP is a dynamic web page technical standard proposed by Sun
Maybe many people like me have found ckfinder and kcfinder, but suddenly they don't support Java, and then they are very lost ~~
I tried tomcat to run php to run ckfinder, But I found many errors such as directory permissions.
Finally, because I
Solution: encode the Chinese parameter twice before passing the parameter. After obtaining the parameter on the JSP page, decode the Chinese parameter once. The Chinese parameter will not become garbled!
Example:
Pageencoding = "UTF-8" %> String
JSP pages are textual components. They go through two phases: a TranslationPhase, and a request phase. Translation is done once per page. The request phase isDone once per request.The JSP page is translated to create a servlet class, the JSP
If the address is http: // localhost: 8080/deviantart/test/myjsp. jsp
Request. getcontextpath ()/deviantartObtain the container context path, which is generally the relative path of the website (project name ). If it is the root directory, the
Configure data sources
Design and modify the context. XML and Web. xml files for the Web application configuration data source. Add the element defining the data source to the context. xml file and the element to the Web. xml file. The
JAVA:
httpservletrequest request = servletactioncontext. getrequest ();
String remoteip = (string) request. getremotehost ();
If the client uses a proxy, the method for obtaining the real IP address is:
after proxy, the server
Detailed description of reports generated on the JSP report page
1. Ideas
2. Implementation instance
1. Ideas
First, the user clicks the "generate" button to send the request to the background processing controller. The controller
PNetizens often ask how to connect to the database. Why are there errors? So I concentrated on writing this article Article For your reference, it may not be a good practice to put all the database logic in JSP, but it is helpfulSo I did this for
1. the right mouse button will be completely shieldedOncontextmenu = "window. event. returnvalue = false" NO can be used for table
2. Cancel selection and prevent Replication
3. Do not pasteOnpaste = "Return false"
4. Prevent
The Web architect Brett McLaughlin shows us how to use JavaBean and JSP technologies to store and transmit data on web pages, and how to design it to achieve greater flexibility.
So far, we have discussed a considerable amount of basic knowledge
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.
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
A Java code cannot appear because of JSP code specifications. All have the JSP custom tag technology.
Therefore, JSP's custom tag technology is to remove the Java code in JSP. At the same time, encapsulation of the tag's personal feeling is also a
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