Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 4th, 2004, 04:40 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Regornil
Default Getting textbox value in jsp

Hi i need to get the the text in a textbox in jsp and store it in a hidden txtbox.How do i do tt?

Reply With Quote
  #2 (permalink)  
Old August 5th, 2004, 07:00 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

in servlet you can use the property such as getAttribute("txt boxName ")


Reply With Quote
  #3 (permalink)  
Old August 7th, 2004, 07:24 AM
Registered User
 
Join Date: May 2004
Location: Peshawar, NWFP, Pakistan.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to MAK_NUST Send a message via Yahoo to MAK_NUST
Default

in case of jsp you have to code
request.getParameter("textbox name");
this will return a value in String.


Mohammad Asif Khan
Niit Distributive Computing Research group
Nust Institute of Information Technology
Email: asif_khan@ieee.org
Reply With Quote
  #4 (permalink)  
Old August 9th, 2004, 05:19 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to coitri Send a message via MSN to coitri Send a message via Yahoo to coitri
Default

to Regornil: when the textbox in a form, you can get its value by request.
Now I have a question:
in a JSP page, I have 2 information groups, displayed in 2 tabs. switching between that tabs by submit action. First, I input "h#7871;lô" into textbox in tab 1 then Submit. before submit, I save its value to a hidden item. then, after submit, I get value of hidden item, it don't match with before.
my JSP include:
<%@page contentType ="text/html;charset=UTF-8" %>
<%@page pageEncoding="UTF-8"%>

Give me your idea, many thanks in advance!

Reply With Quote
  #5 (permalink)  
Old August 17th, 2004, 02:17 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

U can refer to the sample Code

http://p2p.wrox.com/topic.asp?TOPIC_ID=17664



Reply With Quote
  #6 (permalink)  
Old August 17th, 2004, 08:25 PM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to coitri Send a message via MSN to coitri Send a message via Yahoo to coitri
Default

I found out solution for my problem.
On the top of JSP page, add <% request.setCharacterEncoding("UTF-8"); %>

That's all!

Reply With Quote
  #7 (permalink)  
Old August 18th, 2004, 04:54 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Regornil
Default

ok man..thx guys for the help! =]

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox Help iceman90289 C# 2005 6 April 6th, 2008 03:54 AM
pointing cursor from one textbox to other textbox lakshmi_annayappa ASP.NET 1.0 and 1.1 Basics 2 August 2nd, 2007 03:41 PM
Please Help. mr_newreq.jsp:78: jsp:useBean can't f batken JSP Basics 0 February 22nd, 2006 09:56 PM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM



All times are GMT -4. The time now is 10:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.