Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to fill in a text input box with a specified value?

Posted on 2005-03-10
Medium Priority
Last Modified: 2010-04-01
Hi folks,

Suppose I have the following in my JSP page.

    <form action="myform.jsp" method="post">
    Type Your Value:
      <input type="text" name="yourval" size=35
       <font color=red>${fn:escapeXml(yourvalError)}</font>


The above will give me a text box where I can type some value.
But it will be a blank text box.

I want the text box to have an initial value that shows inside the text box, like "123".
How can I do this?

Also, I want to call <jsp:getProperty name="mybean" property="yourVal" />
and put the value returned by this call, inside the text box as the initial value.

How can I do this?

Thank you.
Question by:posh020
1 Comment
LVL 11

Accepted Solution

raj3060 earned 500 total points
ID: 13513244
<input type="text" name="yourval" size=35  value="123" />

<input type="text" name="yourval" size=35  value="<%=<jsp:getProperty name="mybean" property="yourVal" />>" />

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’m willing to make a bet that your organization stores sensitive data in your Windows File Servers; files and folders that you really don’t want making it into the wrong hands.
Are you a startup company? Being a startup, you may be using shared hosting, or maybe even dedicated hosting. But have you ever given a thought to using cloud computing now? Yes, don’t be surprised, it is possible for startups to opt for cloud compu…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question