Salman Raza
Salman Raza

Reputation: 1715

How To Format String At JSP Page using "Out.Format(Format,String Var)" Error "The method format(String, String) is undefined for the type JspWrite"?

Hi i am trying to format string at JSP page it gave me error as i mentioned in title my code is,

    String header="";
    header = 12-29-2011 15;
    out.format("%0$s:00:00\n",header);

it result in error "The method format(String, String) is undefined for the type JspWrite"

Hopes for your suggestions

Thanks in Advance!

Upvotes: 1

Views: 1973

Answers (1)

kosa
kosa

Reputation: 66657

I think you need to use string.format() or SimpleDateFormat and print the resutls using out.print().

Upvotes: 2

Related Questions