This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i pass selected date from jsp to servlet class

 
Snehitha Prasad
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a jsp page with in that i have a calender .so i can i get the date value in servlet class.can someone help me on this.

my jsp code is follows...


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Display inline</title>
<!--<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.19/themes/base/jquery-ui.css">
<link rel="stylesheet" href="http://view.jqueryui.com/menubar/themes/base/jquery.ui.menu.css">
<link rel="stylesheet" href="http://view.jqueryui.com/menubar/themes/base/jquery.ui.menubar.css">-->
<link rel="stylesheet" href="jquery.ui.all.css">
<!--<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">-->
<script src="http://jqueryui.com/jquery-1.7.2.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.datepicker.js"></script>
<!--<link rel="stylesheet" href="http://jqueryui.com/demos/demos.css">-->
<link rel="stylesheet" href="demos.css">
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
</head>
<body>

<div class="demo">

Date: <div id="datepicker" name="date"></div>


</div><!-- End demo -->



</body>
</html>


My doubt is here we display the date using <div> tag.If it is <input type="text"> then ,i know how to retrieve.But in the case of <div> how can i get in servlet class.



Thanks,
Snehithaprasad.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use an <input> element.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic