Actionform Chinese garbled problem solving method in JSP tutorial
Let's take a look at actionform.
Actionform concept
Actionform is used to encapsulate the user's request parameters, and request parameters are passed through the form fields of
In the JSP page using the "" comment, the Java code in the note will be executed, you can view the page source code to see the implementation of the completion of the content, so that the code does not want to execute, affecting the load speed. For
JSP Common 7 Action instructions
1, Jsp:forward instructions
Performs a page shift and forwards request processing to the next page
2, Jsp:param instructions
Used to pass parameters
3, Jsp:include instructions
For dynamically introducing a JSP
This article mainly introduces how JSP gets the spring injection object, implements the code as follows, need friends don't miss
ServletContext sc = this.getservletconfig (). Getservletcontext ();
ApplicationContext AC2 =
1. When using the println () method for objects of type string, if the object is null, it will print null instead of raising the NullPointerException, which is an easy illusion, and can cause problems for subsequent operations on the string.
2. The
webjxcom Tip: In the JSP file, there is a sentence: "${buildinglist[0]!=null?buildinglist[0].distance:" When running in Tomcat 6, the following error was reported:
The JSP file has this sentence:
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 =
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
This article mainly introduces JSP compile instruction page, include, need friend can refer to the 1. JSP instruction Category: 1). Page 2. Include 3). Taglib Syntax: error occurred in test1.jsp. Error: Multiple annotations found
Js
Package coreservlets;
Import java.io.*;Import javax.servlet.*;Import javax.servlet.http.*;Import java.util.*;
/** shows the parameters sent to the servlet via either* Get or POST. Specially marks parameters that have* No values or multiple
js| Program
Information Publishing Interface
Provides an interactive interface for publishing information and invokes the RECORDMESSAGE.JSP program.
saymessage.jsp Information Release
Line name: Display serial Number: Tour content. When
Js| object today mainly studied the built-in object of JSP. What is an object? In object-oriented programming, an object is a variable consisting of operations and data as a complete entity.
Objects are based on a specific model in which the client
JS What is tag?
Tags are divided into two categories, with body markers, no body markers
A body marker is a pair.
Components that Mark Library
1. Tag Processor: A Java class file
2. Token Library descriptor file (TLD): A XML file
js| Program | Paging//This program uses a class that reflects the values of the query to automatically populate the Value object.
This class can refer to IBM's article: using class reflection to simplify the development of struts.
Package
JS Author: Tianma
While you can put large chunks of code in a script fragment (scriptlet), most Java code is a reusable component called Javabea. JavaBean are similar to ActiveX controls: they all provide common functionality and can be
js| Program | Web page JSP "grasping" the Code of the Web page is as follows:
String Scurrentline;String stotalstring;Scurrentline= "";Stotalstring= "";Java.io.InputStream L_urlstream;Java.net.URL L_url = new Java.net.URL
js| Access | data | database | questions
First, JSP access to the database method:
1. Create your own virtual directory, create a Web-inf\lib,web-inf\class,web-inf\jar under the virtual directory, and each directory description is as
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