|
WEB4J Development Tools 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSimpleTagSupport
TagHelper
hirondelle.web4jtools.util.SaveToFile
public final class SaveToFile
Echo the trimmed body, while also saving it as a file on the server as a side-effect.
Uses two settings in web.xml :
Example use case in a JSP :
<w:saveToFile named='statements.sql'> ...JSP content... </w:saveToFile>The exact location of the generated files depends on the package name. If the above snippet is for a feature having the package com.xyz.jet, then the generated file will be
[project-root]/WEB-INF/classes/com/xyz/jet/statements.sql
Constructor Summary | |
---|---|
SaveToFile()
|
Method Summary | |
---|---|
protected String |
getEmittedText(String aBody)
|
static boolean |
isEnabled()
Return true only if BaseDirectoryForGeneratedFiles (web.xml) is not set to 'Disabled' (ignoring case). |
static void |
readConfig(ServletConfig aConfig)
Read in configuration from web.xml |
void |
setNamed(String aFileName)
Set the name of the emitted file. |
Methods inherited from class TagHelper |
---|
checkForContent, crossCheckAttributes, doTag, getPageContext, getPageName, getRequest, getResponse |
Methods inherited from class SimpleTagSupport |
---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SaveToFile()
Method Detail |
---|
public static void readConfig(ServletConfig aConfig)
public void setNamed(String aFileName)
protected String getEmittedText(String aBody) throws JspException, IOException
getEmittedText
in class TagHelper
JspException
IOException
public static boolean isEnabled()
|
WEB4J Development Tools 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |