Now have a lot of novice JSP users will often ask the database how to connect ah, how old mistakes ah? So I concentrated in this write an article for your reference, in fact, this database logic all put in the JSP may not be a good practice, but is
First, JSP Technology overview
After Sun officially released JSP (JavaServer Pages), this new WEB application development technology quickly caught people's attention. JSP provides a unique development environment for creating highly dynamic WEB
Determine the type of client phone and jump to the corresponding app download page
The principle of implementation is to detect the header of the browser's user-agent, and then to determine the client type based on the regular expression.
If they
Idea: Use filter to intercept servlet or JSP page content, such as content substitution, and then show users the modified pageThis can happen if you use normal filter to intercept page content
As you can see from the entry, the output does not go
Generate 4 random numbers and clutter background pictures, the number and background color will change, server-side refresh (with History.go (-1) will also change)
Prototype reference Alibaba Http://china.alibaba.com/member/showimage
The file that
JSP custom tag tag
the benefits of customizing the tag tagProgrammers can customize some specific function of the tag, to encapsulate the code, to achieve division of labor, reusability and other benefits.how to store tag tagsThe tags folder is
get all products render home
to implement a class that interacts with a database: Bookdao.java
You need to interact with the database at the beginning. Here you need to introduce the concept of a DAO (Data Access Object). DAO is working on the
Js
The code is the Java.sql.Date () type used by the Date object in the Access library as an example, because the test java.util.Date type cannot be added to a field of datetime type:Import java.sql.*;
Import java.text.*;
/**
* Code
*/
public
js| Create This example, the view includes two components:
• One JSP file: hello.jsp
• A actionform bean:helloform Bean
How to create these two components is described below.
Create a JSP file
HELLO.JSP provides a user interface that accepts
JS Overview: The Java Database Connectivity architecture is a standard method for connecting a database to a Java application. JDBC is an API for Java programmers and is an interface model for implementing a service provider that is connected to a
Because it has been not believed that Java can not mix to display a number of languages of the bug, this weekend to study the servlet, JSP in the multinational language display problem, that is, the servlet's multiple character set problem, because
In JSP, we tend to export the contents of some tables to local, which is usually the Word, Excel format files. This only needs to be set in the JSP page header and add the following code to the tag:Export to Excel:Response.setcontenttype
a better, more complete, including permission system, Workflow system, mobile phone Android OA system, internal mail system, etc., using Java architecture, including development database and development documentationSource Package Address:
This is one of the most basic Web project exercises, is a template is a project, which contains a table of additions and deletions function, a little change and supplement can be applied in similar Model II development of the
After the JBoss site is deploy, the server will dynamically compile these JSP files. Therefore, these caches may always exist unless the server is restarted (note that it is a machine rather than a sevice, the reason is that the server is cleaned
Article Source: http://www.blogjava.net/freeman1984/archive/2010/06/01/322465.html
Source:Http://blog.csdn.net/yzhz
I. Problems:The coding problem is that Java beginners often encounter problems during web development. There are also a large
Question about passing Chinese Parameters Using URL encoding in JSP When the JSP page uses URL encoding to pass Chinese parameters, garbled characters may occur during Parameter Parsing. Due to Java design considerations to the international problem,
I. Installation
Jspsmartupload is a free-of-charge, full-featured file upload and download component developed by www.jspsmart.com. It is suitable for embedding JSP files for uploading and downloading. This component has the following features:
1.
I. Preface
Orion is small, but has a lot of functions. If you don't talk about it, you can see its current support:(1) Servlets/JSP
(2) EJB
(3) HTTP (Note: Web servers such as Apache or IIS are no longer needed)
Ii. Download and install
For the
Many Web applications and enterprise applications involve long-time operations, such as complex database queries or heavy XML processing. Although these tasks are mainly completed by the database system or middleware, however, the results of task
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