How to escape double quotes within a string to include the value of a variable from a JSP?
Two variables, "start" and "end" are dates from a calendar function. I need the variable "query" to update with the start and end variables but can't get it to work.
I tried encoding the curly brackets because I need them in the output like %7B${start},${e nd}%7D but that doesn't work either. Also tried a variety of quotes.
Thanks for your suggestions
Two variables, "start" and "end" are dates from a calendar function. I need the variable "query" to update with the start and end variables but can't get it to work.
Code:
String Start = request.getParameter("start");
String End = request.getParameter("end");
if ((Start != null) && (!Start.equals("")) || ((End != null) && (!End.equals(""))))
{
query += "+AND+NEAR{Start,End}:MODIFIED";
}
I tried encoding the curly brackets because I need them in the output like %7B${start},${e nd}%7D but that doesn't work either. Also tried a variety of quotes.
Thanks for your suggestions
Comment