Problem with Netbeans 5.5 web tutorial

J

j.

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
 
V

vjg

j. said:
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
 
J

j.

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;
}


}
 
S

Shinya Koizumi

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top