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 a jsp container?
What is a javaserver pages (jsp)?
Can we implement an interface in a jsp?
What is jsp servlet?
What is the use of jstl tags in jsp?
i am using rich faces datatable rich:datatable. On entering the value, values get filtered in table. Now how can i get the value in back9ing bean..?
how to connect the back end with Directive tag in jsp ...
Can you make use of a servletoutputstream object from within a jsp page?
What is difference between jsp and jstl?
What are the benefits of pagecontext implicit object?
Which language is used to write servlets and jsp?
which is the place to learn java in chennai..