Goal: L MASTER the information how to store the shopping cart; L MASTER The realization of the common function of shopping cart. main content: L First analyzes the general process of user online shopping; L Describes what data structure
Photo validation is often used in relation to registering and publishing messages. I have written a JSP here, for your reference. Com.sun.image is not a standard package for Java. Additional downloads are required. Related address:
in Web-oa system, document management seems to be indispensable, sometimes need to query some data from the database in some format output, and in the form of Word documents, and sometimes many word documents saved to the database in the Blob field
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
Built-in objects:
Request,response,out,session,application,cookie,config,page,exception.
1. Request Object
This object encapsulates the information submitted by the user, and it is possible to obtain the encapsulated
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
Http://www.xxx.com/fckeditor/editor/filemanager/browser/default/connectors/jsp/connector? command=fileupload&type=image¤tfolder=%2f
Use this address to find the path to upload the image, there is a loophole should return an XML file, such as
The principle is as follows:
1. Write a class to generate a picture file (Image.java)
2. Write a JSP file to generate the picture (createimage.jsp)
3. Write a homepage to display the Picture Verification Code (IMAGE.JSP)
4. Write a JSP file,
First, JSP running environment configuration1. (apache+ resin-2.0.5) configurationIf your site is based on Apache and now want to use JSP, how to do it. You can do this through some JSP engines that support Apache (such as Resin,tomcat,jser, etc.).
the difference between redirection and forwarding in a JSP:
One: Indirect request Forwarding (Redirect) Two: Direct Request forwarding (Forward)
The user sends an HTTP request to the server that may be processed by multiple information resources
nonsense
Agreed not to learn JSP, the results today or learn. Mainly for the back of the Java backstage learning. For better mastery of knowledge, let's write a simple JSP entry program. This is just a simple getting started applet, so there's not
Shopping cart class and shopping cart DAO
Shopping Cart
The class is also a JavaBean, with the exception of ordinary getter and setter, where a way to get the total cost of a single book is achieved. We use a book object as the key, to the
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
first, the principle of JSP operationWhen each JSP page is accessed for the first time, the Web container will give the request to the JSP engine (a Java program) to process. The JSP engine first translates the JSP into a _jspservlet (essentially a
Redirects an HTML file, JSP file, orProgramSegment.
JSP syntax
Relativeurl"|" Expression%> "}/>
Or
Relativeurl"|" Expression%> "}>
Parametername"
Value = "{Parametervalue| Expression% >}"/> +
Example
If we only need to use a part of the Flex function, such as the player function, we can separately embed the flex page into the JSP page. To implement this function, you need to download a project and overwrite it in the root directory of the server.
There are about three methods to obtain the MAC address of the client (IE) Nic from Java/JSP.
1. Execute ipconfig on the client using commands.
2. ActiveX Method
3. How to send query commands to port 137
Introduction:
The first method is to block
I. Basic concepts:
1. Tag ):
A tag is an XML element. A tag can simplify and maintain a JSP webpage, and supports multiple language versions for the same JSP file. Because tags are XML elements, their names and attributes are case sensitive.
2. Tag
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.