Package org.apache.jasper.compiler
Class ServletWriter
java.lang.Object
org.apache.jasper.compiler.ServletWriter
- All Implemented Interfaces:
- AutoCloseable
- Direct Known Subclasses:
- NewlineReductionServletWriter
This is what is used to generate servlets.
- Author:
- Anil K. Vijendran, Kin-man Chung
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()intvoidvoidprint(char c) Prints the given char.voidprint(int i) Prints the given int.voidPrints the given string.voidPrints the current indentation, and then the string, and a '\n'.voidprintin()Prints the current indentationvoidPrints the current indentation, followed by the given stringvoidprintln()Prints a '\n'voidPrints the given string followed by '\n'voidPrints the given string.void
- 
Constructor Details- 
ServletWriter
 
- 
- 
Method Details- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
 
- 
getJavaLinepublic int getJavaLine()
- 
pushIndentpublic void pushIndent()
- 
popIndentpublic void popIndent()
- 
printlnPrints the given string followed by '\n'- Parameters:
- s- The string
 
- 
printlnpublic void println()Prints a '\n'
- 
printinpublic void printin()Prints the current indentation
- 
printinPrints the current indentation, followed by the given string- Parameters:
- s- The string
 
- 
printilPrints the current indentation, and then the string, and a '\n'.- Parameters:
- s- The string
 
- 
printpublic void print(char c) Prints the given char. Use println() to print a '\n'.- Parameters:
- c- The char
 
- 
printpublic void print(int i) Prints the given int.- Parameters:
- i- The int
 
- 
printPrints the given string. The string must not contain any '\n', otherwise the line count will be off.- Parameters:
- s- The string
 
- 
printMultiLnPrints the given string. If the string spans multiple lines, the line count will be adjusted accordingly.- Parameters:
- s- The string
 
 
-