Register / Login
Win a copy of
Mesos in Action
this week in the
How to create objects in jsps using struts tags?
posted 4 years ago
I am developing a
based application on google app engine. I am using google's user service to allow users to log into my application.
When the user is signed into his google account and opens my application, my application must not ask to sign in again. Suppose the homepage of my application is index.jsp, it should say
To do so, I have to check whether there is a current user or not like this
<% UserService userService = UserServiceFactory.getUserService(); User user = userService.getCurrentUser(); if(user == null) //login link else //Welcome message & logout link %>
But I am not supposed to use scriptlets in my application. I have to achieve this using struts tags.
Any help is greatly appreciated. Thank you all in advance and good day.
Love all, trust a few, do wrong to none.
Keeping current logged user.
How to create object and call a method in jsp using struts 2 tags
Property binding error
Spring dependency injection in a Struts Plugin
N tier architecture