|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
no.sesat.commons.resourcefeed.ResourceServlet
public final class ResourceServlet
Resource Provider. Serves configuration files (properties, xml), css, gifs, jpgs, javascript, classes, jar files and velocity templates for search-portal. Css, images, and javascript require direct access from client.
| Constructor Summary | |
|---|---|
ResourceServlet()
|
|
| Method Summary | |
|---|---|
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
|
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
|
protected long |
getLastModified(HttpServletRequest req)
Assigned to the time when the servlet is initialised via the init(ServletConfig) method. |
String |
getServletInfo()
|
void |
init(ServletConfig config)
|
protected void |
processRequest(HttpServletRequest request,
HttpServletResponse response)
Processes requests for both HTTP GET and POST methods. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, 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 |
| Constructor Detail |
|---|
public ResourceServlet()
| Method Detail |
|---|
public String getServletInfo()
getServletInfo in interface ServletgetServletInfo in class GenericServletpublic void init(ServletConfig config)
init in interface Servletinit in class GenericServlet
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
GET and POST methods.
This servlet ignores URL parameters and POST content, as all the information is in the path,
so it really doesn't matter if it is a GET or POST.
Checks:
- resource exists,
- correct path is being used,
- configuration/template resources are only accessed by schibsted machines,
The resource is served to the ServletOutputStream byte by byte from
getClass().getResourceAsStream(..)
request - servlet requestresponse - servlet response
ServletException - if ServletException occurs
IOException - if IOException occurs
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
doGet in class HttpServletServletException
IOException
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
doPost in class HttpServletServletException
IOExceptionprotected long getLastModified(HttpServletRequest req)
getLastModified in class HttpServletreq - incoming HttpServletRequest request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||