1.1 application* Obtain the application object in jsp (preferred for SUN Enterprise applications)For example, getServletContext (). setAttribute ("counter", new mycount. Counter ());Example: * Methods for handling On Application Start and On Session
Obtain the data in the database through the jsp (preferred for SUN enterprise-level applications) program, and then control the display mode through the program. This obvious disadvantage is that if the data volume is large, there will be
Introduction
The Web portal provides a central gateway for users to access various resources and services. At the same time, they also provide users with a platform to share resources with other users. From photos to audio and video files to
This is a simple jdbc odbc bridge connection.First, you must create a database. Open the control panel and set the data source name to TestData in the configuration system dsn.Import java. SQL .*;Class SqlTest{Public static void main (String [] args)
The code for connecting to the Sybase database instance Using jsp is as follows:
String url = "jdbc: sybase: TTL: localhost: 5007/tsdata ";
// Tsdata is your database name
Properties sysProps = System. getProperties ();
SysProps. put (
Compile a filter chain to implement the following functions:1. Compile the filter program EncodingFilter to implement Chinese transcoding in POST mode.2. Compile the filter program liuyanfilter to convert the user input username "Zhang" into "Li"
In web development, you often encounter the following problem: After you click the submit button on the page, the data is saved to the database, and then press F5 to refresh the page, and the same data is generated. Solution: struts token mechanism.
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 script expression
JSP template Elements1. the HTML content on the JSP page is called a JSP template element.
2. the JSP template element defines the basic skeleton of a webpage, that is, the structure and appearance of the page.JSP script expression1. JSP script
Action code snippet
Copy codeThe Code is as follows:Public String execute (){String ret = super.exe cute ();
If (RETURN_LIST.equals (ret )){Return list ();} Else {Return ret;}}
Public String list (){String show = this. getRequest (). getParameter
Deploy Servlet Filters
In fact, deploying filters with Web applications does not involve any complexity. You only need to include the filter class and other Web component classes, and put the web as you normally do. xml files, together with the
Development environment required for compiling Servlet
The basic environment required for Servlet development is JSDK and a Web server supporting Servlet.
1. JSDK (Java Servlet Development Kit)
The JSDK contains the Java class libraries and related
How can I get a running environment of Servlets and JSP?
No matter what server you are using, you can find the Servlets engine for this server.
You can try to use these different Servlets engines, but I suggest using Allaire's JRun. JRun intercepts
There are three different ways to use assumerver Pages to process XML documents. Each method helps improve the level of separating Page code from XML data, it simplifies the development of web pages and improves the reusability of components and
Applet security constraints
The Applet code comes from the web host and runs in the browser of the end user's machine. Harmful viruses containing the Applet may cause destructive effects. to prevent such an Applet, the Applet is restricted by
HTTP is a stateless protocol. For today's web applications, we often need to record the connection between a series of requests from a specific client. There are already many session tracking technologies, but they are not very convenient for
As the servlet prints html code in the middle of the class, it is very troublesome to write the code and is not easy to maintain. sun launched jsp.But does this mean that we cannot output html code in the bean in the jsp + bean architecture?Please
1. What does EJB2.0 have? Where are they used? What is the difference between EJB2.0 and EJB1.1?
A: The specifications include Bean providers, application assemblers, EJB containers, EJB configuration tools, EJB service providers, and system
1 HelloWorld Example--------------String Msg = "This is a jsp (preferred for SUN Enterprise Applications) Test ";Out. print ("Hello World ");%> // The Java module declares Msg as a string variable.-------------- // output variable2. Display
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.