Problem with Netbeans 5.5 web tutorial

Discussion in 'Java' started by j., Jan 10, 2007.

  1. j.

    j. Guest

    Hello: I am trying to use the tutorial: "Introduction to Developing Web
    Applications". I am not getting the end result that the tutorial says I
    should get. After I run the program as they suggest I get the
    appropriate web page. I enter my name, but when I click the submit
    button the page I get back has the star (*) symbol; Hello, *!. The
    tutorial suggests that I should get my name back; Hello, John!

    I am using Netbeans 5.5. I selected the Tomcat server, and Java
    blueprints.

    How can I get my name back as the tutorial suggests?

    Thanks in Advance
    John
     
    j., Jan 10, 2007
    #1
    1. Advertising

  2. j.

    vjg Guest

    j. wrote:
    > Hello: I am trying to use the tutorial: "Introduction to Developing Web
    > Applications". I am not getting the end result that the tutorial says I
    > should get. After I run the program as they suggest I get the
    > appropriate web page. I enter my name, but when I click the submit
    > button the page I get back has the star (*) symbol; Hello, *!. The
    > tutorial suggests that I should get my name back; Hello, John!
    >
    > I am using Netbeans 5.5. I selected the Tomcat server, and Java
    > blueprints.
    >
    > How can I get my name back as the tutorial suggests?
    >
    > Thanks in Advance
    > John


    It's not likely that anyone here is going to run and analyze the named
    tutorial to see what might be wrong with it. I suggest you post the
    code you're using and we can help you look at that. It is highly likely
    that you have done something wrong while following the tutorial.

    - Virgil
     
    vjg, Jan 10, 2007
    #2
    1. Advertising

  3. j.

    j. Guest


    > It's not likely that anyone here is going to run and analyze the named
    > tutorial to see what might be wrong with it. I suggest you post the
    > code you're using and we can help you look at that. It is highly likely
    > that you have done something wrong while following the tutorial.
    >
    > - Virgil


    Hello Virgil: Point taken. Here are some code snippets that are
    relevant to the project. I am posting snippets in order to avoid the
    clutter. I also have checked and rechecked the tutorial going over
    every word. I did this yesterday and today. Yes, I know how easy it is
    to think that I am doing something correctly, but not reading it
    correctly from the tutorial, hence the 24 hour break from it.

    index.jsp snippet
    <form name="Name_Input_Form" action="response.jsp">
    <input type="text" name="name" value="" /><input type="submit"
    value="OK" />
    </form>


    response.jsp snippet
    <body>
    <jsp:useBean id="mybean" scope="session"
    class="org.me.hello.NameHandler" />
    <jsp:setProperty name="mybean" property="name" value="*" />
    <h1>Hello, <jsp:getProperty name="mybean" property="name"
    />!</h1>


    The bean is associated with the NameHandler class

    public class NameHandler {
    private String name;
    /** Creates a new instance of NameHandler */
    public NameHandler() {
    }

    public void setName(String name) {
    this.name = name;
    }

    public String getName() {
    return name;
    }


    }
     
    j., Jan 10, 2007
    #3
  4. Believe or not, I did go through the tutorial.

    The problem is you are setting "*" to the value

    <%--<jsp:setProperty name="mybean" property="name" value="*" />--%>

    <jsp:setProperty name="mybean" property="*" />

    Shinya
     
    Shinya Koizumi, Jan 11, 2007
    #4
  5. j.

    j. Guest

    Thank You! It works ;). j.
    Shinya Koizumi wrote:
    > Believe or not, I did go through the tutorial.
    >
    > The problem is you are setting "*" to the value
    >
    > <%--<jsp:setProperty name="mybean" property="name" value="*" />--%>
    >
    > <jsp:setProperty name="mybean" property="*" />
    >
    > Shinya
     
    j., Jan 11, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. Kite
    Replies:
    1
    Views:
    4,731
    Thomas Kellerer
    Oct 26, 2003
  2. Pimousse
    Replies:
    2
    Views:
    3,704
    Roedy Green
    Apr 21, 2004
  3. Jason Jacob
    Replies:
    0
    Views:
    845
    Jason Jacob
    Nov 23, 2004
  4. Ilias Lazaridis
    Replies:
    0
    Views:
    938
    Ilias Lazaridis
    Dec 12, 2004
  5. Thomas G. Marshall
    Replies:
    2
    Views:
    856
    Thomas G. Marshall
    Oct 16, 2006
Loading...

Share This Page