简体   繁体   中英

System.out.println doesn't work on client side

System.out.println("blabla"); on client side doesn't show anything on console, but the same command on server side works correctly!

This is the code

System.out.println("blabla");

// Add auto on db
for(final AutoDTO i : auto){
    RonfService.addAuto(i, new AsyncCallback<AutoDTO>(){
    ....
    ....
}

"blabla" doesn't appear on consolle, but System.out.println("add"); on addAuto method does

This is the code of addAuto :

@Override
public AutoDTO addAuto(AutoDTO autoDTO){
   System.out.println("add");
   Auto auto = new Auto(autoDTO);
   Session session = HibernateUtil.getSessionFactory().getCurrentSession();
   ...
}

Looks like you're using GWT. Are you running the application from within Eclipse (Dev Mode), or have you built the application and deployed it onto a server (Production Mode)? Calls to System.out.println() will work in Dev Mode, but not in Production Mode.

To use logging in Production Mode, have a read of the GWT logging guide .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM