-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Appel,

appel wrote:
> I need some simple login page for my web. There is only one account, and
> I'll probably just hardcode the user/pass in the code.
> 
> Can't figure out how to do it properly with the struts2 framework, been
> googling and reading the docs... do I need a interceptor for this or?

The easiest thing to use is the authentication built-into your servlet
container. Servlet containers are required to provide
j_security_check-style authentication and authorization. Apache Tomcat,
for instance, allows you to do simple auth using a small XML file
containing all of the account information (username, password, and roles).

The advantages of using this over a hand-rolled (yet simple)
implementation are:

1. Code is less likely to have any bugs.
2. Setup is usually pretty simple if you have limited requirements.
3. Easy to expand to a larger RDBMS-backed user database if/when
   you need to.

I hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGsfIv9CaO5/Lv0PARAuAlAKCf6JDISk8YYDa6jHYp19V3mbORhACgknHZ
OaoW5HWQKQFPQKDHtWvoKhs=
=IFuW
-----END PGP SIGNATURE-----

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

Reply via email to