Code Monkey home page Code Monkey logo

dwr's Introduction

DWR - Direct Web Remoting

DWR is a Java library that enables Java on the server and JavaScript in a browser to interact and call each other as simply as possible. DWR is Easy Ajax for Java.

Website http://directwebremoting.org
Forum https://discourse.dojo.io/c/dwr-users

Old mailing lists Mailman archive:
http://mail.dojotoolkit.org/mailman/listinfo/dwr-users
http://mail.dojotoolkit.org/mailman/listinfo/dwr-dev

Old mailing lists Nabble archive:
http://dwr.2114559.n2.nabble.com/DWR-Users-f2114559.html
http://dwr.2114559.n2.nabble.com/DWR-Dev-f5409447.html

Building DWR

DWR is primarily built using ant. The important ant targets are:

  • clean: Removes target files and .DS_Store files left around by OSX
  • jar: Create a new dwr.jar file
  • war: Create a clean unpacked demo war file for tomcat/jetty/etc
  • package: Build a set of output .zip files for distribution

The DWR build system can be adapted to create outputs containing different modules (see Terminology) so it is simple to create a dwr.jar file that contains exactly the modules that you need. See the 'modules' property and the execution of the 'build' macrodef.

The ant outputs are stored in dwr/target/ant.

Terminology

Module: DWR is made up of a number of modules. The idea is that these modules are as independent as possible. Spring integration is an example of a module. The modules are grouped into four areas: core, protocol, serverside, ui

  • core: The heart of DWR
    • api: All the important interfaces and classes for users and integrators
    • impl: Implementations of the interface points, of use most to DWR developers
    • legacy: For backwards compatibility
  • protocol: A set of ways of talking to the network
  • serverside: Integrations with various server-side technologies
  • ui: Integrations with various user interface technologies

Each module may contain a number of source trees. One for test, one for demos, one for the main sources and maybe one for generated code. The module may also contain a web directory to be merged into an output war file.

Licensing information

DWR is a subproject of Dojo which is a member of the JS Foundation.

© 2005 JS Foundation under Apache 2.0 license.

DWR includes derivative works under other copyright notices and distributed according to the terms of their respective licenses, please see COPYRIGHT.txt and LICENSE.txt for details.

dwr's People

Contributors

dmarginian avatar mikewse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dwr's Issues

Website seems down now

Can someone look at the main website? The main site is now broken.

There was also an issue with the DTD earlier. Could we please get this fixed?
Thanks.

Consider a reactive way to make services.

Using a reactive lib (projectreactor.io or reactivex.io), make possible to publish services using the reactive concepts like Flux, Mono and make able to a client, in Javascript, observe the changes using a solution like TEXT_EVENT_STREAM or any kind of solution that keep the connection opened, to handle changes.

DWR is so amazing but need to keep updated, following the tendencies.
I'm open to discuss and build a new reactive DWR, if wanted.

Wildfly: IllegalStateException running Async

Getting the following error in Wildfly 10.1 when I run in with <async-supported>true</async-supported>


