In the website often due to the user's improper operation caused by the exception, in general we can put these exceptions in a Web page unified display. This time you need to use the ErrorPage and Iserrorpage attributes.The purpose of the ErrorPage
Yesterday, I met a problem that gave me a headache. I made a common JSP, only to measure it is OK, but, put in the other JSP include it, will be wrong as shown in the title: The Code of Method _jspservice (HttpServletRequest, HttpServletResponse) is
1.JSP Release:Could not publish server configuration:null. Java.lang.NullPointerExceptionAnswer: http://zhouhaitao.iteye.com/blog/1998979To find an error:The place in the circle was written in the peanut shell domain name: "daci123.eicp.net" \Normal
Original page: http://www.douban.com/note/102320977/JavaBean is a reusable, cross-platform component. There are two kinds of javabean: a non-user interface, which is generally used for processing data operations, operating databases and so on. The
Spring+shiro, let Shiro manage all rights, especially implement the permission point label in JSP page, each time open the page needs to read the database to see permissions, such a way to the database pressure is too large, using the cache can
Use JSP forward action in JSP to redirect pages.
Syntax:
}"/> or}">Value = "{parametervalue | }"/>+
This action allows you to forward the request to another page. It has only one attribute, page. Page should contain a relative URL. This can
(4) Tomcat
1. Decompress tomcat.zip to a directory using winzipdecompressed software. I will decompress it to c: \, which will automaticallyCreate a tomcat sub-directory. In this way, a directory c:/tomcat is added to drive C, which is
The following page generates an exception:
JSPs 1.0 error page demo JSPs 1.0 error page demo String S = NULL;S. getbytes (); // This will give the nullpointexception exception%>
The following page is called after an error occurs:
attenion
I. JSP technology Overview
After Sun officially released JSP, this new web application development technology soon attracted people's attention. JSP provides a unique development environment for creating highly dynamic web applications.
If you have used VB To Write File Upload components, it is very easy to use Java to Write File Upload JavaBean.
The following example is a simplified version.
Package yuanyifileup;
Import java. Io .*;
Import java. util .*;
Import javax. servlet
Package coreservlets;
Import java. Io .*;Import javax. servlet .*;Import javax. servlet. http .*;Import java. util .*;
/** Shows all the parameters sent to the servlet via either* Get or post. Specially marks parameters that have* No values or
Chinese garbled characters in JSP are often messy.
The following two common countermeasures are often visible on the Internet:
Contenttype = "text/html; charset = gb2312" %>
Or:
String HI = "hello ";Byte []Tmpbyte = Hi. getbytes ("iso8859_1 "
In ASP, I once told my friends how to prevent ASP programs from reading data from the cache, which can also be implemented in JSP. See the following:
1. You can use the methods provided by java in jsp or servlet.Response. setHeader ("Pragma", "No-
Familiar with JSP servers
This "JSP from simple to deep" series of tutorials is intended for intermediate and advanced users and requires the basics of HTML and Java. You should connect HTML webpages together and use Java for programming. If you do
Author: Xu Chunjin
Below are some of my experiences in learning JSP:
I. Working Principles of JSP
When a JSP file is requested for the first time, the JSP Engine converts the JSP file into a servlet. The engine itself is also a servlet. In JSWDK
JSP is becoming an excellent Java technology that can be used to create dynamic Web applications. There are countless reasons why Java programmers love JSP. Some people like the "one-time writing, everywhere" method it brings to interactive pages,
JSP directive mso-hansi-font-family: ""> affects the overall structure of the servlet class. It is commonly used in the following forms:
In addition, you can write multiple attributes in one statement:
Attribute2 = "value2"AttributeN = "valueN" %>
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