public final class PageParser extends Object
Modifier and Type | Field and Description |
---|---|
static String |
d_buffersize
The name ("buffersize") of the [page buffersize=....] directive
|
static String |
d_encoding
The name ("encoding") of the [page encoding=....] directive.
|
static String |
d_mimetype
The name ("mimetype") of the[@ mimetype=....] directive.
|
static String |
d_out
The name ("out") of the [page out=....] directive
|
static String |
d_out_stream1
A value ("outputstream") of the [page out=outputstream] directive
|
static String |
d_out_stream2
A value ("outputstream") of the [page out=stream] directive
|
static String |
d_out_writer
A value ("writer") of the [page out=writer] directive
|
static String |
d_remove_initial_whitespace
The name of the ("remove-initial-whitespace") directive
|
static String |
d_src_encoding
The name ("src-encoding") of the [page src-encoding=....] directive.
|
static String |
mimetype_none |
Constructor and Description |
---|
PageParser(File contextRoot,
File input,
File output,
String classname)
Creates a new page parser that will use the default log obtained by
Log.getDefault() |
PageParser(File contextRoot,
File input,
File output,
String classname,
Log log)
Creates a new page parser.
|
public static String d_mimetype
javax.servlet.ServletResponse.setContentType
method manually).
Note, from ServletResponse
Note that the character encoding cannot be communicated via HTTP headers if the servlet does not specify a content type; however, it is still used to encode text written via the servlet response's writer.
public static String mimetype_none
public static String d_encoding
public static String d_src_encoding
public static String d_buffersize
public static String d_out_stream1
public static String d_out_stream2
public static String d_out_writer
public static String d_remove_initial_whitespace
public PageParser(File contextRoot, File input, File output, String classname) throws IOException
Log.getDefault()
contextRoot
- absolute path to the webapp context root directoryinput
- absolute path to the input page fileinput
- absolute path to the output file (to be written to).classname
- classname to give to the generated java class.IOException
public PageParser(File contextRoot, File input, File output, String classname, Log log) throws IOException
contextRoot
- absolute path to the webapp context root directoryinput
- absolute path to the input page fileoutput
- absolute path to the output file (to be written to).classname
- classname to give to the generated java class.IOException
public void parse() throws IOException
IOException
- a parse failure occurred. The java source file
may or may not be properly generated or written
in this case.public static void main(String[] args) throws IOException
IOException