16:33:15,634 ERROR [stderr] (default task-233) Exception in thread "default task-233" java.lang.RuntimeException: java.lang.IllegalStateException: WFLYCLWEBUT0001: Session kTZwtiijfbNrhkJVnugUEPgZWSdz_2t22yVzvG9O is invalid
16:33:15,635 ERROR [stderr] (default task-233) 	at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:898)
16:33:15,635 ERROR [stderr] (default task-233) 	at io.undertow.servlet.spec.AsyncContextImpl$4.run(AsyncContextImpl.java:333)
16:33:15,635 ERROR [stderr] (default task-233) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
16:33:15,636 ERROR [stderr] (default task-233) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
16:33:15,636 ERROR [stderr] (default task-233) 	at java.lang.Thread.run(Thread.java:748)
16:33:15,636 ERROR [stderr] (default task-233) Caused by: java.lang.IllegalStateException: WFLYCLWEBUT0001: Session kTZwtiijfbNrhkJVnugUEPgZWSdz_2t22yVzvG9O is invalid
16:33:15,636 ERROR [stderr] (default task-233) 	at org.wildfly.clustering.web.undertow.session.DistributableSession.validate(DistributableSession.java:55)
16:33:15,636 ERROR [stderr] (default task-233) 	at org.wildfly.clustering.web.undertow.session.DistributableSession.getAttribute(DistributableSession.java:142)
16:33:15,636 ERROR [stderr] (default task-233) 	at io.undertow.servlet.spec.HttpSessionImpl.getAttribute(HttpSessionImpl.java:122)
16:33:15,636 ERROR [stderr] (default task-233) 	at org.directwebremoting.dwrp.BaseDwrpHandler.updateRegisteredDwrSession(BaseDwrpHandler.java:161)
16:33:15,636 ERROR [stderr] (default task-233) 	at org.directwebremoting.dwrp.BaseDwrpHandler.updateCsrfState(BaseDwrpHandler.java:150)
16:33:15,637 ERROR [stderr] (default task-233) 	at org.directwebremoting.dwrp.BasePollHandler$2.run(BasePollHandler.java:209)
16:33:15,637 ERROR [stderr] (default task-233) 	at org.directwebremoting.impl.BaseSleeper.doClose(BaseSleeper.java:227)
16:33:15,637 ERROR [stderr] (default task-233) 	at org.directwebremoting.impl.BaseSleeper.doWork(BaseSleeper.java:148)
16:33:15,637 ERROR [stderr] (default task-233) 	at org.directwebremoting.server.servlet3.Servlet30Sleeper.resumeWork(Servlet30Sleeper.java:97)
16:33:15,638 ERROR [stderr] (default task-233) 	at org.directwebremoting.server.servlet3.Servlet30Sleeper.access$000(Servlet30Sleeper.java:32)
16:33:15,638 ERROR [stderr] (default task-233) 	at org.directwebremoting.server.servlet3.Servlet30Sleeper$2.run(Servlet30Sleeper.java:83)
16:33:15,638 ERROR [stderr] (default task-233) 	at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:83)
16:33:15,638 ERROR [stderr] (default task-233) 	at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:154)
16:33:15,638 ERROR [stderr] (default task-233) 	at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:151)
16:33:15,638 ERROR [stderr] (default task-233) 	at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:896)
16:33:15,638 ERROR [stderr] (default task-233) 	... 4 more

JDK 17 support

Hi,
We currently are on dwr version 3.0.3. Because of some security issues, we are planning to upgrade our product to JDK 17. Is there a dwr version that can support this?

Variables leaking into global namespace from AMD module

I found these two variables defined in engine.js becoming global variables:

  1. dwr
  2. httpMethod

dwr seems to be globally assigned in line 620ff. by purpose(?) although it is not quite clear to me, why.

However, httpMethod is IMHO missing its variable declaration and thus, is erroneously interpreted as global variable in line 1669.

DWR Session ID is not changing after logging out from Application

Issue : DWRsessionID is not changing when we logging out from application and then login from the same browser. This improves the chance for CSRF attack . The issue is happening in same browser window when we logout and then login , the application jsessionid is changing .

DWR Version - 3.0.2-release

JSON dates should be ISO 8601 format strings

From mailing list:

When I fetch something which has a Date member then the json contains something like
{
"currentSeason": "N",
"openStatus": "O",
"seasonEndDate": new Date(1543536000000),
"seasonId": 14,
"seasonStartDate": new Date(1512086400000),
},

JSON dates should instead be formated to ISO 8601 strings such as:
2012-04-23T18:25:43.511Z

hi . we need update dwr version ( to. spring boot )

우리는 한국의 개발자들입니다. ( 메가존 클라우드의 개발팀 이기도 합니다 )

당신들이 만들어 놓은 Reverse Proxy Ajax 라이브러리를 적극적으로 사용중입니다.

Web Socket을 사용할 수도 있었으나, socket open의 문제보다는 reverse proxy ajax 방법이 더
효과적이라고 생각했습니다.

우리의 아키텍쳐는 spring boot를 근간으로 하고 있기때문에, DWR 3.0.2 version 을 사용 시
여러가지 문제를 안고 있었어야 했습니다.

특히, config 문제와 web.xml 및 관련한 dwr.xml 을 로드하는 문제등을
boot에서 처리하기가 힘들어서 우리는 당신들의 코드를 수정하여, 재 빌드하기로 결정하였습니다.

많은 부분은 아니지만, 이 문제를 해결한 버전을 공유하기 위하여, 아래와 같이 이슈를 제기하며
알림을 드리는 바. 입니다.

우리가 올려놓은 레파지토리를 공유드리며, 필요하다면 pull request 를 드리도록 하겠습니다.

