|
||||||||||
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
com.sun.rave.web.ui.theme.ThemeServlet
public class ThemeServlet
Use this servlet to retrieve resource file that control the client-side behaviour and appearance of a web application that uses the Sun Web.Components. The resource files must be in a Jar file that is in the application's classpath. Configure one instance of this servlet per web application using themed components:
<servlet> <servlet-name>ThemeServlet</servlet-name> <servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>ThemeServlet</servlet-name> <url-pattern>/theme/*</url-pattern> </servlet-mapping>
For each theme used in an application, you must ensure that this
servlet is mapped to the identifier specified in the "prefix" property
of the META-INF/swc_theme.properties
resource for that
theme. For the standard themes, this is set to /theme
so
the mapping illustrated above is sufficient.
Note that, since the JAR files for all installed themes are loaded into the same class loader, the actual resource paths for the resources used by each theme MUST be unique. This is true regardless of whether the themes share a prefix or not.
Field Summary | |
---|---|
static java.lang.String |
localeParameter
|
Constructor Summary | |
---|---|
ThemeServlet()
|
Method Summary | |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method handles the requests for the Theme files. |
long |
getLastModified(javax.servlet.http.HttpServletRequest request)
Return the timestamp for when resources provided by this servlet were last modified. |
java.lang.String |
getServletInfo()
Returns a short description of the servlet. |
void |
init(javax.servlet.ServletConfig config)
|
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPost, 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 |
Field Detail |
---|
public static final java.lang.String localeParameter
Constructor Detail |
---|
public ThemeServlet()
Method Detail |
---|
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
request
- The Servlet Request for the theme fileresponse
- The Servlet Response
javax.servlet.ServletException
- If the Servlet fails to serve the resource file
java.io.IOException
- If the Servlet cannot locate and read a requested ThemeFilepublic java.lang.String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public long getLastModified(javax.servlet.http.HttpServletRequest request)
Return the timestamp for when resources provided by this servlet were last modified. By default, this will be the timestamp when this servlet was first loaded at the deployment of the containing webapp, so that any changes in the resources will be automatically sent to the clients who might have cached earlier versions.
getLastModified
in class javax.servlet.http.HttpServlet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |