string « Format « JSP-Servlet Q&A





1. Date format in jsp    stackoverflow.com

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?    stackoverflow.com

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.

<TD><center><%=rs.getString(1)%></center></TD>  
<TD><center><%=rs.getString(2)%></center></TD>
How ...

3. JSP String formatting Truncate    stackoverflow.com

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    coderanch.com

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    java-forums.org

8. Sending a formatted string to a servlet    forums.oracle.com