We know that JSP pages need to be converted to servlets and must be encoded during the conversion process. The following code plays a critical role in translating the JSP into the servlet process.In the above code there are two places encoded: pageencoding, ContentType CharSet. Where pageencoding is the encoding of the JSP
Java JSP Learning Series 4. I. preface Orion: it is small, but has a lot of functions. if you don't talk about it, you can see its current support: (1) ServletsJSP (2) EJB (3) HTTP (note: Apa 1 and preface are no longer required
Orion is small, but has a lot of functions. if you don't talk about it, you can see its current support:
(1) Servlets/
"Switch" to forward requests from the web browser to the corresponding serverpage. A deployment description file (web-inf/web. xml) must be written when developing a web application ). This file describes the configuration of your web application, including the welcome pages (the files that appear in the directory when the request is not specified), servlet (path or extension) serving with those servlets parameters. In this file, you configure struts
The default encoding method in Java is Unicode, so it is easy to use Chinese characters. The common solution is
Java code1. String S2 = new string (s1.getbytes ("ISO-8859-1"), "UTF-8 ");String S2 = new string (s1.getbytes ("ISO-8859-1"), "UTF-8"); 1, utf8 to solve the JSP Chinese garbled problem:Generally, at the beginning of each page, add:
sent to the browser together. Both ASP and JSP are WEB server-oriented technologies, and client browsers do not require any additional software support.ASP's programming language is the scripting language such as VBScript, JSP uses Java, this is the most obvious difference between the two. In addition, there is a more fundamental difference between ASP and
with the following:
Note that I'm using port 8008 here.
Iv. Testing
(1) Launch Orion:
Under the Orion Directory, Command mode runs:
Java-jar Orion.jar
The orion/x.x.x initialized will appear, and my version here is 1.4 so show:
orion/1.4.0 initialized
This means that you have succeeded.
(2) Execute JSP file
In the browser, enter:
http://localhost:8008/
Appears: Orion application Server 1.4.0-
class, then generates the servlet instance through the reflection mechanism and then to the service () in the servlet method, and then calls the corresponding Dopost () and Doget () methods according to whether a post or get is requested by method.How to invoke the request and response objects in the JSP:Request and Response object source: From Doget (httpservletrequest request, httpservletresponse response)In the JSP can be used directly, the use of
First, what is a Web filterServlet APIs have long been a cornerstone of enterprise application development, while servlet filters are a relatively new complement to the Java EE family.A Servlet filter is an pluggable Web component that allows us to implement preprocessing and post-processing logic in a Web application. Filters support the basic request processing capabilities of Servlets and
you cannot directly access the built-in JSP objects, but pass through the parameter method. As follows: Lt %!Public String howBadFrom (HttpServletRequest req ){HttpSession ses = req. getSession ();...Return req. getRemoteHost ();}% Gt Lt %Out. print ("in general, lao lee is not baddie ");% Gt Lt % = howBadFrom (request) % gt
12. If the BROWSER has disabled COOKIES, how can I enable SESSION in JSP to tr
Here's a quick example, that shows a complete method, the use of a Java servlet to forward to a JSP (JavaServer Page).Just Pass the method an HttpServletRequest, an httpservletresponse, and a URL, and your ' re in business. Note that my JSP URL is string typically looks something like " /myPage.jsp ".private void Forwardtopage (final httpservletrequest request,
Java the basic JSP1. JSP IntroductionJSP is the abbreviation of JavaServer, is a kind of dynamic webpage technical standard which is advocated by Sun Microsystems Company and many companies participate together. Adding Java program code to the HTML file makes up the JSP Web page. When a Web server encounters a request
information10.2.3 save data in the Session Object10.3 instance: displays session information11. jsp and syntax Overview11.1 Overview11.2 JSP syntax summary table11.3 about template text (static html)12. script elements, commands, and predefined Variables12.1 JSP script elements12.1.1 JSP expression12.1.2
Software 152 Tang WeiFirst, the basic principle of JSP and the relationship with ServletBefore the JSP was present, we visited the Web site as a servlet, which returned the HTML code. Just like this: Out.Write"\ n");Out.Write"\ n");Out.Write"Out.Write"Out.Write "out. write ( "out. write ( "out. write ( "\ t"); out. print ( "out. write ( "\ n"); out. write ( "out. write ( " All the HTML code is exp
I. Preface
Orion is small, but has a lot of functions. If you don't talk about it, you can see its current support:(1) Servlets/JSP
(2) EJB
(3) HTTP (Note: Web servers such as Apache or IIS are no longer needed)
Ii. Download and install
For the Orion Application Server official site: http://www.orionserver.com/, I download orion1.4.pdf.
After the download, decompress the package to a directory. Here I use
First, the preface
Orion this thing, small, but the function is very much, nonsense not to say, look at its current support to know:
(1) servlets/jsp
(2) Ejb
(3) HTTP (Note: The description no longer requires a web Server such as Apache or IIS)
Second, download, install
Download address for Orion Application Server official site: http://www.orionserver.com/, I downloaded the Orion1.4 version.
After do
The JSP full name is Java Server Pages, which, like Servle technology, is a technology defined by sun to develop dynamic Web resources. The biggest feature of JSP technology is that writing JSP is like writing HTML, but it can only provide static data to the user compared to HTML, while
I. Basic concepts:
**************************************** **************************************** *****
1. Tag ):
A tag is an XML element. A tag can simplify and maintain a JSP webpage, and supports multiple language versions for the same JSP file. Because tags are XML elements, their names and attributes are case sensitive.
2. Tag Library ):A set of tags that have similar functions and are logically as
JSP Introduction: (Understanding)1) JSP background① in many dynamic Web pages, most of the content is fixed, only the local content needs to be dynamically generated and changed;② If you use a servlet program to output a Web page that only local content needs to be dynamically changed, all of the static content needs to be generated by the programmer in Java prog
Java -- jsp + ssh + select Dynamic Data Binding and selection (solution), java -- jsph
In a three-tier architecture and jsp combination project, how does one implement select Dynamic Data Binding and dynamic selection of specified rows? See the following:
1. Define a Bean class to instantiate the id and name of each da
First, JSP programming introductionJSP is a common static HTML and Dynamic HTML mixed coding technology, can be said to be a variant of the servlet, compared to the servlet it is more like a normal web page. The JSP will take a long time to run for the first time, in the nature of the servlet, which means that the JSP will be automatically converted by the server
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.