First, the application background
The JSP gets the list of the request in the servlet and the data in the list is assembled into XML. The following code appears as XML in the eclipse's built-in browser, no problem.
[Java]/*** News servlet* @author
JSP to export data from the database to the implementation of Excel download
Key code:
Response.setheader ("content-disposition", "inline; Filename=videos.xls");Response.setheader ("Content-disposition", "attachment; Filename=test.xls");The above
To avoid having to do with HTTP 404 errors in the future, decide to write down every time you encounter this type of error in case of a query.
Because no struts2 before, can normal access to the application directory files, after configuration
Note: The filter mainly filters the value inside the request,response.
*web.xml----
* Login Action Add cookie-------
*filter Filter Gets cookies------
(without a new username, password, read the cookie directly through the query database, get user
Js| Program | Performance First, overview
In Web applications, the generation of some reports may take a long time to compute, and some sites provide weather information that requires access to remote servers for SOAP calls to get temperature
js| Data | database | Web page | show
Environment Mysql+tomcat:
first set up the following table under MySQL. and insert the image.
Mysql.sql files are as follows:
CREATE TABLE Photo (Photo_no Int (6) unsigned not NULL auto_increment,Image
JS User login and exit log
When the user logs on to the system, insert a record in the log table, record the time the user logged in, and log the time the user exits the system when the user exits the system.
We use the Httpsessionbindinglistener
Today, I use Ecipse to build the struts framework and use the struts framework to write a simple example that I believe the reader can easily understand.Struts is one of the three most popular frameworks in Java today, and the three frameworks are
Spring Boot Integrated JSPSteps:1. Create a new spring boot project2. Modifying the Pom fileorg.springframework.bootspring-boot-starter-weborg.apache.tomcat.embedtomcat-embed-jasperjavax.servletjstlThese dependencies must be remembered Plus!!!3.
1. Definition:EL (Expression Language) is designed to make jsps easier to write. The expression language is inspired by the ECMAScript and XPath expression languages, which provide a way to simplify expressions in the JSP, simplifying the code for
Relative and absolute paths in JSP and ServletThe absolute path and Relative Path Problems in JSP and Servlet have plagued me for several days. After some efforts, I will share some of my experiences with you.Premise: assume that your HTTP address
This is a simple comment system, using the JDOM (here using Jdom-b9), the instance uses JSP as the view, combined with Ajax (using prototype-1.4), Servlet and JavaBean as the background processing, use an XML file to store data.
1. The application
I. Preface
The original author of this article is Tony Wang. This article involves file read/write and automatic jpg image generation. Using JSP + Servlet technology, JSP calls servlet to generate images.
Ii. index. jsp of the first file is as
Tree2.jsp
#. Admin
open all | close all
Under the JS folder
Dtree. js
/* -------------------------------------------------- |
| Dtree 2.05 | www.destroydrop.com/javascript/tree/ |
| ------------------------------------------------- |
|
Parse and access a series of JSP encoding and decoding processes-Details
From: http://japi.javaeye.com/blog/288779
Garbled text is a headache...Page garbled, Servlet garbled, database garbled ....An annoying word ..
The solution came out very early.
1. Display pdf on JSP
Http://hi.baidu.com/velercy/blog/item/be708dea2c3236ddd439c9b4.html
">
2. If Acrobat Reader is not installed on the visitor's computer, use IFRAME or directly use a link to open the file, instead of directly
This article describes how to configure a simple eclipse-based Web Application Based on Eclipse equinox osgi and how to construct more complex applications based on it. This article uses eclipse 3.3.1, if your eclipse version is 3.2.0 or later, you
This section mainly summarizes the expressions for connecting jsp to various types of databases.
I. jsp connection to Oracle8/8i/9i Database (in thin Mode) Testoracle. jsp is as follows:String url = "jdbc: oracle: thin :@ localhost: 1521: orcl ";//
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