public class ServletWriter extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static String | SPACES | 
| static int | TAB_WIDTH | 
| Constructor and Description | 
|---|
| ServletWriter(PrintWriter writer) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close() | 
| int | getJavaLine() | 
| void | popIndent() | 
| void | print(char c)
 Prints the given char. | 
| void | print(int i)Prints the given int. | 
| void | print(String s)
 Prints the given string. | 
| void | printComment(org.apache.struts2.jasper.compiler.Mark start,
            org.apache.struts2.jasper.compiler.Mark stop,
            char[] chars)Print a standard comment for echo outputed chunk. | 
| void | printil(String s)Prints the current indention, and then the string, and a '\n'. | 
| void | printin()Prints the current indention | 
| void | printin(String s)Prints the current indention, followed by the given string | 
| void | println()Prints a '\n' | 
| void | println(String s)Prints the given string followed by '\n' | 
| void | printMultiLn(String s)
 Prints the given string. | 
| void | pushIndent() | 
public static int TAB_WIDTH
public static String SPACES
public ServletWriter(PrintWriter writer)
public void close()
           throws IOException
IOExceptionpublic int getJavaLine()
public void pushIndent()
public void popIndent()
public void printComment(org.apache.struts2.jasper.compiler.Mark start, org.apache.struts2.jasper.compiler.Mark stop, char[] chars)
start - The starting position of the JSP chunk being processed.stop - The ending position of the JSP chunk being processed.chars - characters as arraypublic void println(String s)
s - string to printpublic void println()
public void printin()
public void printin(String s)
s - string to printpublic void printil(String s)
s - string to printpublic void print(char c)
Prints the given char.
Use println() to print a '\n'.c - char to printpublic void print(int i)
i - int to printpublic void print(String s)
Prints the given string.
The string must not contain any '\n', otherwise the line count will be off.
s - string to printpublic void printMultiLn(String s)
Prints the given string.
If the string spans multiple lines, the line count will be adjusted accordingly.
s - string to printCopyright © 2000–2025 Apache Software Foundation. All rights reserved.