Use JSP forward Action in jsp to redirect pages.Syntax:Value = "{parameterValue | This action allows you to forward the request to another page. It has only one attribute, page. Page should contain a relative URL. This can be a static value or a value that can be calculated when it is requested, as shown in the following two examples:! SupportEmptyParas]>Here is a specific example: Use forward in test1.
Use JSP forward action in JSP to redirect pages.
Syntax:
Value = "{parametervalue |
This action allows you to forward the request to another page. It has only one attribute, page. Page should contain a relative URL. This can be a static value or a value that can be calculated when it is requested, as shown in the following two examples:
! Supportemptyparas]>
Here is a specific example: Use forw
The following JSP program dynamically generates a testDynamicInclude. inc. jsp file and calls it later.
In the dynamic generation of JSP, pay attention to the path in it. "." Represents the root directory of your project.
If your JSP file is under the test subdirectory, do not forget to add this path to the path.
Recently found that many users like the Tomcat work directory in the things called cache, in fact, it is not very appropriate, working directory is only Tomcat directory, that is, Tomcat to convert the JSP to a class file working directory, That's why it's called the work directory, not the cache directory. Jsp,tomcat works by when a browser accesses a JSP page
Use JSP forward action in JSP to achieve the page's jump function.
Grammar:
Value= "{parametervalue|
This action allows you to move the request to a different page. It has only one attribute, page. The page should consist of a relative URL. This can be a static value or a value that can be computed at the time of the request, as in the following two examples:
!supportemptyparas]>
Here's a concrete examp
After the installation, we'll discuss the syntax of the JSP. If you're lazy, you can download the grammar card and if you're unfamiliar with Java programming, you might want to refer to the Sun's manual; However, the site creator should not do much Java development. In addition to a few function calls, the Java program code that appears on your JSP page should minimize it;
With that in mind, let's take a lo
After the js| syntax is installed, let's discuss the syntax of the JSP. If you are lazy, you can download the grammar card and if you are unfamiliar with Java programming, you may want to refer to the Sun manual; However, the site creator should not do much Java development. In addition to a few function calls, the Java program code that appears on your JSP page should minimize it;
With that in mind, let's
[Servlet JSP] From JSP to Servlet
JSP and Servlet are both sides of the Integration. JSP will eventually be translated into Servlet Source Code by containers, automatically compiled into. class files, loaded into. class files, and then generated Servlet objects.
The Servlet class after container translation has method
When you create a Web project using MAVEN, the JSP introduces a static file to indicate an error.Error tip: Javax.servlet.ServletException cannot be resolved to a typeErrors such as:Solution:The following dependencies can be raised in Maven's Pom file:Links: Maven Central Warehouse Address: http://mvnrepository.com/When you create a Web project using MAVEN, the JSP introduces a static file to indicate an er
js| Tutorial
Use of Jsp:usebean Action
First, the grammar:Id= "Beaninstancename"Scope= "Page|request|session|application"{class= "Package.class" |Type= "Package.class" |class= "Package.class" type= "Package.class" |Beanname= "{package.class | }{/> |> Other elements}
This action enables you to load a javabean into a JSP page. This is a very useful capability because it allows you to use reusable Java classes without sacrificing performance. The simples
js| Array | page
In the forum often see someone asked how to pass the array between JSP pages, in fact, with JavaBean is very easy to achieve.
Here's a simple example of what type of data structure can be passed as long as you follow JavaBean's game rules:
1: Write a test for Javabean:package Com.infoearth;public class jobbean{private int[] b;
/** * @return return B. * * Public int[] Getb () {return b;}/** * @param b to set. */public void Setb (int
Include|js First Example:
File1:
String str = "AAAAA";
%>
File2:
str = str + "BBBBB";
%>
Results:
Error accessing File1, indicating that variable STR cannot be resolved in file2.
Analysis:
When requesting File1, Tomcat first converts two JSP files to servlet (. java) files. You then attempt to compile both into. class files, at which point File1 compiles normally, and file2 does not compile.
Conclusion:
Unlike the Include-file directive, wh
mod_jserv.so to the Apahce libexec directory
Cd/usr/local
Cp/usr/local/mod_jserv.so/www/libexec
4) Install Tomcat
Cd/usr/local
Tar zxpf jakarta-tomcat-3.1.1.tar.gz
Generate/usr/local/jakarta-tomcat Directory
5) Configure System variables
Vi/etc/profile//Edit/etc/profile
At the end of the file, add:
Path= "$PATH:/usr/local/jakarta-tomcat/bin:/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/jre/bin"
java_home=/usr/local/jdk1.2.2
Export Java_home
Jre_home=/usr/local/jdk1.2.2/jre
Expo
js| vote one, preface
The original author of this article is Tony Wang, which covers the reading and writing of files and the automatic generation of JPG images. Using Jsp+servlet technology, the JSP calls the servlet to generate pictures.
Second, the first document INDEX.JSP as follows:
Author:tony Wang
E-mail:lucky_tony@163.net
Date:2001-01-01
If you have any questions about the program, you can co
JSP compilation directives: directives are issued to the JSP container via the attribute configuration in the directive to control certain features of the JSP pageJSP Directive format: 1.page: Used to set the global properties in a JSP pageThe page directive is at the top of the screen and can have multiple page direct
After the installation, we will discuss the JSP syntax. to be lazy, you can download the syntax card. If you are not familiar with Java programming, you may want to refer to Sun's user manual. However, website creators should not do too much Java development. except for a few phone calls, the Java code that appears on your JSP page should be minimized;After remembering this, let's take a look at the
Nine built-in objects and four attribute ranges in JSP, nine built-in objects in jsp
Nine built-in objects and four attribute ranges in JSP
Generally, an object can be called only when it is instantiated, while the built-in JSP object can be called directly without instantiation.
There are a total of 9 corresponding to
I. Script element: insert Java code into the servlet corresponding to the JSP page.The form of script element 3:Expression, scriptlet, declaration.2. expression: Convert the data or data operation result to a string and insert it to the input stream of the current servlet (_ jspservice method ).
1. jsp expression standard syntax:
JSP expression XML Syntax:
2. the
Methods for referencing other pages in jsp pages, and methods for referencing jsp pages
First look at this title .... everyone's feelings must be good 2 ..... the Blogger must talk about jsp dynamic reference (jsp: include) and static reference (@ include. This article introduces the differences between the two .. .. T
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.