Jsp-servlet provides a good platform for Web application developers. However, most of the domestic development based on Jsp-servlet is in the most basic state, code reuse rate is low, low development efficiency, can not adapt to large-scale, complex
Recently done a project, JSP page background picture always consider its size, trouble dead. The results went online to search a good way to share with you
background
The 4.jpg pictures are as follows:
After downloading, import the project to MyEclipse, and then modify the database connection parameters to test. I'm using the MySQL database. JSP is because the Hibernate can match various frameworks, so in the code I have tried to separate the page
Sun's JSP (Java Server Pages) is a dynamic web development technology that executes on the server side, based on Java technology. When executing a JSP, you need to set up an engine that compiles JSP pages on the Web server. There are several ways to
Some netizens do not know how to run their own JSP files, I briefly introduce here, to provide you with a point of reference:
1. Download and install Tomcat. Download Address: Http://jakarta.apache.org/tomcat
2. Write your own JSP Web pages and
JavaBean is a Java-based software component. JSP provides complete support for integrating JavaBean components in Web applications. This support not only shortens development time (can directly leverage tested and trusted existing components, avoids
JSP Other related resources:
Servlets and JavaServer Pages (JSP) 1.0:a Tutorial
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/
JavaServer pagestm:a Developer ' s perspective
The last component associated with the JSP syntax is called an internal object. Within the JSP small instruction file, you can access these internal objects to interact with the servlet environment that performs JSP Web pages. Many of the access to
Although you can put a large chunk of program code in a small instruction file, most Java program code belongs to reusable components called JavaBean. JavaBean are like ActiveX controls: They provide known functionality and are designed to be
Declaration in JSP:
There are two ways to declare in a JSP: one is , and the other is , now talk about the second kind.
1, test conditions:
Suppose there are two pages test1.jsp and test2.jsp have the following code:
Out.print ("The"
tag to write a tag involves three steps,
(1) Write JSP
(2) Write tag Java program
(3) Write tag library description file TLD (actually an XML file)
There is no sequential constraint between these three steps, and here is a simple example:
1
Because response is an implied object in JSP pages, you can use Response.sendredirect () directly in JSP pages to achieve relocation.
Attention:
(1). You cannot have HTML output before using Response.sendredirect.
This is not absolute, and the
1. The style of making reports in Word or Excel.
Excel's Row height and column width units cannot be represented in mm or cm.
needs to be calculated. Under 1024*768, the 1CM is about 38 pixels.
This is the benchmark for calculating and
Java Server page (JSP) is a growing technology for building dynamic Web pages. JSP and ASP, PHP, working mechanism is not the same. In general, JSP pages are compiled, not interpreted, as they are executed. The first call to the JSP file is actually
In Web applications, content caching is one of the most common optimization techniques and can be easily implemented. For example, you can use a custom JSP tag--we'll name it
--by
and
encapsulate each page fragment that needs
Pagect.java-Paging class/*@version ***********Created on June 25, 2001, 14:41***************************************/Package VOD;Import java.sql.*;Import java.util.*;
public class Pagect{Private long L_start; Start recordingPrivate long l_end; End
Use the JSP page to define a tag library and prefix using taglib directive from the definition tag.
Its syntax:
Example:
.
Describe:
The Directive (Directive) allows you to use custom labels, name the tag libraries, and specify
JavaBean is a Java-based software component. JSP provides complete support for integrating JavaBean components in WEB applications. This support not only shortens development time (can directly leverage tested and trusted existing components, avoids
Often see the JSP novice ask Tomcat How to configure the JSP, servlet and bean issues, so summed up how to configure the JSP, Servlet and Ben, in the hope of helping those beginners.
I. Development environment Configuration
Step one: Download
Because the switch.jsp is specified as the response JSP file in the Login.jsp form, when the user selects the logged-on user in login.jsp, the client sends an HTTP request to the server after the input password submits the form, and the server calls
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