tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincenzo Marchese <v.march...@arsretia.net>
Subject Re: automatic login
Date Fri, 10 May 2002 12:07:56 GMT
Mats Nyberg wrote:

> thanks for your reply vincenzo,
>
> the problem is however not to get the form sent but rather to get 
> tomcat/the auth.interceptor to bite.
> to this sollution i get a "404 /j_security_check not found"
>
> after another moment of contemplation... perhapps you mean that
>    1. in unprotected page set session attribute 
> "my.alltogether.made.up" to "newlyRegisterredUser"
>    2. go to protected page (which obviously sends me to login page
>    3. in login page: 
> if("newlyRegisterredUser".equals(session.getAttribute("my.alltogether.made.up"))) 
>
>            fill form with user details and submit

That's exactly what I meant ;)


>
> and thta this would do the trick? I'll try for sure, thanx again, I'll 
> get back to you with tales of success. 

Hope so

>
>
> Vincenzo Marchese wrote:
>
>> Have you tried redirecting with an automatic post to your protected 
>> location with some javascript like:
>>
>> document.forms["authform"].submit();
>>
>> obviously after filling the form with the code you wrote down below.
>>
>> You can control in form-login page if you come from a registration 
>> procedure and then do the automatic post.
>>
>>
>>
>> Mats Nyberg wrote:
>>
>>> friends, cohorts;
>>> have an application involving user registration and "declarative 
>>> authorization".
>>> in the end of an user registration i want the newly created user 
>>> also to be logged in
>>> without providing a "now you can use your new id and password to log 
>>> in"-screen.
>>>
>>> HOWTO?
>>>
>>> i vanely thought something like -snip- would do and now after some 
>>> days in the mud i thought
>>> i'd swallow my pride and ask; how do one do this?
>>>
>>> regards
>>>
>>> ----snip
>>>      <% session.setAttribute("tomcat.auth.originalLocation", 
>>> "/protected/xxx.jsp"); %>
>>>      <form method="POST" action="j_security_check" >
>>>        Username: <input type="hidden" name="j_username" value="<%= 
>>> userId %>"><br>
>>>        Password: <input type="hidden" name="j_password" value="<%= 
>>> password %>"><br>
>>>        <br>
>>>        <input type="submit" value="login" name="j_security_check">
>>>      </form>
>>> ---snip
>>>
>>>
>>> -- 
>>> To unsubscribe, e-mail:   
>>> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail: 
>>> <mailto:tomcat-user-help@jakarta.apache.org>
>>>
>>>
>>
>>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
>
>


-- 
"But I don't like Spam!!!!"
-----------------------------------------------------
      Vincenzo  Marchese
        ARSRETIA S.r.l.
      Via D. Sansotta, 97
        00144 Roma (IT)
e-mail: v.marchese@arsretia.net
     Tel.: +39 06 52270097
     Fax: +39 06 52272313




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message