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
Why is it not necessary to configure standard jsp tags in web.xml?
What do you know about writing custom jsp tags?
What is application in jsp?
What do you know about jsp tags?
Why are jsp pages the preferred api for creating a web-based client program?
How do I use a scriptlet to initialize a newly instantiated bean?
What is
What are the types of jstl tags?
What is full api?
How do you pass control from one jsp page to another?
Explain jsp technology?
Is jsp technology extensible?
What is a scriptlet in jsp and what is its syntax?
What are the differences between get and load methods?
Is jsp better than servlet?