you can make the visual side look the same as the original by using strut tags. 
Try the following:

<%@ 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><title>Hello</title></head>
    <body bgcolor="white">
        <img src="duke.waving.gif"> 
        <h2>Hello, my name is Duke. What's yours?</h2>
        
        <html:errors/>
        
        <html:form action="hello.do">
            User Name: <html:text property="username"/><br>
          
            <html:submit/><html:reset />
        </html:form>
        
    </body>
</html>

in my struts-config.xml I have the following mapping for my helloAction:

<action 
        input="/index.jsp"
        name="HelloForm" 
        path="/hello"
        scope="request" 
        type="hello.HelloAction">
           <forward name="passionname" path="/indexpassionname.jsp"/>
            <forward name="nopassionname" path="/indexnopassionname.jsp"/>   
            </action>

Godwin S. Grey

--- On Tue, 10/21/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Subject: [java ee programming] Re: Lab-4221Struts 2 basics homework
To: "Java EE (J2EE) Programming with Passion!" 
<java-ee-j2ee-programming-with-passion@googlegroups.com>
Date: Tuesday, October 21, 2008, 12:43 AM

The homework was to convert the hello1HomeworkStart to struts, this I
assumed to make the visual side the same while changing the coding.
The issues I still have are, in order
1)The reset and submit buttons are not side by side
2)The textfield does not clear when the submit button is pressed
3)The Hello <name>! appears between the heading and the textfield, it
was below in the original
4)The textfield does not clear when the reset button is presses after
a 'successful' submit

This is driving me nuts, can anyone help?

Thanks in advance
Craig



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to