All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----javax.servlet.GenericServlet | +----javax.servlet.http.HttpServlet | +----kh.servlet.BaseServlet | +----kh.servlet.BasicWrapper | +----kh.servlet.PageWrapper
Summary |
public class PageWrapper extends kh.servlet.BasicWrapper { // Constructors 1 public PageWrapper(); // Methods 3 protected InputStream getPageStream(HttpServletRequest, HttpServletResponse) throws IOException; protected URL unwrapURL(HttpServletRequest) throws MalformedURLException; protected InputStream urlToStream(HttpServletRequest) throws IOException; }
This servlet will resolve URLs and prepend or postpend programmatically generated data. This allows you to take a site and then automatically prepend or postpend some data onto each page.
Constructors |
· PageWrapper | Summary | Top |
public PageWrapper()
Default constructor
Methods |
· getPageStream | Summary | Top |
protected InputStream getPageStream(HttpServletRequest req, HttpServletResponse res) throws IOException
Munge the URL for the requested page to generate the primary content.
- Overrides:
- getPageStream in class BasicWrapper
· unwrapURL | Summary | Top |
protected URL unwrapURL(HttpServletRequest req) throws MalformedURLException
Given a request, strip out the /servlet prefix and return a stripped URL.
Example: If a client requests: http://www.interstice.com/servlet/PageWrapper/~kevinh/index.html This routine will return: http://www.interstice.com/~kevinh/index.html
· urlToStream | Summary | Top |
protected InputStream urlToStream(HttpServletRequest req) throws IOException
Convert an HTTP request into an appropriate base input stream. This involves stripping off the /servlet prefix and then generating a new URL. We then open the URL and return the result.
Example: If a client requests: http://www.interstice.com/servlet/PageWrapper/~kevinh/index.html This routine will return the contents of: http://www.interstice.com/~kevinh/index.html
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7