The example of this article describes the Js+jsp method of implementing static page access count through the IMG tag invocation. Share to everyone for your reference, specific as follows:
Test page: test.html
test
Recently completed a project, which encountered two times more bizarre garbled problem, recorded here, to give himself a wake-up call, but also for the latter to provide reference.
This is a project that is implemented with SSH, in order to prevent
The Jstl and El expressions are often used when doing projects, sometimes we need to look at the source code generated by the page, but when the JSP is full of jstl of the various tags, the page will have a lot of blank parts, sometimes too much
The function of the jump:
You can use a jump instruction to transfer a user's request from one page to another page.
For example: User login QQ space, if the user name and password correct words will jump to the home page, otherwise it will jump
One of my classmate asked me, Java has "//" This kind of annotation, easy to use, JSP annotation is not this? "//" is not available in the JSP.
For a JSP that has studied for such a long time, annotations are the most basic. The annotations in the
On the server side to determine whether the form is repeated, the main consideration in the page through the session to share the flag variable method to achieve, that is, in the client page set session in the flag variable, and then in the server
The following page will produce an exception:
JSP 1.0 Error Page Demo JSP 1.0 Error Page Demo String s = null; s.getBytes(); //这将给出 NullPointException例外 %>
The following page is called after an error:
Attenion the fellowing error
JSP中如何处理虚拟目录
Get the disk path for the virtual directory
The location of the Web site home directory is
The directory location where the JSP Web page resides
The location of a directory on the directory where the JSP Web page resides
Have you ever wanted to send a dynamically generated image from a JSP page (or servlet)? This tip tells you how to do it. To run the code here, you need a tomcat or other Web server that supports JSP 1.1.
When a MIME type of a Web page with
Source code, a.jsp to b.jsp value:
a.jsp Page Content:
name:
b.jsp Page Content:
String name=request.getParameter("name"); %>
Phenomenon: Chinese garbled, such as "?????? ”
The workaround is as follows:
Method One:
1. In b.jsp,
You can jump to a specific page by using the dropdown box
Connection M_connection=null;Statement M_statement=null;ResultSet M_resultset=null;String SQL;String DBPath = Application.getrealpath ("/Database Location"); Convert a relative path into a
Picture Verification Code implementation The main technical point is how to generate a picture. The build picture can be implemented using the classes under the java.awt package. Let's write a simple program to generate a picture Helloimage.java.
The system frame diagram is as follows:
Three documents are as follows:
Login interface/** *//*** @ (#) Login.java*** @author shiyi05* @version 1.00 2008/5/10*/Package Com.rao;Import javax.servlet.http.*;Import java.io.*;public class Login extends
When writing JSP Dynamic Web design, how to apply JavaBean? Below I explain step-by-step, explain, this is only my experience, may not be completely summed up, of course I have successfully compiled and used correctly.
(the diagram below)
There are many methods about the request object, in the JSP built-in object "03" request Detailed "01", we have learned the request object in the parameter acceptance problem, then look at the other methods of request now:
Garbled solution
First in the action you want to use variable sex and have get method.
You can output the value of a variable sex directly from a JSP page using the ONGL tag ${sex}.
can also be exported, but it doesn't seem to mix with tags.
The following is
JavaBean is a Java-based software component. JSP provides complete support for integrating JavaBean components in WEB applications. This support not only shortens development time (can directly leverage tested and trusted existing components, avoids
1. PrerequisitesWeb-inf directory:1. Web-inf is a secure directory for Java WEB applications. The so-called security is the client cannot access, only the server can access the directory2. Web. XML: Project Deployment File3, Classs folder, you can
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.