The error is as follows:
:
It can be seen that I want to upload a numbered value of 0515, but the value is 333 when it is passed to the function, resulting in an error.
After careful checkCodeBasically correct
Cause: Because the string
Java has gradually warmed up in recent years. With the introduction of Java SE 5 and Java SE 6, the future of Java is even more brilliant. However, Java-based JSP has been unable to lift the header before Java SE 5 was launched. The most important
If you want to test your JSP Application
Program Performance, then you can use jmeter, which is open by the Apache Software Foundation.
Source code . Jmeter allows you to develop test solutions to test accessible HTTP, FTP, and JDBC database
For graduation, I began to study struts, hibernate, spring and other technologies. Not how difficult they are, but the xml configuration files are enough for you. Every database field, like hibernate, must be mapped to XML,CodeThe amount of data is
untitled document
Physical path of the current web application: The physical path of the JSP file you requested: String Path = application. getrealpath (request. getrequesturi ());String dir = new file (PATH). getparent ();Out. println
Dynamic include
Usage:
Note: It always checks the changes in the contained files. It is suitable for inclusion of dynamic pages and can contain parameters. It can be compiled before processing.
Cause: 1. The static include result is to introduce
Test. javapackage test; import Java. util. date; import Java. text. simpledateformat; public class test {date d = new date (); Public test () {// super (); system. out. println ("in constructor"); // todo auto-generated constructor stub} Public
To reduce the pressure on the server, change the original article management system to generate static html files from JSP files and then access the HTML files directly. The following is a simple example.
1. buildhtml. jsp
Try {String title = "JSP
This is the test file I used to connect to MySQL. It is for reference only;
dbjsp. jsp // Start with tryTry{Connection con;Statement stmt;Resultset RS;// Load the driver. The following code loads the MySQL driver.Class. forname ("com. MySQL. JDBC.
JSP's support for file uploading is not as good as PHP's support. It is directly implemented as a function, not as it can be implemented through components in ASP. JSPs can be implemented through JavaBean. However, there is no need to write an
I. jsp file: auto. jsp// Set the format and Character Set of output informationResponse. setcontenttype ("text/XML; charset = UTF-8 ");Response. setheader ("cache-control", "No-Cache ");Out. println (" ");For (INT I = 0; I Out. println ("" + (INT)
1. Request object
The request information of the client is encapsulated in the request object, so that the client can understand the customer's requirements and then respond. It is an instance of the httpservletrequest class.
Serial number method
JSP exports the query results to an Excel file and provides download on the page. An error occurred while clicking download. The file type in the pop-up save dialog box is htm, but not XLS. Therefore, I wrote a download program instead of calling
Recently, I am writing a small JSP project. I don't want to write the configuration information such as the database and data folder path into the code. So I tried to use the xml configuration file method. Now I will summarize my experiences:
1.
I have been a programmer for more than a year. I wrote something for the first time:
Here is a simple JSP tag instance.
1. Java class:
Package com. hjglddok. Tag;
Import javax. servlet. jsp. jspwriter;Import javax. servlet. jsp.
Here is a tips to convert it to an editable JSP file and then operate it like other JSP pages.
Because documents in MS Word and Excel support HTML text format, you can use Word or Excel to make a template, save it as a Web page, change the HTML to
/*InberkongInber520@yahoo.com.cnQQ: 27096282Array paging technologyArraytest. jsp
*/String [] contentarray = {};Contentarray = new string [125];For (INT I = 0; I {Contentarray [I] = "ayyayvalue" + String. valueof (I );}
Int introwcount; // a total
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