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 is the use of jstl?
Can you call jsp from servlet?
Why do we need custom tags in jsp?
How do I set password expire time period?
What are implicit objects in jsp?
What is the difference between Java Servlet & JSP?
Which tag is used for error handling in jsp pages?
how to insert star image and need to rate it.. one star two star so on how to do in jsp...????
Which tags are used for bean development?
What do you mean by jsp directives?
how can i get a scjp certification??
What is expression language in jsp?