Fmt:formatDate just prints out default Datetime String

Hi,
i am getting crazy here, because one can hardly do anything wrong here. This is my testcode:
<jsp:useBean id="current" class="java.util.Date"/>
<fmt:formatDate value="${current}" pattern="MMM"/>
Pretty straightforward, but whatever i put in the pattern or even when using one of the predefined formats, i am allways getting the default String like:
Wed Feb 23 21:16:31 CET 2005
And no, its not a cache issue, the seconds were updated on every reload and i stopped tomcat a hundred times. Thanks for any info on this.
Marc

problems ? No
Will you get the expected result ? Maybe , depends on what you expect to see.
When using c:out then the var will be displayed as String so you will see the full length toString of a Date.
If you want your own formatting you will need to use the fmt:FormatDate tag

Similar Messages

  • Printing out double quote string

    Hello,
    I would like to know how can i print out the double quote string (")
    in JSP using out.print(), because a double qoute has already used
    for indicating the string. If the string that i want to print out is including double quote("), how can i print that string out.
    THX !

    out.println("\"mystring\"");
    generally: backslash "\" is used in Java to quote special characters e.g. out.println("c:\\my documents\\bla");

  • A method which prints out if a strings starts with a character or not

    Below you can see what I have made :
    public class StringZerleger {
    public static void main(String args[]) throws Exception{
    new StringZerleger().zerlegeString();
    public void zerlegeString()
    String s3 = "_a b c d";
    String [] temp = null;
    temp = s3.split(" ");
    dump(temp);
    public void istGueltigerBezeichner()
    String s3 = String s3;
    boolean b = s3.regionMatches( 1, "_", 1, 1 );
    public void dump(String []s)
    System.out.println("------------");
    for (int i = 0 ; i < s.length ; i++)
    System.out.println(s);
    System.out.println("------------");
    unfortunately it doesn't work as I want it to work.
    Could someone help me please ?

    Below you can see what I have made :
    public class StringZerleger {
    public static void main(String args[]) throws
    Exception{
    new StringZerleger().zerlegeString();
    public void zerlegeString()
    String s3 = "_a b c d";
    String [] temp = null;
    temp = s3.split(" ");
    dump(temp);
    public void istGueltigerBezeichner()
    String s3 = String s3;
    boolean b = s3.regionMatches( 1, "_", 1, 1 );
    public void dump(String []s)
    System.out.println("------------");
    for (int i = 0 ; i < s.length ; i++)
    System.out.println(s);
    System.out.println("------------");
    unfortunately it doesn't work as I want it to work.
    Could someone help me please ?
    It shouldn't even compile.
    This method
    public void istGueltigerBezeichner()
    String s3 = String s3;
    boolean b = s3.regionMatches( 1, "_", 1, 1 );
    }1) is never called,
    2) should return a boolean
    3) should accept the string you are testing as a parameter
    4) should be redone using a different method of String
    private boolean istGueltigerBezeichner(String str)
    if(str == null)
        return false;
    return "_".equals(str.substring(0,1));
    }Then call this method from with you loop, before your println statement
    ~Tim
    Message was edited by:
    SomeoneElse

  • How t print out selected values from a Jlist

    hi iam trying to get the selected values from a list to print out as a string but iam getting ,Invalid cast from java.lang.Object[] to java.lang.String.is there any way to get the selected values t print ut as a string?? import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MultipleSelection2 extends JFrame {
    private JList colorList, copyList;
    private JButton copy;
    private String colorNames[] =
    { "Black", "Blue", "Cyan", "Dark Gray", "Gray",
    "Green", "Light Gray", "Magenta", "Orange", "Pink",
    "Red", "White", "Yellow" };
    public MultipleSelection2()
    super( "Multiple Selection Lists" );
    Container c = getContentPane();
    c.setLayout( new FlowLayout() );
    colorList = new JList( colorNames );
    colorList.setVisibleRowCount( 5 );
    colorList.setFixedCellHeight( 15 );
    colorList.setSelectionMode(
    ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
    c.add( new JScrollPane( colorList ) );
    // create copy button
    copy = new JButton( "Copy >>>" );
    copy.addActionListener(
    new ActionListener() {
    public void actionPerformed( ActionEvent e )
    // place selected values in copyList
    copyList.setListData(
    colorList.getSelectedValues());
    String s1 =(String)colorList.getSelectedValues();

    Since the JList method 'getSelectedValues' returns an object array you'll need to iterate through the array and cast each object in the array to a string as you access them.
    Object[] o = colorList.getSelectedValues();
    for(int count=0,end=o.length; count<end; count++) {
    String s = (String) o[count];
    Hope that helps
    Talden

  • Could u tell me how2control printing out the certain page in smartforms?

    there are many pages when I preview ,
    but I only need one  or several of the pages.
    How to print the certain page in smartforms?
    and if there are several windows in one page
    how can I just print out one or several windows of them?
    what should I insert "command" or "program lines" into
    the "flow logic" ?
    It's very kind of you to explain that in detail.
    Thanks very much in advance.

    pls help me,thank you

  • IPhoto just printing blue squares

    Hi,
    Trying to print from iPhoto 6.04 to my HP Business Inkjet 2600, it just prints out blue squares (the same size as the intended pictures) instead of the photographs. Photoshop/Illustrator images print ok, and everything is up to date. Has anyone had any experience of this, or might know a possible solution?
    Cheers

    Jim:
    Another user having problems with printing reported that removing the print drivers and reinstalling them solved the problem. You might give that a try.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

  • Print outs have thin border when -default-background-color is set

    Hey everyone.  In my application the print out have this very thin border.  The -default-background-color is set to #333333 (dark grey) and this is the problem.  When I set the color to #FFFFFF (white), the thin borders go away.
    When I set the default-backgroun-color to #FFFFFF, my loading screen is white.  I don't want that.
    Does anyone know how I can have my loading screen with a #333333, but not have the thin border lines around my print outs?  Setting the border properties on the printed component doesn't work.  The problem is with the background color.
    Thanks for reading.
    Tom

    Still hacking away at this problem.
    I thought I had the fix until I deployed the AIR application.  Setting the -default-background-color to white worked fine when running from flex builder, but when I installed the application.  The "borders" are still showing.
    Has anyone had any experience with this?  I'm printing Point of Sale receipts and they look like crap with these lines around them.  On top of this, some printers print differently.  The HPs print a border around the whole component. The Brother printers just print the left and right.  One of my customer's printers just prints the bottom and right borders.

  • How can I print out a musical score?  Not just one track at a time.

    Hello,  I am a composer and I would like to print out a piece that will have piano, voice, and possibly other instruments on it.  So far I can only seem to print one track at a time rather than the whole piece.  I would REALLY appreciate any help!
    Thanks!
    -Kim

    No problem.  Finale's full software package is pretty expensive, but they offer a scaled-down $10 version called NotePad which will import MIDI files and print scores.  I'd suggest starting with that and seeing if it is sufficient:
    http://www.finalemusic.com/NotePad/default.aspx

  • My HP Photosmart C7280 All-in-One printer won´t print out documents, just pictures ...

    My HP Photosmart C7280 All-in-One printer won´t print out documents, just pictures. I´ve used the printer, since it was new on the marked, and it has worked perfectly until a few weeks back. There is no problem printing out pictures, but only blank pages comes out when I´m printing out documents. Regardless if it is Word, Excel etc.
    I´ve never used anything else than original cartridges, and the printer is used on Mac OS X 10.7.4. I´ve tried to reinstall the printer several times without any success.
    Can anyone help me?

    Hello,
    Please print a Self - Test report.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01448018&cc=us&dlc=en&lc=en&product=3204785&tmp...
    Can you see any of the colors as appear on the report sample?
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • I'm new to mac. Just started out. Have OS 10.8.3. I have an HP 1315 printer.  It prints and copies, wont scan.  I see old threads on this, nothing recent.  ?can i make this work, or do i need a new printer??

    I'm new to mac. Just started out. Have OS 10.8.3. I have an HP 1315 printer.  It prints and copies, wont scan.  I see old threads on this, nothing recent.  ?can i make this work, or do i need a new printer??

    Hi Newbie111
    I see that you are unable to scan with the Photosmart 1315.
    What driver are you using?
    The driver listed in the url below is a basic print driver that will allow you to print only.
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ps242muc&c c=us&dlc=en&lc=en&os=1006&product=61956&sw_lang=
    You can try using the apple drivers in the url below.
    http://support.apple.com/kb/DL907
    If you have any further issues please let me know.

  • GR slip print-out & automatic default for the print tick

    Hi,
    I have followed the steps as outlined below for the solution and unfortunately the GRN document do not print as anticipated. I was wondering if the non-assignment of the MM or FI Program might be the cause? Please advice if I had missed something to allow this to print immediately.
    1. Maintain the Printer Name in SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Gen Settings->Printer Setting
    2. Ensure that in SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Gen Settings->Item Print Indicator, 1 stands for Matl Doc print out
    3. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Gen Settings->Print Version, maintain Print Version 2
    4. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Maintain Print Indicator for GI/Transfer Posting Documents
    5. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Output Determination->Maintain Output Types, for the Output types WE01, WE02 and WE03, (for returns use WE03) ensure the foll:
    a. Default Values: Dispatch Time is 3 or 4 as per reqmt. and Tr medium is 1
    b. Print Parameter is 7
    6. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Output Determination->Printer Det->Pr Det by Pl/StoLoc, maintain the Output device for all your Plants
    7. Go to MN21, for Tr Type WE, Print Version 3, maintain Print Item as 1.
    Now the settings are ready for Printing Material doc
    8. While doing MIGO, ensure that in General Tab, you get "3 Collective Slip" beside the Print Indicator and you tick mark the field.
    9. Now depending on the setting in 5a, the Matl doc is printed. If it is 3, you have to print it using MB90. If it is 4, it is printed immediately.
    Edited by: JML Nkgapele on Dec 1, 2008 11:10 AM

    Your answer did help but still expriencing challanges with the following:
    Output Types
    -Print Parameters options are as follows
        >Plant/Storage location
        >Plant/Storage location/User group
        >User exit
       >User parameters
       >User
    Please advice which of the above is appropriate?
    -Should there be a program reflected on change output field for General data screen?
    Please advice since I'm currently experiencing shotdumps(runtime errors) when processing the GR.

  • How do I  save and re-use a fillable form once I have created it? It is a form i will use for multiple medcial clients I see, then print out and put in paper chart, and then do it again for another patient. - I just got Acrobat XI

    I've created a fillable form from a Word document, but how do I save and re-use a a fillable form once I have created it? It is a form I will use for multiple medical patients, printing out the filled in form to put in paper chart (no need to save filled out form), and then fill blank form again for another patient? - I just got acrobat X

    Thanks!
    That should also save the blank form for future re-use, right.?
    Can I also file the blank form in the file system, and then retrieve it as a blank form when I have a next patient need for it?
    Thanks
    Michael

  • Add a actionlistener to JTextArea and print out string when  the user input

    Hello:
    I got a problem to add a actionlistener to JTextArea and print out string which from the user input a sentence and after the user press the "enter".
    Could anyone help me please?
    Thanks
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.JScrollBar;
    public class PanelDemo extends JFrame {
       private static JTextArea tAreaUp, tAreaDown;
       private BorderLayout layout;
       private static String strings;
       public PanelDemo()
          super( " test " );
          Container container = getContentPane();
          layout = new BorderLayout();
          container.setLayout( layout );
          tAreaUp = new JTextArea(2,1);
          tAreaUp.setLineWrap(true);
          tAreaUp.setWrapStyleWord(true);
          tAreaUp.setEditable(false);
          tAreaUp.append("I am testing ");
          tAreaUp.append("I am testing");
           JScrollPane scrollPane = new JScrollPane(tAreaUp);
           scrollPane.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
           scrollPane.setPreferredSize(new Dimension(250, 250));
          tAreaDown =new JTextArea(2,1);
          tAreaDown.setLineWrap(true);
          tAreaDown.setWrapStyleWord(true);
          tAreaDown.addActionListener(new TextAreaHandler());
          JScrollPane scrollPane2 = new JScrollPane(tAreaDown);
          scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
          container.add( scrollPane, layout.CENTER );
          container.add( scrollPane2, layout.SOUTH );
          setSize( 300, 300 );
          setVisible( true );
         //private inner class for event handling
         private class TextAreaHandler implements ActionListener{
              //process textArea events
            public void actionPerformed(ActionEvent e){
               strings=e.getActionCommand();
                System.out.println(strings);
       public static void main( String args[] )
          PanelDemo application = new PanelDemo();
          application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }

    Thanks for your help, but I still got a question for you.
    Do you think the way I register the even handler to the TextArea is correct?
    Because the compailer complains about that which like
    "D:\101\fig13_27\PanelDemo.java:43: cannot resolve symbol
    symbol  : method addActionListener (PanelDemo.TextAreaHandler)
    location: class javax.swing.JTextArea
          tAreaDown.addActionListener(new TextAreaHandler());

  • When I type a document and try to save it, there are black lines over my sentences, as if it had been highlighted, and that's how it prints out, just black lines

    when I type a document and try to save it, there are black lines over my sentences, as if it had been highlighted, and that's how it prints out, just black lines

    Hi Vickey, S,
    Sorry for the delay in response. Is it happening with all the files?
    Also, please write the steps you are taking to type in the document.
    You might try uninstalling and re installing the Reader in case it is happening with all the files.
    URL to install the Adobe Reader is Adobe - Adobe Reader download - All versions
    Thanks,
    Vikrantt Singh

  • How to print out just a section of a map or illustration

    Mapmakers, how can I target just a section of a larger map to print out or save separately? I'd like to put just a smaller section of a 28" x 28" map as a sample on the web. I know there is a tool for this but I can't find it.

    when you do the export, in the window where you select a destination, at the bottom you'll see an option for "Use Artboards" select the radio button for that, and then you'll have the option to enter the artboard number you want exported.

Maybe you are looking for