I do not know if this is what you want, but yu could login programatically this way, 
it is pretty simple actually:
http://www.yourhost.com/jetspeed/portal?action=JLoginUser&username=donald&password=duck

So basically you would have a link like this already build, when click it will login 
and take you to this users site. That's it.
hopefully it will help you

carlos orrego

-----Original Message-----
From: Sangam Dash [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 3:14 PM
To: Jetspeed Users List
Subject: Re: Anybody knows?


Mark Orciuch wrote:

>Fixed in 1.4b2.
>
>Best regards,
>
>Mark C. Orciuch
>Next Generation Solutions, Ltd.
>e-Mail: [EMAIL PROTECTED]
>web: http://www.ngsltd.com
>
>
>
>
>>-----Original Message-----
>>From: Pierre Henry [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, December 10, 2002 1:22 AM
>>To: Jetspeed Users List
>>Subject: RE: Anybody knows?
>>
>>
>>Just to say, my maximize button also doesn't work when I use jsp
>>templates.
>>It does nothing or sometimes it causes a strange behavior : all
>>the buttons
>>(max, min, cust) on the page disappear...
>>
>>I'm using 1.4b1
>>
>>Pierre
>>
>>
>>
>>>-----Original Message-----
>>>From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
>>>Sent: lundi, 9. décembre 2002 19:51
>>>To: Jetspeed Users List; [EMAIL PROTECTED]
>>>Subject: RE: Anybody knows?
>>>
>>>
>>>Hi Sangam,
>>>
>>>I don't know why your maximize button doesn't work with JSP
>>>templates, but if you want to have a link to log someone in
>>>as a default user, you can try the code below, this is how I
>>>log in a default user when necessary:
>>>
>>>// Use the code below in either a servlet or JSP to log in a
>>>user to Jetspeed.  Make your link point to the servlet
>>>// or JSP.
>>>
>>>
>>>// you'll need these imports:
>>>import org.apache.turbine.modules.ActionLoader;
>>>import org.apache.turbine.util.RunData;
>>>import org.apache.turbine.util.RunDataFactory;
>>>import org.apache.turbine.om.security.User
>>>
>>>
>>>String username = // however you want to get a username
>>>(request parameter, hard-coded, config file, whatever)
>>>String password = // however you want to get a password
>>>
>>>// request = HttpServletRequest
>>>// response = HttpServletResponse
>>>// config = ServletConfig
>>>RunData runData = RunDataFactory.getRunData(request,
>>>response, config);
>>>
>>>// Log out the user first in case they are logged in under a
>>>different user name:
>>>ActionLoader.getInstance ().exec( runData, "JLogoutUser" );
>>>
>>>runData.getParameters ().setString ( "username", username );
>>>runData.getParameters ().setString ( "password", password );
>>>User user = runData.getUser();
>>>
>>>// verify that the user is logged out before logging them in
>>>if(user ==  null ||  !user.hasLoggedIn() )
>>>{
>>>    // Execute the login action.
>>>    ActionLoader.getInstance ().exec( runData, "JLoginUser" );
>>>}
>>>
>>>
>>>// redirect to the Jetspeed portal servlet....
>>>response.sendRedirect(request.getContextPath() + "/portal");
>>>
>>>
>>>
>>>peace,
>>>Joe
>>>
>>>
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Sangam Dash [mailto:[EMAIL PROTECTED]]
>>>>Sent: Monday, December 09, 2002 10:42 AM
>>>>To: Jetspeed Users List
>>>>Subject: Anybody knows?
>>>>
>>>>
>>>>Hi
>>>>
>>>>Does anybody know where the submit button Login points to if
>>>>you use vm
>>>>template?
>>>>I mean i want to place a link on the default page when the
>>>>user clicks
>>>>on it the user should automatically be logged in and can see
>>>>a default page?
>>>>
>>>>Is it possible?
>>>>PLease help me
>>>>when i am using vm as the default template service i am
>>>>
>>>>
>>>confused with
>>>
>>>
>>>>the flow ?
>>>>thanks
>>>>sangam dash
>>>>
>>>>
>>>>--
>>>>To unsubscribe, e-mail:
>>>><mailto:[EMAIL PROTECTED]>
>>>>For additional commands, e-mail:
>>>><mailto:[EMAIL PROTECTED]>
>>>>
>>>>
>>>>
>>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
>>>
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
>>
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
Hi

Can i login a user programatically using ( i mean when he clicks on a
link then he will directly be logged in to the system in this release?)
When i tried to that using a jsp page where the code was

// you'll need these imports:
import org.apache.turbine.modules.ActionLoader;
import org.apache.turbine.util.RunData;
import org.apache.turbine.util.RunDataFactory;
import org.apache.turbine.om.security.User


String username = // however you want to get a username
(request parameter, hard-coded, config file, whatever)
String password = // however you want to get a password

// request = HttpServletRequest
// response = HttpServletResponse
// config = ServletConfig
RunData runData = RunDataFactory.getRunData(request,
response, config);

// Log out the user first in case they are logged in under a
different user name:
ActionLoader.getInstance ().exec( runData, "JLogoutUser" );

runData.getParameters ().setString ( "username", username );
runData.getParameters ().setString ( "password", password );
User user = runData.getUser();

// verify that the user is logged out before logging them in
if(user ==  null ||  !user.hasLoggedIn() )
{
    // Execute the login action.
    ActionLoader.getInstance ().exec( runData, "JLoginUser" );
}


// redirect to the Jetspeed portal servlet....
response.sendRedirect(request.getContextPath() + "/portal");


it was not logging in the user...
Please help me out
thanks
sangam dash



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


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

Reply via email to