velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Wood" <mw...@chello.com>
Subject velocity & servlet redirection
Date Fri, 04 May 2001 16:58:04 GMT
i'm still finding my feet with velocity and servlets, so apols if i've got
this all wrong:

i'm looking to implement a webapp which requires user login - certain pages
can only be reached after you've logged in.

i was looking to implement something like this:
public class LoginRequired extends VelocityServlet {
...
	public Template handleRequest (Context ctx) {
		...
		if (loggedIn() == false) {
			RequestDispatcher d =
getServletContext().getRequestDispatcher("/app/servlet/Login");
			try {
				d.forward(res, req);
			....

It doesn't work, and I feel like I'm trying to cross the streams here.

If there's a 'proper' way to do this kind of thing with velocity, I'd be
grateful for a clue.

Mime
View raw message