Two Laptop Bag*
The moose likes JSP and the fly likes Jsp - Syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Jsp - Syntax" Watch "Jsp - Syntax" New topic
Author

Jsp - Syntax

naro pad
Ranch Hand

Joined: May 07, 2008
Posts: 58

I have a text box and I want the value of that text box to be an expression.
I try this but it doesn't work.

<input type="text" name="customer_name" value="<%= tmp.getCustomerName() %>"/>

What is the right syntax?Can anyone help me with at...

Thanks
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Yes, the syntax seems to be correct only. What exactly do you get?

Are you sure that the "customerName" property is set with some non-null, non-empty values? Just check that out.

Do you get any errors, if not?


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by panayiotis panayiotou:
I try this but it doesn't work.


On an internet forum, "it doesn't work" is, for the most part, a useless statement. It would be better if you told us what did happen when you tried to run it.

Did the page blow up?
If so what error messages were dumped to the screen.
If none, did you look in the server's logs to see what might have gone wrong? If so, can you post the stack trace so we can see it?
Did the expression return "null" or an empty string?

Without this type of information, folks here can't do much to help you.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Jsp - Syntax