On Dec 16, 2007 10:15 PM, 张云勇 <[EMAIL PROTECTED]> wrote:
>  Is struts 1.X has JAAS integration API?
> I want to use the follow code:
>
> HttpServletRequest request = ServletActionContext.getRequest();
> String authType = request.getAuthType(); // http or https

Based on the comment, you probably want getScheme() here...
see
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html#getScheme()
vs.
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html#getAuthType()

> String user = request.getRemoteUser(); // the user principal (in string)
> Principalprincipal = request.getUserPrincipal(); // get a Principal object
> bool isAuth = request.isUserInRole("patrick");
>
> but I don't know how to set the values for authType ,remoteUser etc.
> anyone can give me help~

I'm not sure exactly what you're asking, and it probably depends on
what container you're using.  Most of them come with examples to help
you get started.  Explain  bit more about what you need to do, and
someone can probably help.

-- 
Wendy

Reply via email to