First, JSP
1. JSP (Java Server Pages), like the Servlet technology, is a technology defined by SUN to develop dynamic WEB resources.
JSP technology allows you to nest Java code in a page, and allows developers to get Web-common objects such as
Use JSP Calendar programs that are implemented
Tieshu
Tieshu
Rngguliu@163.com
April 4, 2006 Tuesday
Can display any year, the current day plus a background color, the weekend is red. This calendar program is part of my Schedule management
There are 9 such objects predefined in the JSP, namely request, response, session, application, out, PageContext, config, page, exception 1, Request Object Javax.servlet.http.HttpServletRequest
The Request object represents the requested information
The basic composition of 1.JSP pages
Directive Identity (page,include,taglib) directive: Enables the server to perform actions and set properties that are valid throughout the JSP page range, as set by the directive.
HTML Markup Language: mainly
1. Custom JSP Tags overview
A custom JSP tag is a programmer-defined JSP tag that encapsulates the information display logic in a separate Java class and describes its use through an XML file. When you need to use a similar display logic on a page,
resolve problems with textarea input in the JSP (including carriage return, newline, space)
Package com.work.util;
/**
* Solve the problem of textarea input display in JSP (including carriage return, newline, space)/public
class Textareademo
One, Page object
The Page object represents the JSP itself, or rather, it represents the JSP-translated servlet, which can invoke the method defined by the Servlet class.
Two, config object
The Config object holds some of the servlet's initial data
Application Scopes
Application The Javax.servlet.ServletContext object represents the container that executes the JSP
Page Scopes
Config This Javax.servlet.ServletConfig object represents the JSP configuration option. As with the servlet,
1. Direct Output Table format
Support project Name: funded project name Serial number: Serial number Support number: Funding number
Note: garbled problem, page Save as Utf-8 format
Encoding format conversion
String s= "";
S=new String
JSP universal query processing and paging display
Tieshu
Tieshu
Sunday, April 2, 2006
(Note: The source code involved can be obtained by email:rngguliu@163.com)
1 Basic Ideas
In view of JSP development many times use the function of query and
Web.xml: This type of writing is problematic in IE browser. "Show friendly HTTP error prompts" must be ticked off in the IE tools-> Internet Options-> "advanced"; but we can't control the client's browser 404 /error404.jsp 500 /error500.jsp ------
JSP nine kinds of built-in objects: request, reponse, out, session, Application, config, PageContext, page, exception.
A. Request object: The object encapsulates the information submitted by the user, and it is possible to obtain the encapsulated
Presumably everyone is using Eclipse Programming , this problem is often encountered.
The reason is that the JSP did not compile successfully, so the class could not be found.
Here's how the JSP and Servlet are compiled.
Jsp
For example
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
Outline(1) Create MAVEN Web project;(2) add dependency in Pom.xml file(3) Configuring Application.properties support JSP(4) Writing test controller(5) Writing JSP pages(6) Writing the startup class App.javaCreate a MAVEN Web projectUse Eclipse to
Blog: http://elf8848.iteye.com
Struts2, springmvc, and Servlet (JSP) performance comparison tests.
Servlet's performance should be the best and can be used as a reference. Other tests should be aligned with it and should be referenced.
As a
1. cache report source
Cache the report source in session variables so that the report source can be effectively used multiple times. When a report source is not cached, It is very expensive to create a new report source multiple times. In addition,
The JSP page consists of the following elements: l static content. The static content is the static text in the JSP page. It is basically HTML text and has nothing to do with Java and JSP syntax. L command. JSP commands generally use " ". L
This is a problem I encountered when I reviewed web programming at the end of today and other problems subsequently exploded. Although I am only familiar with these Java and JSP languages, however, the question is just self-explanatory. There may be
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