This is the Servlet 2.3 DTD entry for <http-method>:

<!--
The http-method contains an HTTP method (GET | POST |...).

Used in: web-resource-collection
-->
<!ELEMENT http-method (#PCDATA)>

What you're probably looking for is <transport-guarantee> (subelement of
<user-data-constraint>, which is a subelement of <security-constraint>):

<!--
The transport-guarantee element specifies that the communication
between client and server should be NONE, INTEGRAL, or
CONFIDENTIAL. NONE means that the application does not require any
transport guarantees. A value of INTEGRAL means that the application
requires that the data sent between the client and server be sent in
such a way that it can't be changed in transit. CONFIDENTIAL means
that the application requires that the data be transmitted in a
fashion that prevents other entities from observing the contents of
the transmission. In most cases, the presence of the INTEGRAL or
CONFIDENTIAL flag will indicate that the use of SSL is required.

Used in: user-data-constraint
-->
<!ELEMENT transport-guarantee (#PCDATA)>

Quoting Giles Parnell <[EMAIL PROTECTED]>:

> 
> Hi guys
> 
> I'm trying to secure my web app, so that only https access can occur
> through it. I've started writing some code that checks the url protocol in
> each action ... which i think is pretty nasty. I know i can do all of this
> in the web.xml. However i don't know much about setting up realms and
> groups in the web container. (??) Do i have to go all the way down that
> path? I'm not too concerned about setting up the ssl (someone elses job) -
> all i want to do is check for the https protocol - ie: only serve request
> that have https as their protocol.
> 
> Looking on the web, suggestions like this have been made, which i've tried
> - but to no avail.
>  <web-resource-collection>
>     <web-resource-name>A name</web-resource-name>
>     <description>desc</description>
>     <url-pattern>/*</url-pattern>
>     <http-method>CONFIDENTIAL ** (i've also tryed HTTPS) </http-method>
>   </web-resource-collection>
>  </security-constraint>
> 
> Any ideas ?
> 
> Thanks in advance.
> Giles

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to