permaculture playing cards*
The moose likes Struts and the fly likes System.out.println does not work in an action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "System.out.println does not work in an action" Watch "System.out.println does not work in an action" New topic
Author

System.out.println does not work in an action

Jaime Stuardo
Greenhorn

Joined: Apr 05, 2013
Posts: 6
Hello,

I have this in an action:



Above code does not show the message in the top of corresponding JSP file.

How can I do it? this may be very useful for debugging purposes.

Best regards,
Jaime
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

Of course not. The system output has nothing to do with the response. The text will appear on the console (if there is one) or the log file being written by the container (e.g. Tomcat)

P.S. System output is a poor way to debug. You should check out logging via java.util.logging or Log4J


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jaime Stuardo
Greenhorn

Joined: Apr 05, 2013
Posts: 6
Thanks for your reply

Regards
Jaime

Bear Bibeault wrote:Of course not. The system output has nothing to do with the response. The text will appear on the console (if there is one) or the log file being written by the container (e.g. Tomcat)

P.S. System output is a poor way to debug. You should check out logging via java.util.logging or Log4J
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: System.out.println does not work in an action
 
Similar Threads
problem using struts:select tag
retrieving a parameter from a link
JComboBox oddity
Cannot find ActionMappings or ActionFormBeans
JFrame.setSize() calls ignored until after JFrame.show()