org.ztemplates.web
Interface ZIServletService

All Superinterfaces:
ZIService
All Known Implementing Classes:
ZServletServiceImpl, ZServletServiceSpring

public interface ZIServletService
extends ZIService

interface to servlet. Not available in standalone mode!

Author:
www.gerdziegler.de

Field Summary
static String SPRING_NAME
           
 
Method Summary
 String createUrl(Object action)
          Deprecated. 
 String getEncoding()
          The encoding used for the response and for parsing request parameters, defaults to "UTF-8". * To change encoding to ISO-8859-1 add the following lines to your web.xml: encoding ISO-8859-1 Don't forget to adjust your IDE/compiler/editor settings to use the selected encoding.
 javax.servlet.http.HttpServletRequest getRequest()
           
 javax.servlet.http.HttpServletResponse getResponse()
           
 void render(org.json.JSONArray json)
          utility as this is often needed for ajax applications, renders as mime-type "application/json"
 void render(org.json.JSONObject json)
          utility as this is often needed for ajax applications, renders as mime-type "application/json"
 void render(Object obj)
          renders the object to the response, with default mime type "text/html"
 void render(Object obj, String mimeType)
          renders the object to the response, with specified mime type
 void render(Object obj, String mimeType, String encoding)
          renders the object to the response, with specified mime type and encoding
 void sendRedirect(Object action)
          sends a redirect to the action
 

Field Detail

SPRING_NAME

static final String SPRING_NAME
See Also:
Constant Field Values
Method Detail

getRequest

javax.servlet.http.HttpServletRequest getRequest()
Returns:
the HttpServletRequest object associated with this servlet request

getResponse

javax.servlet.http.HttpServletResponse getResponse()
Returns:
the HttpServletResponse

render

void render(Object obj)
renders the object to the response, with default mime type "text/html"

Parameters:
obj -

render

void render(Object obj,
            String mimeType)
renders the object to the response, with specified mime type

Parameters:
obj - object to render
mimeType - mime type to use

render

void render(Object obj,
            String mimeType,
            String encoding)
renders the object to the response, with specified mime type and encoding

Parameters:
obj - object to render
mimeType - mime type to use
mimeType - encoding to use

render

void render(org.json.JSONObject json)
utility as this is often needed for ajax applications, renders as mime-type "application/json"


render

void render(org.json.JSONArray json)
utility as this is often needed for ajax applications, renders as mime-type "application/json"


createUrl

@Deprecated
String createUrl(Object action)
Deprecated. 

creates a url that calls the referenced action, Use ZIActionService.createUrl instead.

Parameters:
action -
Returns:

sendRedirect

void sendRedirect(Object action)
                  throws Exception
sends a redirect to the action

Parameters:
action -
Throws:
IOException
Exception

getEncoding

String getEncoding()
The encoding used for the response and for parsing request parameters, defaults to "UTF-8". *

To change encoding to ISO-8859-1 add the following lines to your web.xml:

  
    encoding
    ISO-8859-1 
 
 
Don't forget to adjust your IDE/compiler/editor settings to use the selected encoding.

Returns:


Copyright © 2011. All Rights Reserved.