org.mmbase.servlet
Class servscan

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.mmbase.servlet.MMBaseServlet
              extended by org.mmbase.servlet.JamesServlet
                  extended by org.mmbase.servlet.servscan
All Implemented Interfaces:
Serializable, Servlet, ServletConfig, MMBaseStarter

public class servscan
extends JamesServlet

servscan is the 'extended html language' (parsing *.shtml) provided for MMbase its a system like php3, asp or jsp but has its roots providing a simpler toolset for Interaction designers and gfx designers. It is provided as an option but not demanded, you can also use JSP for a more traditional parser system.

Version:
$Id: servscan.java 35335 2009-05-21 08:14:41Z michiel $
Author:
Daniel Ockeloen, Rico Jansen, Jan van Oosterom, Rob Vermeulen
See Also:
Serialized Form
Rename:
Servscan

Field Summary
protected  String charSet
           
static String DEFAULT_CHARSET
           
static String SHTML_CONTENTTYPE
           
 
Fields inherited from class org.mmbase.servlet.JamesServlet
pageLog
 
Fields inherited from class org.mmbase.servlet.MMBaseServlet
mmbase, retryAfter
 
Constructor Summary
servscan()
           
 
Method Summary
 String getServletInfo()
          Returns information about this servlet.
protected  String handle_line(String body, sessionInfo session, scanpage sp)
          handle_line is called by service to parse the SHTML in body.
(package private)  boolean handleCache(scanpage sp, HttpServletResponse res, PrintWriter out)
           
(package private)  boolean handleCacheSave(scanpage sp, HttpServletResponse res)
           
(package private)  void handlePost(scanpage sp, HttpServletResponse res)
           
 void init()
          Initialize this servlet
 void service(HttpServletRequest req, HttpServletResponse res)
          Servlet request service.
 void setMMBase(MMBase mmb)
          Sets the mmbase member.
 
Methods inherited from class org.mmbase.servlet.JamesServlet
getAddress, getAuthorization, getAuthorization, getCookie, getInitParameters, getModule, getParam, getParamVector, getProperties, getProperty
 
Methods inherited from class org.mmbase.servlet.MMBaseServlet
associateMapping, checkInited, decRefCount, destroy, doGet, getAssociations, getBasePath, getMMBase, getRequestURL, getServletByAssociation, getServletByMapping, getServletMappings, getServletMappingsByAssociation, incRefCount, setInitException
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHTML_CONTENTTYPE

public static final String SHTML_CONTENTTYPE
See Also:
Constant Field Values

DEFAULT_CHARSET

public static final String DEFAULT_CHARSET
See Also:
Constant Field Values

charSet

protected String charSet
Constructor Detail

servscan

public servscan()
Method Detail

init

public void init()
          throws ServletException
Initialize this servlet

Overrides:
init in class JamesServlet
Throws:
ServletException

setMMBase

public void setMMBase(MMBase mmb)
Description copied from class: MMBaseServlet
Sets the mmbase member. Can be overriden to implement extra initalization for the servlet which needs a running MMBase.

Specified by:
setMMBase in interface MMBaseStarter
Overrides:
setMMBase in class MMBaseServlet

handle_line

protected String handle_line(String body,
                             sessionInfo session,
                             scanpage sp)
                      throws ParseException
handle_line is called by service to parse the SHTML in body. It can be used by children to do their own parsing. The default implementation calls parser.handle_line (from module scanparser) to do the parsing.

Throws:
ParseException

service

public void service(HttpServletRequest req,
                    HttpServletResponse res)
             throws ServletException,
                    IOException
Servlet request service. This processes the the page and sends it back

Overrides:
service in class MMBaseServlet
Throws:
ServletException
IOException

getServletInfo

public String getServletInfo()
Description copied from class: MMBaseServlet
Returns information about this servlet. Don't forget to override it.

Specified by:
getServletInfo in interface Servlet
Overrides:
getServletInfo in class MMBaseServlet

handlePost

void handlePost(scanpage sp,
                HttpServletResponse res)
          throws Exception
Throws:
Exception

handleCacheSave

boolean handleCacheSave(scanpage sp,
                        HttpServletResponse res)

handleCache

boolean handleCache(scanpage sp,
                    HttpServletResponse res,
                    PrintWriter out)


MMBase 2.0-SNAPSHOT - null