[Tbase-cvs] applications/adfundum/src/adfundum/view/util/components LoginParser.java,NONE,1.1 AllPar
Status: Alpha
Brought to you by:
ron_bakker
|
From: Ron B. <ron...@us...> - 2006-03-27 21:47:32
|
Update of /cvsroot/tbase/applications/adfundum/src/adfundum/view/util/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3916/src/adfundum/view/util/components Added Files: LoginParser.java AllParser.java Log Message: Home page setup (first take) --- NEW FILE: AllParser.java --- /* * Ad Fundum, TBase application * Copyright (C) 2006 Ron Bakker * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * E-Mail the project team at: tba...@li... * */ package adfundum.view.util.components; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.tbase.html.TemplateParser; /** * @author Ron Bakker * @version $Id: AllParser.java,v 1.1 2006/03/27 21:47:27 ron_bakker Exp $ */ public class AllParser extends TemplateParser { @Override public void doRequest(HttpServletRequest arg0, HttpServletResponse arg1) throws IOException { parsePart("all"); } } --- NEW FILE: LoginParser.java --- /* * TBase Runtime * Copyright (C) 2006 Ron Bakker * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * E-Mail the project team at: tba...@li... * */ package adfundum.view.util.components; import java.io.IOException; import java.util.Hashtable; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.tbase.html.TemplateParser; /** * @author Ron Bakker * @version $Id: LoginParser.java,v 1.1 2006/03/27 21:47:27 ron_bakker Exp $ */ public class LoginParser extends TemplateParser { public void doRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { Hashtable<String,String> fields = new Hashtable<String,String>(); if (request.getParameter("username") != null) { String username = request.getParameter("username").toString(); String password = request.getParameter("password").toString(); fields.put("username", username); if (username.equals(new String("jan"))) { parsePart("loginsuccess"); return; } else parsePart("loginerror"); } else fields.put("username", ""); setFields(fields); parsePart("loginform"); } } |