• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get full string values in the form

 
ravi san
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dbEXDIR = rs.getString("EXECUTIVE_DIRECTOR").trim();
//out.print("<BR> test "+dbEXDIR);
out.print("<TR>");
out.print("<TD ALIGN=LEFT JUSTIFIED><b>"+dbEXDIR+"</b></TD>");

temp = "GetMIPS1.jsp?formEXDIR="+dbEXDIR;
out.print("<td align=center>");
out.print("<DIV onMouseover=\"ddrivetip('Click for SHIFT1 info.', '#D9FFFF')\" onMouseout='hideddrivetip()'><b><a href="+temp+"><img border=0 src='SHIFT1.GIF'></a></div>");
out.print("</td>");

When I //out.print("<BR> test "+dbEXDIR); using above code dbEXDIR values are like
test ADIL BELIHOMJI
test ADOLFO REYES
test ALDO P REY
But in the temp values for GetMIPS1.jsp?formEXDIR="+dbEXDIR getting truncated. that is only ADIL or ADOLFO or ALDO are displaying. Can anyone suggest me why this is getting truncated

Thank you

Sri
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you doing out.print() of static HTML in a JSP? :confused:
 
ravi san
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its not HTML. Its jsp code

 
Paul Clapham
Sheriff
Posts: 21113
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, that is not JSP code. It's Java code. Unless possibly it's Java code which was taken from a scriptlet... but I can't imagine why anybody would write to the response from inside a scriptlet. That's a really strange way to entirely miss the point of JSP.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ravi san wrote:Its not HTML. Its jsp code

No it's not. In this statement:
you are emitting static HTML inside a out.print() statement. The question is: why? It's completely backwards. The whole point of a JSP, as Paul pointed out, is to be able to use static HTML as template text.

You'll encounter fewer problems by doing things in the intended and best practice ways.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic