there are different types of result types for a struts2 action. for full list please visit. http://struts.apache.org/release/2.1.x/docs/result-types.html from the book how to implement a custom result type please see on http://lkreddy.blogspot.in/2012/04/how-to-write-our-own-result-type-in.html public class my customresultType extends PlainTextResult{ } then in struts.xml file define this result type and then use this in any action
This tip shows how to use Logger in any java application. Logger needs to configure Formatter and Handler. There are many types of handlers and formatters present . In this example FileHandler is used to store all the log messages in a log file. And Simple formatter is used to format the log messages in human readable form. package MyProject; import java.io.IOException; import java.util.logging.FileHandler; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.SimpleFormatter; public class MyLogger { public static void main ( String [] args ) { Logger logger = Logger.getLogger ( "MyLog" ) ; FileHandler fh; try { // This block configure the logger with handler and fo...
Comments
Post a Comment