One, spring's proper use
Configuration of 1,dwr.xml
Copy Code code as follows:
Customermanager is the ID of the spring registration
2, page call
Copy Code code as follows:
Second,
In the previous issue, we talked about datawriter, which is essentially a product corresponding to datareader. In this issue, let's talk about Ext. Direct. Whether it's datawriter or ext. Direct, We can first check the official examples and combine
(1) Configure dwrservlet in Web. XML as follows:
DWR-invoker
org. directwebremoting. servlet. dwrservlet
debug
true
DWR-invoker
/DWR/*
(2) In
DWRConfigure in. xml
reslut -->
(3) Page Object lead object
(4) Page
debug
true
Resolution:
Parameters in the servlet range can only be obtained in the servlet Init () method. The configuration in Web. XML is as follows: mainservlet com. Wes. Controller. mainservlet param1 avalible in servlet Init () 0
Compile JavaCodeWe may often use buffalo to call Ajax, and publish a Java code directly to be remotely called by Js.
Method. At the same time, we may ignore the security issue. If the Java code is not as simple as reading data, it is to delete and
Ext. direct aims to provide a seamless streamline between the client and the server to form a single interface, so that we can reduce some tedious coding, for example, data verification and returned data packets (read data and error conditions ).
Implementation function: Sendmsg.jsp sends a message to the background, the background pushes the message to the Showmsg.jsp page.1, Web. XML configuration, add the following content in Web. xml:dwr
This method is suitable for embedding WebBrowser in C # to interact with the C # background code on pages loaded in the browser.
I. C # Program
1. Add WebBrowser to the C # form and add the URL of the page to the browser.
2. Add using System.
Copy codeThe Code is as follows: This js file can be stored in the jsp file you need to implement search results, or saved as a js file separately.Copy codeThe Code is as follows:Onkeydown = "oldKeyValue = this. value. trim (); setSelectedKey
This method works for embedded WebBrowser (browsers) in C # to interact with C # 's background code by loading pages in a browser.One, C # program1. Add WebBrowser (browser) to the C # form to add the URL of the page to the browser.2. Form code Add
Copy Code code as follows:
This JS can be placed in the JSP you need to implement search results, or save it as a JS file can be individually.
Copy Code code as follows:
Onkeydown= "Oldkeyvalue=this.value.trim ();
Brief introduction
The WEB portal provides a central gateway for users to access a variety of resources and services. At the same time, they provide a platform for users to share resources with other users. From photos to audio and video files to
Nv. jsp uses javascript to display lower-level menus on the page "> My JSP 'nv. jsp 'starting page Main Menu dwr. configure the ajax class and bean to be used in the xml configuration file. ajax
Configuration method:1 Official website Dwr.jar Package2 Web org.directwebremoting.servlet.dwrlistener dwr-invoker org.directwebremoting.servlet.dwrservlet debug true 3 Dwr.xmlA and Spring Integration B No integration with spring4 JSP page
During sshd integration, I simply wrote a program, but when I submitted the form data, there was a Chinese garbled problem. I have used several methods to solve the garbled problem, but it is useless. The so-called, fans of the Board, the audience.
1. Modify in tags. jsp
====================================
2. Modify the jqueryvalidate. js file.
VaR J = jquery. noconflict ();// It can only contain Chinese characters, English letters, and numbersJ. validator. addmethod ("maxntext ",Function
Copy codeThe Code is as follows:
This js file can be stored in the jsp file you need to implement search results, or saved as a js file separately.Copy codeThe Code is as follows: Onkeydown = "oldKeyValue = this. value. trim (); setSelectedKey ();"
Oriental estate wine User Name: password & nbsp; & nbsp; Code: select System Source Material Management System Sales Management System Office Management System Inventory Management System
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.