Hi Moria,
I have figured out the missing display problem. It was because I forgot to set the username attribute in request scope. Once I added the request.setattribute("username", scope request") in the actionform, the correct information was displayed. Thanks anyway for your advice. But, I still could not figure out why the cursor is not placing at the beginning of the text box and have to manually position my cursor to the first character position. Cheers, Peeter Subject: RE: [java ee programming] Lab 4205_Strutsbasics homework problem Date: Mon, 14 Dec 2009 10:44:47 -0800 From: mshebsov...@xifin.com To: peeterbru...@hotmail.com; java-ee-j2ee-programming-with-passion@googlegroups.com Hello, <html:form action="submit.do"> And make sure that in struts-config.xml you set a type to “submit”: <form-bean name="hello" type="submit.Hello" /> <action path="/submit" type="submit.HelloAction" name="hello" I hope it helps, Moria. From: java-ee-j2ee-programming-with-passion@googlegroups.com [mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On Behalf Of peeter brunch Sent: Monday, December 14, 2009 1:35 AM To: j2ee passion Subject: [java ee programming] Lab 4205_Strutsbasics homework problem Hi, Here is my program code for Lab 4205_strutsbasics homework. <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>indexnopassionname</title> </head> <body bgcolor="white"> <h3>Example No Passion Name</h3> <img src="duke.waving.gif"> <h2>Hello, my name is Duke. What's yours?</h2> <html:errors/> <html:form action="Hello.do"> <html:text property="username"/><br> <html:submit/> </html:form> <logic:present name="username" scope="request"> Hello, <bean:write name="username" scope="request"/> </logic:present> </body> </html> The screen output below does not display the entered name after the Submit button. The codes supposed to display this piece of information is highlighted above. And the placement of the cursor is not starting at the beginning of the text box when I first entered the name and have to move the cursor manually to the beginning of the text box. Can anyone point out what is wrong with the code? Thanks for your help! Example No Passion Name Hello, my name is Duke. What's yours? missing display here Regards, Peeter Hotmail: Free, trusted and rich email service. Get it now. -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en _________________________________________________________________ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/ -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en