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 Posted / 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 |
Post New Answer View All Answers
what is the extended star schema
What are stored procedures? How is it useful?
What is difference between jspwriter and servlet printwriter?
What is jsp application?
What is the requirement of a tag library?
How many tags are provided in jstl?
What are the primary differences between the jsp custom tags and java beans?
Define scriptlet, expression and declaration in jsp?
How do I run a jsp file in linux?
What language is jsp?
Explain static method?
What is jsp expression language and what are it’s benefits?
What are scriptlets in jsp?
Where is jsp used?
What are the different scope values for the