This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
i am new to struts. I have developed a simple application in which the .do file is blank. The code is as given below. register.jsp <%@taglib uri="/WEB-INF/struts-html.tld" prefix="forms"%> <forms:form action="register"> username<forms:text property="username"/> password<forms assword property="password1"/> confirm password<forms assword property="password2"/> <forms:submit value="register"/> </forms:form>
Welcome to JavaRanch. We don't have many rules here, but we do have a naming convention which we try to strictly enforce. I believe another user has already pointed you to this document. Please re-read the naming convention and edit your display name in order to comply.
Thanks and we look forward to seeing you around the Ranch.
According to java naming conventions, all the property names should start with lower letter and the firstletter of the words following should start with capital letter.
Try changing username to userName, password1 to passWord1 and password2 to passWord2 in your jsp and ActionForm and don't forget to modify getter and setter methods too.
I hope it helps you. [ July 13, 2005: Message edited by: cendy nguvy ]
Joined: Nov 09, 2000
Thanks for changing your name, but I'm afraid it still doesn't comply. Please re-read the naming convention. Specifically you must have a valid first name and a valid last name. You should be able to quickly notice that there are no users on this site with one single name. Thank you.
in the originally posted message shows that it is defined.
Ah, yes it does.
The originally posted message also shows that the method used is perform()! The perform method will never get called unless you are using an old version of Struts. Struts now calls the execute method which by default returns an ActionForward of null, which cannot be defined in the ActionMapping. Since the correct forward cannot be found in the ActionMapping, Struts gives you a blank page.
Change the name of the method from perform() to execute().
And it really is a good idea to give yourself a last name, Betsy.