This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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
Greenhorn

Joined: Jul 06, 2012
Posts: 17
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: 56192
    
  13

Use an <input> element.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How do i pass selected date from jsp to servlet class
 
Similar Threads
AnyTime Date picker inside facebox does not show up
Directory Structure JSP & JS
How to display message box in struts?
jQuery datepicker JSP question
Not able to download JQuery Plugins