1 24 package enhydraFlash.presentation; 25 26 import java.util.Date ; 27 import com.lutris.appserver.server.httpPresentation.*; 29 30 public class Welcome implements HttpPresentation { 31 32 33 public void run(HttpPresentationComms comms) 34 throws HttpPresentationException { 35 String name = null; 36 try { 37 if((name = comms.request.getParameter("name")) != null) { 38 handleSubmit(comms, name); 39 } 40 else { 41 WelcomeHTML welcome = (WelcomeHTML)comms.xmlcFactory.create(WelcomeHTML.class); 42 comms.response.writeDOM(welcome); 43 } 44 } catch (Exception e) { 45 System.out.println("EXCEPTION in Welcome" + e); 46 } 47 } 48 49 public void handleSubmit(HttpPresentationComms comms, String name) { 50 51 try { 53 comms.session.getSessionData().set("NAME", name); 54 String test = comms.session.getSessionData().getString("NAME"); 55 throw new ClientPageRedirectException("ShowName.po"); 56 } catch (Exception e) { 57 System.out.println("EXCEPTION in Welcome" + e); 58 } 59 } 60 61 } 62 | Popular Tags |