variable or method declared by a JSP that becomes an instance variable or an instance method or a common method of a servletc) A local method cannot be defined in a JSP script fragment, and the method can only be defined in the JSP declaration5) JSP annotations1)语法:6) JSP I
Js|servlet| Error | strategy | main text
Many people think JSP is Java to Microsoft ASP Challenge successful products, to today, around the JSP program developed Tag/el Technology, JSP as a Java BS foreground interface solution seems to be irreversible. But in my opinion, Java chooses JSP this kind of expression, it is
file compiled generated by the class file, found the results of the same as in the Java file.
Then look at the charset specified in the JSP as iso-8859-1.
String a= "Chinese";Out.println (a);%>
Similarly, the file is written in UltraEdit, "Chinese" is also stored as GB2312 encoding "D6 D0 CE C4". First simulate the process of generating Java files and class files: JSPC uses iso-8859-1 to interpret "Chinese" and maps it to Unicode. Since Iso-8859-1 is
One, expression language: Expression Language the concise way to generate dynamic content.
The most important two features of 1,jsp2.0: JSP syntax defines custom tags and expression languages.
2, to compute and output values for Java objects stored in standard locations.
* syntax is simple and effective.* Condition output.* Accurate access to storage objects.* Ab
the JSP page is called a servlet, so that we access the JSP is actually the end of a servlet.So how does the code written in the JSP ultimately execute?A: The Java code written in the JSP will be translated into the _jspservice method, and when the _jspservice method is executed, the Java code written in the
/jc_0002ejspjc_jsp_1.java:70:statement expected.static int count = 0;^
This information holds that the above script is put into the _jspservice () method and the static variable is not allowed into the method. The syntax should be
Tomcat gives:Work/8080/_0002ftest_0002ejsptest_jsp_0.java:56:class count not found inType declaration.Count^Work/8080/_0002ftest_0002ejsptest_jsp_0.java:59:invalid declaration.Out.write ("\ r \ n");^
In other words, it's just a missing tag. Should be
Because template
The 1.JSP full name is Java Server Pages, which, like Servle technology, is a technology defined by sun to develop Dynamic Web resources .2.JSP technology is also a dynamic web resource development technologyBecause JSP technology allows Java code to be nested in the page to produce dynamic data, and when the Web server executes the
/_ 0002ftest_0002ejsptest_jsp_0.java: 56: Class count not found inType declaration.Count^Work/ 8080/_ 0002ftest_0002ejsptest_jsp_0.java: 59: Invalid declaration.Out. write ("\ r \ n ");^
In other words, a tag is lost. It should be
Since the template engine can be directly generated in the template file without any dramatic conversion to the Code, it is very easy to give appropriate error reports. And so on, when the C language command is injected int
:statement expected.static int count = 0;^
This information holds that the above script is put into the _jspservice () method and the static variable is not allowed into the method. The syntax should be
Tomcat gives:Work/8080/_0002ftest_0002ejsptest_jsp_0.java:56:class count not found inType declaration.Count^Work/8080/_0002ftest_0002ejsptest_jsp_0.java:59:invalid declaration.Out.write ("\ r \ n");^
In other words, it's just a missing tag. Should be
Because template engine can be generated dir
"Strongly typed language/weakly typed language"
Strongly typed languages tend to be intolerant of implicit type conversions. Strongly typed languages are Java, C #, Python, and so on. The example is as follows (Python):
>>> 875>>> + 8 ' Traceback (most recent): File "
Weakly-typed languages tend to tolerate implicit type conversions. Weakly typed languages include C, C + +, JavaScript
How is JS mixed with JSP and SSI #include?
You can include pure HTML in a JSP in the following ways:
But if the data.inc contains JSP CODE, we can use:
How do I perform a thread-safe JSP?
Just add the following instructions How does a JSP handle the data in an HTML form?
Thr
Basic Syntax of JSP learning notes and jsp learning notes
Jsp page element structure
The jsp page consists of commands, comments, static content, expressions, small scripts, and declarations.
Jsp commands
Page command: Usually located at the top of the
L JSP template Elements
The HTML content on the JSP page is called a JSP template element. The JSP template element defines the basic skeleton of a webpage, that is, the structure and appearance of the page.
L JSP expression
JSP s
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 applications. According to Sun, JSP can adapt to the market, including Apache WebServer, IIS4.0 and other 85% of the server products. Even if you are
jsp summary
Static Web pageIn web design, a Web page in pure HTML (an application under the standard Universal Markup Language) is often referred to as a "static Web page", and a static web page is a standard HTML file with an. htm,. html file name extension. Static Web page is the foundation of the construction of the site, the early sites are generally made of static web pages. Static Web pages are r
Java code and HTML tags, JSP includes all the HTML tags, as well as the built-in JSP tags, Custom JSP tags and expression languages.2. JSP processing at run time
In fact, JSP is just a carefully designed servlet,jsp is j
There are three types of directive tags in the JSP-
Serial Number
instruction
Description
1
Defines page-related properties, such as scripting language, error pages, and buffering requirements.
2
Include files in the compile phase.
3
A tag library that contains custom actions used in the claims pa
The following are reserved words in the JSP El: And eqgttrueinstanceoforneltfalseempty?genulldivmodexpression-language implicit alias Tag: bodytag interface ------- jdbbc: Java Database connectivityusing the java. SQL. drivermanagerthe Java. SQL. drivermanager is a standard part of jde ------------ most of the O/R frameworks support these four approaches, so let's take a look at each one. //////////////////
About title These concepts, most people should be more familiar with, but I faint for a long time, so write down to deepen the impression.1. Dynamic Languagealso known as the Dynamic programming language,means that the program can change its structure at run time: New functions can be introduced, existing functions can be deleted, and so on structural changes. such as the well-known ECMAScript (JavaScript) is a dynamic
Basic conceptsServlet
A servlet is a server-side Java application that has platform-and protocol-independent features that can generate dynamic Web pages. It serves as the middle tier of a customer request (a Web browser or other HTTP client program) and a server response (a database or application on an HTTP server). A servlet is a Java application located on the server side of a Web server, unlike a traditional Java application launched from the command line, which is loaded by a Web
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.