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
Give the use of session object.
What is jsp expression?
What do you know about jsp expression language (jsp expression language – el)?
List all tags that are provided in jstl?
How can the output of JSP or servlet page be prevented from being cached by the browser?
What is client scripting?
Where is jsp used?
What is an api with example?
Which jsp implicit objects are thread safe?
What are the different life-cycle methods?
What do you mean by custom tag in jsp?
What is a tag file?
What is meant by jsp?
How can we stop errors on display in a jsp page?
What is an expression language?