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 |
Explain jsp:plugin action?
What are jsp el implicit objects and how it’s different from jsp implicit objects?
How can information from one JSP be passed to another JSP?
How run jsp program in netbeans?
what is jsp? a technology ,a language or something else ?
How can I use jsp in the mvc model?
What is a javaserver pages (jsp)?
How do you delete the session data?
What is out println in jsp?
How can we avoid direct access of jsp pages from client browser?
Is jsp platform dependent?
How do I create a dynamic web project?