ajax - Display code flow on UI in java web application -
i have java web application, developed in spring framework. in that, running job (like moving data 1 database other database).
i want track progress of operation, not displaying progress bar, instead of that, want display real time logs, track flow, on ui.
i using reverse ajax using dwr seems, excessive use of it, creating outofmemory error.
how can achieve it?
web.xml code
<servlet> <servlet-name>dwr</servlet-name> <servlet-class>org.directwebremoting.spring.dwrspringservlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>activereverseajaxenabled</param-name> <param-value>true</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dwr</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping>
ajax file code
@remotemethod public void movedata() { string currentpage = webcontextfactory.get().getcurrentpage(); browser.withpage(currentpage, new runnable() { public void run() { try { databaseutility.movedb(); } catch (exception e) { // todo auto-generated catch block e.printstacktrace(); } } });
Comments
Post a Comment