I have never understood the role of JAVABEAN in MVC. Now let's look at an instance.Define a JAVABEANPackage com. bean;Public class User {Private String userName;Private String userPwd;Public String getUserName (){Return userName;}Public void
"Window. location. href" and "location. href" indicate the current page Jump."Parent. location. href" is the previous page Jump"Top. location. href" is the outermost page Jump Example:If A, B, C, and D are all jsp, D is the iframe of C, C is the
Java codeIn principle, it is the trigger event of tr binding.Java code Java code// Click the mouse to trigger detailed display of a single row$ (Function (){$ ("# Demo tr"). bind ('click', function (){Var node = $ (this );Var list_RowIdNodes = node.
Framework mainly involves technologies: Spring + Struts2 + Hibernate + Freemarker
Let's take a look at the working principle of Struts2, so that we can easily consider the expansion points when designing the development
When writing Chinese characters in the JSP input box to the background, garbled characters often occur:
Today, I read a video from instructor Han shunping, got a preliminary understanding of the Garbled text, and wrote it out through my own
Data garbled during form submission:For get method submission:Find the server. xml in the conf folder under the tomcat installation path, and click Add URIEncoding = "UTF-8". See the red text section.ConnectionTimeout = "20000"RedirectPort = "8443"
During the project process, we often encounter such a situation that we need to perform single-point logon, that is, users can log on to a system and other systems at the same time.
Here is an example to illustrate how to implement Single-point
Programming: using the HttpSessionListener listener interface to listen to the current number of online usersRequirements:(1) Compile a class to implement the HttpSessionListener interface. In the public void sessionCreated (HttpSessionEvent se)
1. Create a new project and add a package under the src folder, for example, tianaoweb.com;
2. Add a class to the package:
Package com;Public class test {Public String sd (){Return "sd ";}}
3. introduce it at the beginning of the default homepage
Public String getImgFromByte (){// Obtain the byte [] data of the Image Based on the business logic
.......
InputStream buffin = new ByteArrayInputStream (/* byte [] Data */);String str = picUrl. getImageType ();String imgtype [] = str. split
Jsp security issues. When someone else knows the URL of a jsp file, they can skip the login page and directly access the jsp file. This prevents access by external users without permission. This article discusses how users who pass permission
1. Nine implicit JSP objects (built-in objects)RequestResponseSessionApplicationConfigPageExceptionOutPageContext
2. Briefly describe the values of each attribute of the page command.
Import attribute: the unique attribute allowed to appear multiple
1. Add the configuration information in $ CATALINA_HOME/conf/server. xml (standardization is getting closer and closer) and declare the specific information of the connection pool. Add the following content: factory org. apache (the
1. Static Page garbled
The file encoding is inconsistent with the encoding to be displayed in the browser.
1) Check the original file encoding. open the file in notepad and save it as a file;
2) Add a command to the current page to recommend that
JSP TechnologyJSP OriginIn many dynamic web pages, most of the content is fixed, and only some content needs to be dynamically generated and changed.If the Servlet program is used to output webpages with only some content that needs to be
After reading this online, there are several methods: 1. Add this code to the HEAD area on your table sheet page: 2 generate a token to be saved in the user session, add a hidden domain in the form to display the value of this token. After the
The getProperty tag is implemented this time. The main knowledge point is how to use reflection to call methods in the instance. Important parts have been annotated.
/*** Class description: Tag processing class, similar to the getProperty tag of jsp
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