string « Format « JSP-Servlet Q&A

1. Date format in jsp

I need to convert the date from request parameter to string in dateformat 'yyyy-MM-dd'. I have tried the following

String MyDate = request.getParameter("DayCal");
formatdate = new java.text.SimpleDateFormat("yyyy/MM/dd");
Date date = (Date) formatdate.parse(MyDate);
String DisplayDate= formatdate.format(date);
But i ...

2. how to format string in jsp?

In the database column1 have date like 2011-03-03 but I want to show only 03-03 and in column2 have string like BHEL.NS but I want to show only BHEL.

How ...

3. JSP String formatting Truncate

Does anyone know how to truncate a string in a JSP using a tag library? I was going to use Jakarta Taglibs but it says that it has been ...

5. How to retain formatting when passing a String to a JSP

Hello Everyone, I'm in a pickle, and I don't know to fix it. I have a program that makes a request to a website, then pulls one little string from the response from the website, and passes it as part of an ArrayList of Strings to a JSP that displays it as part of a table. The response comes back from ...

6. Sending a formatted string to a servlet

8. Sending a formatted string to a servlet