• Post Reply Bookmark Topic Watch Topic
  • New Topic

Value passed from java to textbox is incomplete

 
Caleb Jhay
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I just want to ask howcome everytime i pass value from java to a textbox the value is incomplete. I tried printing it inside the jsp page and the value is complete but everytime i put it inside a text box the value is incomplete.

Help anyone please?

Best Regards,
Ben
 
Jesus Angeles
Ranch Hand
Posts: 2069
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the html chunk, and the supposedly complete value of the text.
 
Caleb Jhay
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi here is my html



it was supposed to write "finance & admin" but inside the textbox it only show Finance and it only save "finance" word into my database. I tried <%out.println(userDepartment)%> and it is showing the whole title "Finance & admin".

Thanks for your reply I just dont understand whats wrong with this. The data that is displayed on this textbox comes from this code



Best Regards
 
Jesus Angeles
Ranch Hand
Posts: 2069
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try adding quotes on the sides of the userDepartment?

 
Caleb Jhay
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
doesnt work. it display blank text box


regards
 
Jesus Angeles
Ranch Hand
Posts: 2069
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you do like this?

 
Caleb Jhay
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah its working now. redeploying the app solved the problem. I dont understand i just change the JSP why do I have to redeploy. Anyway THANKS A LOT for the helpl


Regards and God Bless!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not have to redeploy to change a JSP. You were obviously do something else wrong.

Your original problem was sloppy HTML. -- tighten up and always be sure to quote attribute values.

And, of course, Java code in a JSP is a no-no, but I've sung that song many times.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!