Package org.apache.struts.action
Class SecurePlugIn
- java.lang.Object
-
- org.apache.struts.action.SecurePlugIn
-
- All Implemented Interfaces:
org.apache.struts.action.PlugIn
,SecurePlugInInterface
public class SecurePlugIn extends java.lang.Object implements SecurePlugInInterface
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
addSession
protected java.lang.String
enable
protected java.lang.String
httpPort
protected java.lang.String
httpsPort
protected java.lang.String[]
registrations
The set of public identifiers, and corresponding resource names, for the versions of the configuration file DTDs that we know about.protected java.lang.String
resourceName
The Java base name of our internal resources.protected org.apache.struts.util.MessageResources
resources
The resources object for our internal resources.-
Fields inherited from interface org.apache.struts.action.SecurePlugInInterface
DEFAULT_ADD_SESSION, DEFAULT_ENABLE, DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT, SECURE_PLUGIN
-
-
Constructor Summary
Constructors Constructor Description SecurePlugIn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addServletMapping(java.lang.String servletName, java.lang.String urlPattern)
Remember all servlet mapping from our web application deployment descriptor, if it is for the Struts ActionServlet.void
destroy()
Remove stuff from the ServletContext (application).java.lang.String
getAddSession()
java.lang.String
getEnable()
java.lang.String
getHttpPort()
java.lang.String
getHttpsPort()
java.util.Collection
getServletMappings()
boolean
getSslExtAddSession()
boolean
getSslExtEnable()
void
init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config)
Initialize some instance variables and the ServletContext (application) to make this PlugIn's properties accessible from the whole app.protected void
initMappings()
Initialize the servlet mappings under which the Struts ActionServlet is accessed.protected void
initResources()
Initialize our internal MessageResources bundle.void
setAddSession(java.lang.String addSession)
void
setEnable(java.lang.String s)
void
setHttpPort(java.lang.String s)
void
setHttpsPort(java.lang.String s)
-
-
-
Field Detail
-
addSession
protected java.lang.String addSession
-
httpPort
protected java.lang.String httpPort
-
httpsPort
protected java.lang.String httpsPort
-
enable
protected java.lang.String enable
-
registrations
protected java.lang.String[] registrations
The set of public identifiers, and corresponding resource names, for the versions of the configuration file DTDs that we know about. There MUST be an even number of Strings in this list!
-
resources
protected org.apache.struts.util.MessageResources resources
The resources object for our internal resources.
-
resourceName
protected java.lang.String resourceName
The Java base name of our internal resources.- Since:
- Struts 1.1
-
-
Method Detail
-
init
public void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config) throws javax.servlet.ServletException
Initialize some instance variables and the ServletContext (application) to make this PlugIn's properties accessible from the whole app.- Specified by:
init
in interfaceorg.apache.struts.action.PlugIn
- Parameters:
servlet
- The Struts ActionServlet instance for the whole applicationconfig
- The ModuleConfig for our owning module- Throws:
javax.servlet.ServletException
- if we cannot configure ourselves correctly
-
destroy
public void destroy()
Remove stuff from the ServletContext (application).- Specified by:
destroy
in interfaceorg.apache.struts.action.PlugIn
-
setHttpsPort
public void setHttpsPort(java.lang.String s)
-
setHttpPort
public void setHttpPort(java.lang.String s)
-
getHttpsPort
public java.lang.String getHttpsPort()
- Specified by:
getHttpsPort
in interfaceSecurePlugInInterface
-
getHttpPort
public java.lang.String getHttpPort()
- Specified by:
getHttpPort
in interfaceSecurePlugInInterface
-
getServletMappings
public java.util.Collection getServletMappings()
- Specified by:
getServletMappings
in interfaceSecurePlugInInterface
-
getEnable
public java.lang.String getEnable()
- Specified by:
getEnable
in interfaceSecurePlugInInterface
-
setEnable
public void setEnable(java.lang.String s)
-
getAddSession
public java.lang.String getAddSession()
-
setAddSession
public void setAddSession(java.lang.String addSession)
-
getSslExtAddSession
public boolean getSslExtAddSession()
- Specified by:
getSslExtAddSession
in interfaceSecurePlugInInterface
- Returns:
-
getSslExtEnable
public boolean getSslExtEnable()
- Specified by:
getSslExtEnable
in interfaceSecurePlugInInterface
- Returns:
-
initMappings
protected void initMappings() throws javax.servlet.ServletException
Initialize the servlet mappings under which the Struts ActionServlet is accessed. This will be used when searching for action mappings in the Struts configuration files when creating links, etc.- Throws:
javax.servlet.ServletException
-
initResources
protected void initResources() throws javax.servlet.ServletException
Initialize our internal MessageResources bundle.- Throws:
javax.servlet.ServletException
- if we cannot initialize these resources
-
addServletMapping
public void addServletMapping(java.lang.String servletName, java.lang.String urlPattern)
Remember all servlet mapping from our web application deployment descriptor, if it is for the Struts ActionServlet.- Parameters:
servletName
- The name of the servlet being mappedurlPattern
- The URL pattern to which this servlet is mapped
-
-