-
2. Re: JBoss Portal + DWR
lvcster Jan 4, 2008 5:52 AM (in response to lvcster)hi, thanks for the link. But i have 1 problem, i downloaded the zip file on from the link and deployed it into the JBoss, and opened the http://localhost:8080/portal, i can see the portlet - nice. but when i click on it, it just opens the blank page with the disclaimer 'Powered by JBoss Portal'. So i can't go on and test if the DWR is working or not. Any idea what can be the problem?
Another thng this code displayed from the link you gave me...
<script type="text/javascript"src='/dwr/interface/Destination.js'>
is different from the 1 that comes with the war file...
which is the most working 1.
thanks.
lvcster. -
3. Re: JBoss Portal + DWR
tomstrummer Mar 26, 2008 12:54 PM (in response to lvcster)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.