Web Applications using JSP, JSTL & Struts

cantbprince

Senior member
Jun 4, 2005
290
0
0
Looking for a good tutorial on user login managament (don't know anything about this stuff and it's just for a personal webpage) Just wanna store user info in database (got that part done) but how to verify and keep track of user as they move through the site.


I also would like to validate forms (checking correct email address structure, all required fields filled etc.)


Adding a photogallery page where users can skim through a bunch of pictures stored in a folder as well as bulk upload their own.


Any guides, tutorials or suggestions would be greatly appreaciated
 

Argo

Lifer
Apr 8, 2000
10,045
0
0
Struts Tutorial

If this is just for a personal web-site struts is perfect for you. Depending on how much java/MVC/J2EE knowledge you have, you should be able to pick it up in 2-3 days.
 

itachi

Senior member
Aug 17, 2004
390
0
0
for the login stuff, after u create the proper ActionForm create a subclass of BaseAction.. override the method execute and get the username/password from org.apache.commons.beanutils.PropertyUtils.. you'll need to store a session object to keep track of the user.

javax.servlet.Filter can be used to verify valid users.. read the session object from above, if no such object exists.. forward the user to a specified address. in the web.xml file u can specify under which virtual paths the filter is active..

for form validation.. specify the rules in an xml file (similar to what's shown below), create a plug-in tag in the struts config file for org.apache.struts.validator.ValidatorPlugin and set the property 'pathnames' with the values of the validation xml files.

if you have no actual interest in learning struts, i'd recommend that you look towards a simpler solution. struts is a large and complex framework for developing highly scalable webapps.. it's suitable for enterprise applications, but the amount of focus it puts on structure and an indirect emphasis on process makes it overkill for personal websites.

here's a tutorial from ibm..
http://www-128.ibm.com/developerworks/ibm/library/j-struts
 

funks

Golden Member
Nov 9, 2000
1,402
44
91
first thing you should do is take a look at ACEGI.. Then pick you web framework.