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

When does a container initialize multiple jsp objects?

0 Answers  


Why is jstl used?

0 Answers  


Can you disable the caching on the back button of a particular browser?

0 Answers  


How jsp is compiled?

0 Answers  


Can we use jsp implicit objects in a method defined in jsp declaration?

0 Answers  


Can I run jsp on xampp?

0 Answers  


Explain the difference between jspwriter and servlet printwriter in jsp?

0 Answers  


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.

1 Answers   ME,


What are the different life-cycle methods?

0 Answers  


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.

0 Answers   Tech Mahindra,


Can a jsp page instantiate a serialized bean?

0 Answers  


What is meant by session management?

0 Answers  


Categories