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 should we not configure jsp standard tags in web.xml?
How clear chache and buffer of opera browser.
Explain the action.
Define Composition.
Give the syntax for jsp comments.
Can you use javascript in jsp?
What information is needed to create a tcp socket?
Explain jsp action elements or action tags?
Which tag should be used to pass information from jsp to include jsp?
Explain client and server side validation?
When the destroy method of the jsp's are called?
What are the implicit objects in jsp?
How do I mix jsp and ssi #include? What is the difference between include directive & jsp:include action?
What is the jsp?
How to call java method in jsp page on button click?