Look for where I made notes in your code. Just trying to help. On Oct 7, 11:05 am, Andack <[EMAIL PROTECTED]> wrote: > Hi, > > I do a little modification, i changed the structure of my struts.xml > for this > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE struts PUBLIC > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" > "http://struts.apache.org/dtds/struts-2.0.dtd"> > <struts> > <constant name="struts.enable.DynamicMethodInvocation" > value="false" /> > <constant name="struts.devMode" value="false" /> > <package name="Actions" extends="struts-default"> > <action name="Hello" class="Actions.Hello">// You need some things > here like "success" and "input" ... > <result>/index.jsp</result>// that will take you to the page for > output like your index maybe? The result depends on these. > </action> > </package> > </struts> > > And the index.jsp looks like this// My index redirects to a page for action. > ex: URL=Hello.action > > <%@ page contentType="text/html; charset=UTF-8" %> > <%@ taglib prefix="s" uri="/struts-tags" %> > <html> > <head> > <title>Hello</title> > </head> > <body bgcolor="white"> > <img src="duke.waving.gif"> > <h2>Hello, my name is Duke. What's yours?</h2> > <s:form action="Hello">// don't need action here.... see below. > Your name: <s:textfield key="username"/>// you may use label="Your > Name" inside <s: try code completion. > <s:submit/><s:reset/>// actions may be invoked on these. again try > code completion inside. > </s:form> //I used a <div tag here for this group. > <h2><s:property value="message" /></h2> > <p><b><s:property value="username" /></b>//username is a key and a > property, be careful to use it right in the bean. > </body> > </html> > > But i don't understand why the result display the name of the > textfield in the page? > like this > > ######################################### > Hello, my name is Duke. What's yours? > Your name: > username: <textField>/// not sure what you have here. Send me a snapshot if > you can. > > Hello! > andres > ##########################################
Don't worry, I had plenty of trouble with this one too. It just takes a little experimenting. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---