Solved

Form <Input ...> display problem

Posted on 2002-04-07
2
181 Views
Last Modified: 2012-05-04
Hi

I have problem with a jsp program which display
a form's input field.

See below :-

out.print("<td><input type=text size=60 name=description disabled value=" + desc + ">" + "</td>");          

The String field <desc> contains value "Question 3 header".
But when the web page displayed, it shown as "Question" instead of "Question 3 header".

Pls advice what is wrong ?

Thanks & Rgds
Heng03

                                   

0
Comment
Question by:heng03
2 Comments
 
LVL 3

Accepted Solution

by:
msterjev earned 100 total points
ID: 6924047
Increase the size of text field and specify the width of the column:
<td width=200><input type=text size=120 .....
0
 

Author Comment

by:heng03
ID: 6924497
Hi  msterjev

Your answer did not work.

I debug the jsp program & found the error is due to jsp handling String variable.
The solution is to embed the variable with "'".

eg
before solution :-
out.print("<td><input type=text size=60 name=description disabled value=" + desc + ">" + "</td>");  
       

After solution :-
out.print("<td>" + "<input type=text size=60 name=description disabled value=" + "'" + desc + "'" + ">" + "</td>");  
       
Anyway thanks for your help.

Rgds
Heng03





0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where to store the queries for modification of table 4 64
diffSum example 4 37
oracle 11g 23 84
Notify sent to other threads in Java 9 14
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

832 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