url : https://github.com/313DEVGRP/DWR
artifact : http://www.313.co.kr/nexus/service/rest/repository/browse/ple-releases/313devgrp/dwr/
감사합니다.

개발팀 리더 . 이동민 드림.
( 추신: dwr 의 홈페이지는 유용하였으나, 최신화된 정보를 얻기에는 너무 힘들었습니다. 업데이트 할 계획이 있나요? )

Can't upgrade from 2.0.10 to 3.0.2

Hi I've been trying to upgrade DWR from 2.0.10 to 3.0.2 but it hasn't been possible. Besided configuring the private values of the engine.js is there anything else that's needed for the upgrade? Or is there a doc with the main changes of the new version?
Thanks

SpringBoot Issue - LaunchedURLClassLoader throws java.lang.IllegalArgumentException

When porting an Spring MVC/DWR application to Spring Boot 1.5.6/Spring MVC 4/DWR 3.0.2-release the exception bellow happens, this issue dosen´t happen when running inside an IDE.
I found out that that SpringConteiner behavior depends on classloader behavior the methord void tries to addParameter(String askFor, Object valueParam) with askFor = response:org.directwebremoting.servlet.CachingHandler but the classloader is the org.springframework.boot.loader.LaunchedURLClassLoader that, instead of throwing a ClassNotFoundExeption, throws an java.lang.IllegalArgumentException - because it interpreters as an illegal url that begins with response. I will pull a request correcting this.

log4j:WARN Please initialize the log4j system properly.
2017-09-18 16:49:34.070  INFO 1116 --- [           main] org.directwebremoting.log.startup        : Starting: DwrController v3.0.3-dev on jetty/9.4.6.v20170531 / JDK 1.8.0_144 from Oracle Corporation at /sgc-web
2017-09-18 16:56:33.943 ERROR 1116 --- [           main] o.d.spring.DwrController                 : init failed

java.lang.IllegalArgumentException: name
        at sun.misc.URLClassPath$Loader.getResource(URLClassPath.java:729) ~[na:1.8.0_144]
        at sun.misc.URLClassPath.getResource(URLClassPath.java:239) ~[na:1.8.0_144]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:365) ~[na:1.8.0_144]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_144]
        at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_144]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_144]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_144]
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) ~[sgc-online-war-SBL-1.0.0-SNAPSHOT.war:SBL-1.0.0-SNAPSHOT]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_144]
        at org.springframework.util.ClassUtils.forName(ClassUtils.java:250) ~[spring-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.directwebremoting.spring.SpringContainer.addParameter(SpringContainer.java:63) ~[dwr-3.0.2-RELEASE.jar!/:na]
        at org.directwebremoting.impl.StartupUtil.setupDefaults(StartupUtil.java:565) ~[dwr-3.0.2-RELEASE.jar!/:na]
        at org.directwebremoting.impl.StartupUtil.setupDefaultContainer(StartupUtil.java:246) ~[dwr-3.0.2-RELEASE.jar!/:na]
        at org.directwebremoting.spring.DwrController.afterPropertiesSet(DwrController.java:191) ~[dwr-3.0.2-RELEASE.jar!/:na]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) [spring-beans-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) [spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) [spring-context-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
        at br.org.energia.csi.sgc.web.SGCStarter.main(SGCStarter.java:33) [classes!/:SBL-1.0.0-SNAPSHOT]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [sgc-online-war-SBL-1.0.0-SNAPSHOT.war:SBL-1.0.0-SNAPSHOT]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [sgc-online-war-SBL-1.0.0-SNAPSHOT.war:SBL-1.0.0-SNAPSHOT]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [sgc-online-war-SBL-1.0.0-SNAPSHOT.war:SBL-1.0.0-SNAPSHOT]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) [sgc-online-war-SBL-1.0.0-SNAPSHOT.war:SBL-1.0.0-SNAPSHOT]

ControllerParser has inappropriate code

inappropriate code

if ("dwr:config-param".equals(child.getNodeName()))
{
    params.put(child.getAttribute("name"), child.getAttribute("value"));
}

correct

if ("config-param".equals(element.getLocalName()))
{
    params.put(child.getAttribute("name"), child.getAttribute("value"));
}

Marshalling errors in lists do not get propagated to the client

