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 |
When does a container initialize multiple jsp objects?
Why is jstl used?
Can you disable the caching on the back button of a particular browser?
How jsp is compiled?
Can we use jsp implicit objects in a method defined in jsp declaration?
Can I run jsp on xampp?
Explain the difference between jspwriter and servlet printwriter in jsp?
Write a Program using Servlet and JDBC for developing online application for displaying the details of Cars owned by the residents in XYZ society. Make necessary assumptions and create appropriate databases.
What are the different life-cycle methods?
in jsf page i use two dropdown list.i.e state & district.if state dropdown is selected then & then district is enable.what should be my code.
Can a jsp page instantiate a serialized bean?
What is meant by session management?