Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



i have one jsp page. inside this, String s=req.getParameter("raja");...... now we want ..

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

Post New Answer

More JSP Interview Questions

What is jsp and how it works?

0 Answers  


How does the Jsp Expressions works ? What happens at the back?

5 Answers   iFlex, Manhattan,


why ,what, when, where,how the extended star schema is used.

0 Answers  


What is meant by implicit objects and what are they?

0 Answers  


What are the differences between get and load methods?

0 Answers  


What is jstl used for?

0 Answers  


What does jsp mean?

0 Answers  


Can I run jsp on xampp?

0 Answers  


How can i connect from jsp to servlet page

7 Answers   Spring Board, TCS,


How can I use jsp in the mvc model?

0 Answers  


What is jsp in javascript?

0 Answers  


Can you use javascript in jsp?

0 Answers  


Categories