Reported in forum https://discourse.dojo.io/t/marshalling-errors-in-lists-do-not-get-propagated-to-the-client/388

Hi,
when i have a marshalling error inside an object in a list it is silently ignored contrary to the bahaviour of a marshalling error in a single object.
I except to also get an "Error marshalling data. See the logs for more details." or get the DWR error handler triggered. But that is not the case. Instead i get a result list with a null entry and the server logs the following warning (not error) to the server log:

[org.directwebremoting.convert.CollectionConverter] [WARN ] - Conversion error for java.util.Arrays$ArrayList.
org.directwebremoting.ConversionException: Error marshalling data. See the logs for more details.
	at org.directwebremoting.extend.PropertyDescriptorProperty.getValue(PropertyDescriptorProperty.java:74)
	at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:298)
	at org.directwebremoting.impl.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:441)
	at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:213)
	at org.directwebremoting.impl.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:441)
	at org.directwebremoting.extend.ScriptBufferUtil.createOutput(ScriptBufferUtil.java:68)
	at org.directwebremoting.dwrp.BaseCallHandler$CallScriptConduit.addScript(BaseCallHandler.java:485)
	at org.directwebremoting.dwrp.BaseCallHandler.marshallOutbound(BaseCallHandler.java:345)
	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:105)
	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: fail
	at MyRemoteService$MyDto.getProp(MyRemoteService.java:19)
	at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.directwebremoting.extend.PropertyDescriptorProperty.getValue(PropertyDescriptorProperty.java:70)
	... 31 more

Here is the code to reproduce it with DWR version 3.0.0 RC2-final:

MyRemoteService.java

import java.util.Arrays;
import java.util.List;

import org.directwebremoting.annotations.DataTransferObject;
import org.directwebremoting.annotations.RemoteMethod;
import org.directwebremoting.annotations.RemoteProperty;
import org.directwebremoting.annotations.RemoteProxy;

@RemoteProxy
public class MyRemoteService {

	@DataTransferObject
	public static class MyDto {
		@RemoteProperty
		public String getProp() {
			if(true) {
				throw new RuntimeException("fail");
			}
			return "success";
		}
		
	}
	
	
	// Works as expected (throws an error to the client)
	@RemoteMethod
	public MyDto getSingleObject() {
		return new MyDto();
	}
	
	// Does not throw an error to the client (just logs a warning) !
	@RemoteMethod
	public List<MyDto> getList() {
		return Arrays.asList(new MyDto());
	}

}

WEB-INF/web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  <display-name>myWebapp</display-name>  
  <servlet>
	<description>DWR controller servlet</description>
	<servlet-name>DWR controller servlet</servlet-name>
	<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
	<init-param>
	  <param-name>debug</param-name>
	  <param-value>false</param-value>
	</init-param>
	<init-param>
	  <param-name>crossDomainSessionSecurity</param-name>
	  <param-value>true</param-value>
	</init-param>
	<init-param>
	  <param-name>allowScriptTagRemoting</param-name>
	  <param-value>false</param-value>
	</init-param>
	<init-param>
	  <param-name>maxCallCount</param-name>
	  <param-value>1000000</param-value>
	</init-param>
	<init-param>
	  <param-name>classes</param-name>
	  <param-value>
				MyRemoteService,
				MyRemoteService$MyDto    
	  </param-value>
	</init-param>
  </servlet>
  <servlet-mapping>
	<servlet-name>DWR controller servlet</servlet-name>
	<url-pattern>/dwr/*</url-pattern>
  </servlet-mapping>
  <session-config>
	<session-timeout>2280</session-timeout>
  </session-config>
</web-app>

dwr.xml

<!DOCTYPE dwr PUBLIC
	"-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN"
	"___http://directwebremoting.org/schema/dwr30.dtd">

<dwr>
  <allow>      
	
   
	
	<!-- Also convert exceptions, so debugging is easier -->
	<convert match="java.lang.Exception" converter="exception"/>
	<convert match="java.lang.StackTraceElement" converter="bean"/>    
  </allow>
</dwr>

In the javascript console:

MyRemoteService.getSingleObject() -> triggers errohandler
MyRemoteService.getList(function(result) {console.log(result)})
>[null]

DWR with tomcat 10

Hi
Does DWR have a new version that works with Tomcat 10.0?
DWR is using javax.servlet.http.HttpServletRequest but it has been changed in Tomcat 10
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.