JSP is Java server PAGE,J2EE is Java 2 Enterprise eidtion, they are the sun company built in the Java language of a server-side programming technology, in simple terms, it is used to dynamically generate web pages of a technology, Now the main
Implied object of the JSP:
A set of objects that can be used directly without the need for new.
Tomcat is created automatically and can only be used in expression script and normal script .
1, request "key"
Type:
In the actual use of Struts2, CSS and JavaScript are often introduced into the JSP view page, which involves reference path issues. There are two types of paths, one is the relative path and the other is an absolute path. Let's talk about their
1, with database software (such as: MySQL) to create a database, the database registered with the database name is just the data created
Library, if it is a data source name, ODBC configuration is required.
2, the driver will be placed in the
This garbled problem plagued me for half a month, has been too lazy to repair him, also does not affect the function, nothing more than the need to open their own notepad.
After a long time, found that no matter what type I use, utf-8 GBK gbk2312,
Code that connects an Access database in a Java Web that you just wrote. These days talking about database operations, but my book is XP Home version, install SQL Server is more cumbersome, simply get access to demonstrate it. Sometimes small
The use of empty in El expression
${list.time}${list.contenxt} Temporary no logistics information!
${key} or All Output key value when key is not empty. When key is empty, the output "all" rule: 1 if the key is null, returns True 2 if the key is
First, JSP action
Action is a special tag that enables the effect of multiple lines of Java code implementation through an action tag. You can insert files dynamically, Reuse JavaBean components, guide another page, and so on.
The action element
1. Client upload file
Client through a JSP page, upload files to the server, the JSP page must contain a file class form, and the form must be set enctype= "Multipart/form-data". An input stream is obtained by Request,request.getinputstream () the
Date issue
1. Get server-side current date:
[Copy to Clipboard] [ - ] CODE:
Date mydate = new Date ();
%>
2, to obtain the current year, month, day:
[Copy to Clipboard] [ - ] CODE:
Date mydate = new Date ();
int thisyear = mydate.getyear () + 1
From:http://www.cnblogs.com/kenkofox/archive/2011/03/28/1997638.html
(.....) In Ie,refreshtree's
Getjson do not refresh the problem, reference: http://www.cnblogs.com/kenkofox/archive/2011/04/02/2004101.html)
Originally I want to use Jstree or
Through the browser's developer tools to view the Web page source code found that the path of resources such as css,js,img error, the path to the front of a more than one controller path, similar to:
http://localhost:8080/Project root/Controller
From the perspective of a three-tier structure, a project consists of at least three layers: data layer, business processing layer, and page display layer. Of course, it can be more complicated. Servlet is powerful for writing business processing
Pageencoding = "gb18030" errorpage = "errorpage. jsp" %>Int I = 5/0;%> record page display my personal forms
There is an error in this page, and the error page has been directed to handle_errors.jsp, And that page is correct.
However,
JSP normal printing is very simple, there are many ways, you can use window. Print () This built-in method, you can also use the component webbrowser, you can also use a third-party component such as scriptx to achieve. The default A4 format is
Small discussion on JSP Chinese garbled characters
------- Guo Peng
JSP is a hot topic, but most people have a headache about garbled code on JSP pages. I have some experience. I have been depressed for several days to solve Chinese Garbled text, I
Author: fbysssDisclaimer: This article is original in fbysss. If you need to reference it, please indicate the author and reference addressKeywords: smartupload, uploadbean, Linux, Chinese garbled charactersI. smartupload file garbled solution
Sometimes you also need to pass parameters between multiple JSP pages. The following describes the implementation methods.
(1) Add
For example, directly passing parameters
When using response. sendredirect for page redirection, you can also
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.