[jboss-user] [JBoss Portal] - Re: JBoss Portal + DWR

tomstrummer do-not-reply at jboss.com
Wed Mar 26 12:54:04 EDT 2008


I don't know about the demo but I was able to get DWR 2 and 3 running in a portlet.  

Assuming the dwr definition is packaged in your portlet (called 'myPortlet')
First, go to /myPortlet/dwr/ and verify the debug pages display and the remote methods and DTOs look correct.

Then in my portlet's JSP I added this:

  |   <script src="${pageContext.request.contextPath}/dwr/interface/MyRemote.js" 
  |     type="text/javascript"></script>
  |   <script src="${pageContext.request.contextPath}/dwr/engine.js"
  |     type="text/javascript"></script>
  | 

and I can call the "MyRemote" methods just as if it were a WAR.  Don't forget you need the servlet definition in your web.xml.  In my case I used the DwrSpringServlet so I didn't have a dwr.xml, just a bean definition.

Also recommend using FireFox + FireBug extension to debug any client-side problems.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139047#4139047

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139047



More information about the jboss-user mailing list