File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes login and logout operations in struts2 using interceptors.(please help me) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "login and logout operations in struts2 using interceptors.(please help me)" Watch "login and logout operations in struts2 using interceptors.(please help me)" New topic
Author

login and logout operations in struts2 using interceptors.(please help me)

Prajwal Hegde
Greenhorn

Joined: Oct 17, 2011
Posts: 6
Hi,

I needed a help in writing the code for log in and log out operations in struts2 using interceptors.
In detail,
1. A user should log in with user credentials, if it is passed then it should show success page with log in entry time(that is time should be displayed).
2. same as above for failure page.
3.when user logs out ,the time should be displayed when he logs out.

the above points should be stored in database, in tables given below.
for example in user table following are the fields
username - john
operation-log in
result-success
date-21-11-2011 19:32
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

We'd love to help you, but you need to do your own work. Do you know how to use Struts? If not, you can start here. Do you know how to access a database from Java? If not, you can start here.
If you have mastered those tasks, maybe you need to be more specific with your question.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Prajwal Hegde
Greenhorn

Joined: Oct 17, 2011
Posts: 6
Thank you Joe, yes i am newbie to struts, but I know the basics of struts, my problem was how can i connect to database and insert the log in operation details, like

Prajwal log in success/failure time (fields are - user, operation,result,time) i want these information to store in database but i could not do it... so please help me
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

You connect to a database the same way you do in any other Java program. I gave you a link to the JDBC tutorial. Give it a read and let us know if you need more help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: login and logout operations in struts2 using interceptors.(please help me)
 
Similar Threads
Struts2
Intergration of Struts2 and EJB3.0 using struts2-ejb3-plugin
struts2 session
Struts2 customized Exception handler
Struts2 + Authentication + Convention