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
Today, in the project encountered a problem, two JS page to share a JS object. JS global variables and static variables are not good, other hard to force the small farmers do not have to insist. And LZ do not want to use cookies to store, one is
webjxcom Tip: 2001 Contact JSP, when the tag library, n-tier structure development, design patterns, such as Java EE thought has just sprouted, each JSP file is pure Java embedded code, JavaScript, HTML mixed, to achieve the function of the first
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 =
Source code, a.jsp to b.jsp value:
a.jsp Page Content:
Name
b.jsp Page Content:
Phenomenon: Chinese garbled, such as "??????"
The workaround is as follows:
Method One:
1. In b.jsp, replace pageencoding= "GB2312" with pageencoding= "Iso8859-1"
js| Data | database (reprint please indicate the source)
From:http://aspfans.yeah.net
Java beans that require two programs, JSP files, and database operations
select.jsp
select everything from a database
format Results
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| Solutions | problems | Chinese in JSP, Chinese garbled often make people confused.
For the common countermeasures of Chinese processing, the following 2 kinds are often visible on the Internet:
Contenttype=
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 For example from the Blazix server's logo library in your system environment can not be used, then do not use the logo library to achieve similar functions? This tutorial is proposed for this issue. This problem can be solved, but the code should
JS with JSP developed a program for a lot of time, but the feeling of the master of JSP is still not enough. Now let's analyze the *_jsp.java file after the *.jsp file is compiled.
First write a simple my.jsp file as follows:
"
baiming
Hello
js| Online | Number of online people complete JSP online number
* * This is the class that manages user information
File name is Onlineuser.java
Welcome to Visit Javajia Home (http://www.javajia.com), made by yuking. 2001.1.1
*/
Import
JS One, preface
For starters, it's a good choice to implement JSP and Servlet,tomcat. Tomcat is a product of the Apache organization, and Sun's support for it is pretty good.
Second, download, install
Download address for Java official site:
js| Compiling | The problem is the easiest way to do JSP precompilation so far (the "flick-a-switch" approach), and he has many points to the point where there are no meaningful flaws. If an error occurs during the compilation of a JSP or when it is
js| Tips
1.JSP page Input content display tag text and line Wrap processing
Enter two lines of text from the input page's text entry box:
Lt;br>huuhhlt;b>
After the confirmation to the next
js| Tutorial newuser.jsp files
Description: The user registers the page, has the user name, the password, the homepage, the Email, the personal signature and so on information, mainly uses in provides the user to enter the registration information,
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| Report Printing | Resolution 1. The style of making reports in Word or Excel.
Excel's Row height and column width units cannot be represented in mm or cm.
needs to be calculated. Under 1024*768, the 1CM is about 38 pixels.
This is the
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