Home arrow JavaScript arrow Page 2 - Intergrate DWR into Your Java Web Application
JAVASCRIPT

Intergrate DWR into Your Java Web Application


If you want to build your Ajax application around a JavaScript framework, you will need to use Direct Web Remoting code. This article shows you how. It is excerpted from Hack 43 from the book Ajax Hacks, written by Bruce W. Perry (O'Reilly; ISBN: 0596101694). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

Author Info:
By: O'Reilly Media
Rating: 3 stars3 stars3 stars3 stars3 stars / 2
July 24, 2008
TABLE OF CONTENTS:
  1. · Intergrate DWR into Your Java Web Application
  2. · Configuring the Application
  3. · Direct Web Remoting (DWR) for Java Jocks
  4. · Direct Web Remoting (DWR) for Java Jocks continued

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Intergrate DWR into Your Java Web Application - Configuring the Application
(Page 2 of 4 )

To get DWR going with your JavaScript, you have to declare in web.xml a Java servlet that DWR uses. Here is the chunk of code that you have to add to web.xml. If web.xml already includes registered servlets, nest this newly declared servlet in with the existing ones (the same goes for the servlet-mappingelement):

  <servlet>
      <servlet-name>dwr-invoker</servlet-name>
      <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
      <init-param>
         
<param-name>debug</param-name>
          <param-value>true</param-value>
      </init-param>
  </servlet>

  <servlet-mapping>
      <servlet-name>dwr-invoker</servlet-name>
      <url-pattern>/dwr/*</url-pattern>
  </servlet-mapping>


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials