org.apache.commons.jelly.tags.jetty
Class SecurityHandlerTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.jetty.SecurityHandlerTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class SecurityHandlerTag
extends org.apache.commons.jelly.TagSupport

Declare a security handler for a Jetty http server

Version:
$Id: SecurityHandlerTag.java 155420 2005-02-26 13:06:03Z dirkv $
Author:
rtl

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
SecurityHandlerTag()
          Creates a new instance of SecurityHandlerTag
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
          Perform the tag functionality.
 java.lang.String getauthenticationMethod()
          Getter for property authenticationMethod.
protected  void initLoginConfig(org.mortbay.xml.XmlParser.Node node, HttpContextTag httpContext)
           
protected  void initSecurityConstraint(org.mortbay.xml.XmlParser.Node node, HttpContextTag httpContext)
           
 void setauthenticationMethod(java.lang.String authenticationMethod)
          Setter for property authenticationMethod.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityHandlerTag

public SecurityHandlerTag()
Creates a new instance of SecurityHandlerTag

Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
           throws org.apache.commons.jelly.JellyTagException
Perform the tag functionality. In this case, add a security handler to the parent context, setting the authentication method if required The security constraints should be specified as the body of this tag using the same format as a web.xml file wrapped in a single tag to allow parsing of a well-formed snippet, e.g. Default / /docRoot/resourceHandlerTest/* GET HEAD * BASIC Jetty Demo Realm

Parameters:
xmlOutput - where to send output
Throws:
java.lang.Exception - when an error occurs
org.apache.commons.jelly.JellyTagException

initSecurityConstraint

protected void initSecurityConstraint(org.mortbay.xml.XmlParser.Node node,
                                      HttpContextTag httpContext)

initLoginConfig

protected void initLoginConfig(org.mortbay.xml.XmlParser.Node node,
                               HttpContextTag httpContext)

getauthenticationMethod

public java.lang.String getauthenticationMethod()
Getter for property authenticationMethod.

Returns:
value of property authenticationMethod.

setauthenticationMethod

public void setauthenticationMethod(java.lang.String authenticationMethod)
Setter for property authenticationMethod.

Parameters:
authenticationMethod - Type of authentication (BASIC, FORM, DIGEST, CLIENT-CERT) Note that only BASIC and CLIENT-CERT are supported by Jetty as of v4.1.1


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.