|
IT.CappuccinoNet StrutsCX v0.7 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--HttpServlet
|
+--com.cappuccinonet.strutscx.xslt.StrutsCXServlet
This Servlet is at top of the StrutsCX VIEW functionality and
together with its two major helper classes
StrutsCXDocumentBuilder and
StrutsCXTransformer replaces
the JSP part of Struts.
It does basically nothing more than
StrutsCXDocumentBuilder
StrutsCXTransformer
The work properly the following parameters should get send individually to this StrutsCXServlet:
UpdateAction for details on that.
There are also a couple of general parameters we put to the ServletContext and the HttpSession once the Server got started or the a new HttpSession got created. This are:
StrutsCXParameters which sets all this values.
Caching & Performance Tuning:
For performance reasons, XML and XSL files are read
only from the source if it changes on disk since the last read.
Otherwise they are kept in and read from the ServletContext.
The variables for the view are saved in the ServletContext, too.
To affect changes to them the Servlet Engine need to be restarted.
Check out these classes for more detail on this:
StrutsCXTransformer
StrutsCXXMLReader
StrutsCXParameters
StrutsCXPropertiesReader
This Servlet has to be registered in the WEB-INF/web.xml of your Servlet Container and has to be referenced in the struts-config.xml.
StrutsCXConstants,
StrutsCXTransformer,
StrutsCXDocumentBuilder,
StrutsCXParameters,
Serialized Form| Field Summary | |
private ServletConfig |
config
The ServletConig for this Servlet. |
private static java.util.logging.Logger |
logger
The Logger we use to log JDK 1.4 conform. |
private java.lang.String |
standardXSL
The name of the XSL file we do use and transform. |
private static java.lang.String |
THIS_CLASS
A String with this Classname used for system messages. |
| Constructor Summary | |
StrutsCXServlet()
|
|
| Method Summary | |
void |
destroy()
The empty Servlet standard destroy method. |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
The Servlet doGet() method. |
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
The Servlet doPost() method firste creates a Document by making a call to the StrutsCXDocumentBuilder.
|
void |
init(ServletConfig config)
The Servlet init() method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String THIS_CLASS
private java.lang.String standardXSL
private ServletConfig config
private static java.util.logging.Logger logger
| Constructor Detail |
public StrutsCXServlet()
| Method Detail |
public void init(ServletConfig config)
throws ServletException
config - the ServletConfig
ServletExceptionStrutsCXTransformer transforms the XML using a given XSL,
StrutsCXDocumentBuilder creates a XML Document
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException
StrutsCXDocumentBuilder.
Afte obtaining the Document it calls the transform() method of
the StrutsCXTransformer, a class
responsible to do the whole transformation and output it the the
HttpServletResponse.
request - the HttpServletRequestresponse - the HttpServletResponse
ServletException
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException
request - the HttpServletRequestresponse - the HttpServletResponse
ServletExceptionpublic void destroy()
|
IT.CappuccinoNet StrutsCX v0.7 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||