aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How do i pass selected date from jsp to servlet class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How do i pass selected date from jsp to servlet class" Watch "How do i pass selected date from jsp to servlet class" New topic
Author

How do i pass selected date from jsp to servlet class

Snehitha Prasad
Ranch Hand

Joined: Jul 06, 2012
Posts: 32
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

Joined: Jan 10, 2002
Posts: 61426
    
  67

Use an <input> element.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: How do i pass selected date from jsp to servlet class