Displayfile.java
//*********************************
File parentdirectory = null;//current directory
ArrayList [] File = null;//holds all files in the current directory
ArrayList [] directory = null;//holds all directories in the current
1, on the page
Copy Code code as follows:
Value=/>
2.action
Copy Code code as follows:
string[] checkbox = request.getparametervalues ("checkbox");
list Checkboxs = new arraylist ();
int Operatorid
1, under Tomcat for the old domain to do a virtual host
Home page for index.jsp, 404 error page for unfind.jsp
Homepage uses 301 to turn, is advantageous to the search engine optimization
Response.setstatus (301);
Response.setheader ("Location",
Recently done projects, complete the task assigned by the project manager, started the Java Web, but encountered many problems in the development process, but I have the most headaches or import external CSS has been ineffective, plagued for a long
Implement the pyramid as shown in the JSP,
The code is as follows:
The general idea is as follows:
1, first draw the first 5 lines. Because the number of i+ spaces = Total number of rows, the number of spaces in the first line is the total
JSP Tags:
Implementation Request Forwarding to add parameters to the above
El expression:
1. Get Variable data
Hello, ${name}
2. Get Array data
Hello, ${names[0]}
3. Get Collection data
names=new
Many JSP programmers have encountered such a situation, JSP page pass parameters to the servlet, as long as the parameters have Chinese is garbled, and most are?????? Garbled, tried the online more common methods are not good, and finally added a
Recently using jquery to write down the option value of the Drop-down box to move around, the code is as follows:
Copy Code code as follows:
Untitled Document
Option 1
Option 2
Option 3
Option 4
When I was doing my search results, I used an onclick event to highlight the selected row in order to be good-looking:
Copy Code code as follows:
var assno= "";
function Check (OBJ,CHE,RWID) {
if (obj.checked==true) {
1. Use of beans
In order to use Benas in the JSP page, we must use the JSP action tag: Usebean
Usebean format:
When a JSP page containing a Usebean action tag is loaded on the server, the JSP engine first finds in a synchronized block, based on the
After learning the JSP basic syntax and the use of HTML and JavaScript, JSP+JDBC connect the database to develop a dynamic Web page can be implemented.
For students who have studied Java SE, the operation of the database is not unfamiliar, if there
String agent = Request.getheader ("user-agent");
StringTokenizer st = new StringTokenizer (agent, ";");
St.nexttoken ();
Get the user's browser name
String userbrowser = St.nexttoken ();
Get the user's operating system name
String Useros =
This is the actual combat JSP advanced programming three.
Today spent a few hours, and finally the room inside the development of tomcat+hibernate, learning environment configured well.
Application scenarios: Tomcat 5.5, Hibernate 2.1.7, MySQL 3.23
Our first example is the simplified DAO approach, which mainly introduces OOP concepts in programming.
This time, we'll make the DAO up, but still keep the simplest form for beginners to learn.
The simple DAO pattern consists of:
1 interface
2.
Many JSP beginners in learning simple JSP programming, often stay in the JSP inside the SQL statement to tune a JavaBean database connection stage, stalled.
This simple tutorial is expected to help beginners learn to use OOP ideas for JSP
Passing data between Web pages using JavaBean and JSP parameters
Introduction: Web Architecture designer Brett McLaughlin demonstrates how the combination of JavaBean components and JSP technologies enables you to store and deliver data between Web
Introduction: Scriptlet is a good choice for fast and miscellaneous (Fast-and-dirty) coding, but in the long run you need to choose a less cluttered solution for your JSP pages. In this issue of JSP best practices, Brettmclaughlin shows you how to
In JEE6, the El expression in the JSP supports method calls with parameters. You can call it like this:
${foo.bar (Baz)}.
The latest implementation is Juel, you can download a trial. The following code is the test of how to use:
In the JSP built-in object "02" We have simply studied page, request, session, application four kinds of objects of the attribute range. So from the beginning of this article we have come together to learn more about the use of request, response,
Name:Js:javascriptJsp:java Server PagesExecution process: JSP first translated, translated into servlet executionsuch as: test.jsp to become Test_jsp.java and then compiled into Test_jsp.classAnd Test_jsp.java itself is a servlet.So JSP is just a
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