reset password
Author Message
joxl7
Posts: 6
Posted 21:29 Jan 29, 2015 |

What's up guys. Had a quick question about the hw. I'm a little confused on sending the user to the welcome page after they register without using an html or jsp, or did I not read the lab right?  I have my register page in the doGet method. Where does the welcome go?!

vluu2
Posts: 64
Posted 21:31 Jan 29, 2015 |

It does not say in the instructions on how to do the Welcome page, for me I just used an HTML page. 

giraid
Posts: 39
Posted 21:39 Jan 29, 2015 |

from my understanding, I think everything should be in a single servlet with only exception being the object class. I think there should be a condition statement in the doPost method where if all the data are valid, the method would print the welcome page, otherwise the form would printed with any valid data and error messages.

hal255
Posts: 51
Posted 21:48 Jan 29, 2015 |

I treat the welcome message and form message as two System.out.println statements.

if (all conditions are met)

println welcome message;

else

print form message

instead of println, you have the outPrintWriter. 

joxl7
Posts: 6
Posted 22:40 Jan 29, 2015 |

yeah i thought it was just all in one servlet too. ok that makes sense, creating it in the doPost after everything goes through. cool thanks! i'll try it out