i have one jsp page. inside this,
String s=req.getParameter("raja");......
now we want to remove duplicate characters and o/p will be
like "rj".... what is the logic?
Answer / sajin dhas
Please check below jsp code.
<% String message= "saajin";
for (int i = 0; i < message.length(); i++){
for (int j = i + 1; j < message.length(); j++){
if (message.charAt(i) == message.charAt(j)){
message = message.substring(0,(j - 1)) +
message.substring(j + 1, message.length());
out.println("Servlet Communicate Messge\n"+message);
}
}
}
%>
| Is This Answer Correct ? | 0 Yes | 0 No |
What are jsp implicit objects?
how to extends one jsp page to another jsp page with realtime example?
How do you comment out in jsp?
how to print a string with out using out.println?
3 Answers Elementus Technologies,
What is jsp translation time?
Explain handling of runtime exceptions.
What are different implicit objects of jsp?
What do you know about jsp tags?
Explain the difference between servlet and jsp?
Q : In session created by server with client(browser) How can server find that request coming is belong to new session OR belong to session that is timeout.
What class.forname will do while loading drivers?
Explain the difference between forward and sendredirect?