dwr

Dwr and script session invalidation

Hi, We are using reverse ajax with polling in our DWR 2.0.6 based application. The problem is that when we move away from a page where reverse ajax was set to true, we want that ScriptSession to be invalidated. It does not happen by default. In the docs for DWR 3.0 it is mentioned that we can call dwr.engine.setNotifyServerOnPageUnloa...

DWR and Jquery into spring MVC 2.5

Hi, From my shallow reading, Spring MVC does not support jquery directly. It does enable integration with DWR framework. From my understanding of DWR, it is an ajax framework that allows you to call javas methods from javascript. Can I use both in my application? With Jquery handling most of the javascript code and client side inter...

Javascript: wait until ajax request finishes to close page

I would like the browser to keep the page open until the ajax requests are sent. This is what I imagine it would look like var requestsPending = 0; window.onbeforeunload = function() { showPleaseWaitMessage(); while(requestsPending > 0); } // called before making ajax request, atomic somehow function ajaxStarted() { reques...

Using Java server-side with PHP-generated front-end

Hi!  Does anyone have a real-world experience in building such a project? I'd like to move away questions about "is it good idea or not", but focus on possible solutions. I see one simple way - HTTP GET/POST + xml/json - and one more elegant - AJAX/DWR. As for the first one - I understand that it is possible, but needs quite a lot coding...

Call ordering in DWR

There is an option to make DWR AJAX calls to execute in sequence thru the following option DWREngine.setOrdered(true) But this is working globally (for entire application). I want to make enable this option only to certain Classes. Is it possible? ...

Reverse AJAX (Comet) and Spring MVC vs. Scala/LIFT?

There is a demo by IBM that shows how easy Reverse AJAX can be used with DWR 2. On the other hand, Scala/LIFT comes with built-in Reverse AJAX capability. Question: Any experience if this works fine with Spring MVC? Question: If you'd start from scratch, what are the pros and cons for preferring Scala/LIFT over DWR/Spring MVC Question...

Server side technology with ext-js

I have chosen Ext-JS to develop the UI for my next application. I am wondering what is the best way for Ext-JS to interact with my server. Should I use plain JSPs which return a JSON response? Should I use DWR or Jabsorb which provides direct remoting with backend java code. Any other solution? I am more concerned about performance and...

how to update user list in a ajax web chat using java and dwr

I am developing a web chat with java and dwr ajax reverse. I've got two questions on how to remove users when they are offline 1.when user close the browser server side code java import java.util.HashMap; import java.util.Map; import org.directwebremoting.Browser; import org.directwebremoting.ScriptSessions; public class Chat{ p...

DWR Exception Handling

I'm trying to capture and handle the return of a NullPointerException in my DWR method call: CompaniesByCountyFactory.getElementCompanies(command, countyId, stateId, { callback:popupDisplay, errorHandler:function(message){jQuery("<span>errorHandler::"+message+"</span>").dialog();}, exceptionHandler:function(errorString, exception){jQuer...

What is the Use of Javascript.

What is the main motto of using Javascript mostly. How it will be useful for developing Applications. I know Html. How it will help me in learning Javascript. Any relations to both JS and html. ...

encounter "Error configuring application listener of class org.directwebremoting.servlet.DwrListener"

i found the error of "Error configuring application listener of class org.directwebremoting.servlet.DwrListener" when deploying application using dwr in tomcat6. Here is my web.xml <display-name>DWR (Direct Web Remoting)</display-name> <description>A Simple Demo DWR</description> <listener> <listener-class>org.directwebremoting....

Usually when we get "org.apache.commons.logging.LogFactory" error?

While deploying a dwr web app, i'm continuously getting this error. I dont know why this coming. I cant run any of my DWR sample projects. Apart from that, for what we get this ClassNotFound Error. What the concept here? This is starting of long list of error, iam getting. SEVERE: Allocate exception for servlet dwr-invoker java.lang.C...

What is Getters, setters, equals and toString for this program. How to write it.

public class People { // Code to create a random set of people omitted public Set getAllPeople() { return people; } public void setPerson(Person person) { if (person.getId() == -1) { person.setId(getNextId()); } people.remove(person); people.add(person); } public void deletePerson(Person person) { peop...

singleton creator in dwr

i want to create a comet application using dwr. here is my problem: i want to create a connection class as the comet connection between server and javascript. It should be unique among the session, so i want it to be singleton. i define the creator of this class as singleton however i can't get it work. any idea? here is my dwr.xml <dwr...

connect to another server with dwr remoting

i want to write a server using dwr (server A) at machine A. This server will connect to another server (server B, which is on machine B) using SocketChannel after a client login to server A. however, i get a access denied (java.net.SocketPermission 203.170.117.218:8001 connect,resolve). I trace the code and found that exception is thrown...

How to show data in a web page from DB?

For the last three days I have been trying to develop a web based CRUD application which does all the CRUD operations. Given the complexity of the code, I decided to show the data first then I can move on to further CRUD operations. For this application I posted several questions in here. From the Answers I came this far. Here is my ...

What are all the changes we have to do in JqGrid, incase of using DWR & java instead of AJAX & PHP?

First, i have to declare myself that, i dont know PHP & AJAX. I know something in DWR, javaScript & java, like i am able to create a Web based CRUD by using them. I want to integrate DWR & JAVA with the jQGrid. I did a lot of research for that. I am not able to find anything that uses JAVA & DWR in jqGrid. Any conceptual idea or soluti...

How to create a session object?

I am creating a login page for my web application. I want to create a session object whenever a new user logged in. I know the concept of sessions, but i didnt used that before. Can i do it with a simple class. Or, i have to move to servlet. If i shall do it with a simple class means, how to create a session object. This is my scenari...

What is session in java?

Hi, I far i understand Httpsession concepts in Java. HttpSession ses = req.getSession(true); will create a session object, according to the request. setAttribute("String", object); will, binds the 'String', and value with the Session object. getAttribute("String"); will return an object associated with the string, specified. ...

can i send the updates to the specific pages only when using DWR.

In the following program i am using the DWR to update all pages at a time. I want to update the data for only specified pages that have the unique 'queueId'. i.e user enter with id & pass, he belong to 'queue1', and another user entered and he belong to 'queue2'. I don't want to show the updates of one user to other. but, It is sending t...