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 |
Why jsp and servlets are used?
What is tag file in jsp?
What's the difference between an import and include directive, and also the difference between include directive and include action?
What is the full form of jsp?
What is the purpose of creating custom tags?
What is iselignored in jsp?
how to connect the back end with Directive tag in jsp ...
How do you delete a cookie within a jsp?
What are the jsp standard actions?
What is jsessionid?
Is jsp page extensible true false?
Explain JSP directives.