I have the following code in my jsp. I use JSTL ${scheduledRideEndTime} to retrieve the data.
<script>
var timeto2 = ${scheduledRideEndTime};
var hours3 = moment(timeto2).format("hh:mm a")
document.write(hours3);
</script>
If I hit Control Shift F on eclipse the formatting changes to
<script>
var timeto2 = $
{
scheduledRideEndTime
};
var hours3 = moment(timeto2).format("hh:mm a")
document.write(hours3);
</script>
I then get syntax errors in my view. If I redo the code to "${scheduledRideEndTime}"; the Control Shift F does not reformat the code, but view prints Invalid date.
What am I missing here ? I want to be able to reformat code.
'${scheduledRideEndTime}'$("#abc").val("${scheduledRideEndTime}")and then get the value next time , i have done something like this before$("#voucherNumber").val( "${sessionScope.abc}");and get it