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 jsp and how it works?
How does the Jsp Expressions works ? What happens at the back?
why ,what, when, where,how the extended star schema is used.
What is meant by implicit objects and what are they?
What are the differences between get and load methods?
What is jstl used for?
What does jsp mean?
Can I run jsp on xampp?
How can i connect from jsp to servlet page
How can I use jsp in the mvc model?
What is jsp in javascript?
Can you use javascript in jsp?