## org.apache.jasper.compiler
Class ServletWriter

    java.lang.Object
      |
      +--org.apache.jasper.compiler.ServletWriter

public class ServletWriter
extends java.lang.Object

This is what is used to generate servlets.

Author:
  Anil K. Vijendran

Field Summary
`static java.lang.String` `SPACES`
`static int` `TAB_WIDTH`

Constructor Summary
`ServletWriter(java.io.PrintWriter writer)`

Method Summary
`void` `close()`
`int` `getJavaLine()`
`JspLineMap` `getLineMap()`
`void` `indent()`
`void` `popIndent()`
`void` `print(java.lang.String s)`
`void` `printComment(Mark start, Mark stop, char[] chars)` Print a standard comment for echo outputed chunk.
`void` `println()`
`void` `println(java.lang.String line)`
`void` `printMultiLn(java.lang.String multiline)`
`void` `pushIndent()`
`java.lang.String` `quoteString(java.lang.String s)` Quote the given string to make it appear in a chunk of java code.
`void` `setLineMap(JspLineMap map)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TAB_WIDTH

    public static int TAB_WIDTH

### SPACES

    public static java.lang.String SPACES

Constructor Detail

### ServletWriter

    public ServletWriter(java.io.PrintWriter writer)

Method Detail

### close

    public void close()
               throws java.io.IOException

    `java.io.IOException`

### getJavaLine

    public int getJavaLine()

### setLineMap

    public void setLineMap(JspLineMap map)

### getLineMap

    public JspLineMap getLineMap()

### pushIndent

    public void pushIndent()

### popIndent

    public void popIndent()

### printComment

    public void printComment(Mark start,
                             Mark stop,
                             char[] chars)

  Print a standard comment for echo outputed chunk.

  Parameters:
    `start` - The starting position of the JSP chunk being processed.
    `stop` - The ending position of the JSP chunk being processed.

### quoteString

    public java.lang.String quoteString(java.lang.String s)

  Quote the given string to make it appear in a chunk of java code.

  Parameters:
    `s` - The string to quote.
  Returns:
    The quoted string.

### println

    public void println(java.lang.String line)

### println

    public void println()

### indent

    public void indent()

### print

    public void print(java.lang.String s)

### printMultiLn

    public void printMultiLn(java.lang.String multiline)

Copyright © 2000 Apache Software Foundation. All Rights Reserved.