I want to send a value in URL that value contains more than one words i am using the given concept for example
<a href=page.jsp?variable1=value1&variable2=value2>click here</a>
Suppose in above value value1=aa
and value2=bb cc dd
but in the url of page.jsp
i am getting value1=aa
and value2=bb
only and the rest value "cc dd
" is missing.
what should i do to get complete value for example value2=bb cc dd
I am giving here my code after making it more simple to focus on desire problem
`<%
MongoClient mongo = new MongoClient("localhost",27017);
DB database = mongo.getDB("studentDB");
DBCollection collection = database.getCollection("AskQuestion");
DBCursor cursor = collection.find();
String bodycontent="";
while(cursor.hasNext())
{
DBObject str=cursor.next();
bodycontent+="<table><tr><td><div><a href=Answer.jsp?ObjectID="+str.get("_id")+"&Title="+ str.get("TITLE") +"> "+ str.get("TITLE") +"</a></div></td></tr></table>";
}
out.print(bodycontent);
%>`
For example str.get("_id") gives value "55093da9223da86a0212b364" and str.get("TITLE") gives value "Question Title" . Now my problem is i got value in Answer.jsp for str.get("TITLE") is only "Question" but not "Title" and i want the full value i.e Question Title. I hope i am clear with my problem.