last month, the website published by ASP, the results encountered a variety of problems, for the future, or to write down a convenient point. 1. The page you requested cannot be provided due to an extended configuration issue. If the page is a
Today, referring to the official Microsoft (http://www.asp.net) study Webapi, here excerpt from the following:ObjectiveHTTP is not just for generating web pages. It is also a powerful platform that can build APIs for exposing services and data. HTTP
Introduction
Jsp: useBean action is used to load a JavaBean that will be used on the JSP page. This function is very useful because it enables us to take advantage of Java Component Reuse and avoid the loss of JSP convenience.
Syntax:
Id:
A good code architecture is not only easy to develop and maintain, but also an art of management and execution.
Over the past few years, I have gone through many projects, and I am deeply disgusted with the problems of strong coupling between codes,
The code in test. jsp is as follows:
Copy codeThe Code is as follows: test using Java Bean in JSP message:
: defines a java bean instance. The instance name is test and the class name is SimleBean.: sets the property name of the test instance. The
Next, if the items type in is map or Collection, how can we use the enhanced for loop;First, create a tag processor class and define two attributes: String var; Object items;Because items needs to iterate various sets, objects must be used;Then
Zookeeper
1. Whether or not the browser disables cookies, the server will rewrite the URL upon first access.However, if the cookie is not disabled after the second visit, the server will not perform the URLRewrite. If disabled, rewrite the URL. This
When I read J2EE, I saw the use of cookies to store information. The examples in this book are all English key-value pairs. I just want to know if Chinese is the same? I tried it again. If you don't talk much about it, go directly to the Code:
For
JSP and JavaBeans1. Use beansTo use benas on a JSP page, we must use the JSP action tag useBean.UseBean format:
When a JSP page containing useBean action tags on the server is loaded and executed, the JSP Engine first searches for the built-in JSP
Copy codeThe Code is as follows:// Filter classPublic class EcondingFilter implements Filter {Private String charset = null;Private ServletContext context = null;Private String path = "";/*** Store data in a local file before destruction*/Public
Like starting struts2, it also has an entry, that is, the doFilter method of org. apache. struts2.dispatcher. ng. filter. StrutsPrepareAndExecuteFilter.
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws
Displaying with jstl is more neat and less code than displaying with jsp
SearchRetrieval time:
Total number of records:
" escapeXml="false" />
The
Entries
Title:
Date:
Let me share with you today, request. getHeader ("Referer") gets the URL link of the last visit, and under what circumstances will it cause problems!On some pages, how many buttons can be used to jump to action. do? Method = m. However, I
The project package naming rules are generally as follows: com. amos. domain encapsulates JavaBean. Generally, I like to name this package com with model. amos. dao encapsulates the dao layer com. amos. dao. daoimpl implements the dao layer
Question: The Chinese Text to be output in jsp is displayed as "?"Solution: Search for jsp in eclipse-windows-preferences and select Chinese in the Encoding option. In this way, the newly created jsp file can be displayed in Chinese.Modify the
Learn With your mind
Struts tag definition taglib
Set the Development Mode devmode in Struts. xml
Set the default encoding in Struts. xml
The Struts. xml file contains other modules.
Mark error in
We know that the double type will involve precision loss during processing, for example, double d = 100*1.005; the result of result d is 100.49999999999999. How can this problem be solved by DecimalFormat, it is used to round the double type as
Lesson 3-JSP-useBean usage and Explanation
One worker basic element Bean class:
1. there must be an empty constructor. When the JSP element creates the Bean, it will call the empty constructor 2. there cannot be any public instance variables
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