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 the page directive is used to prevent a jsp page from automatically creating a session?
Is it possible to share an httpsession between a jsp and ejb? What happens when I change a value in the httpsession from inside an ejb?
What is auto-flush attribute?
How can we disable el?
what is the difference between jsp and servlets ?
What is jsp and its uses?
Java Server Page I can use a function in two ways: Either I declare <jsp:useBean id="myBean" scope="session" class="mypack.mysubpack.MyClass" /> or I declare <%@ page import = "mypack.mysubpack.MyClass" %> In each case I can call a function later by coding MyClass.myFunction(); So what is the difference between the two variantes? Why are Beans invented if we don't need them because we have the import statement ? please guide me its an humble request to you reader if u know n i'll be thankful to you...........
what is difference between the contart and implementation?
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 maintain sessions in jsp?can you tellme the methods.
16 Answers IBM, Scope International, TCS,
How can we disable java code or scripting in jsp page?
How does error handling occur with jstl?