• Post Reply Bookmark Topic Watch Topic
  • New Topic

date dispaly problem  RSS feed

 
kadali srinivas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
how to display date field had MM-DD-YYYY in individual combo boxes in jsp.
and another one how to get date and time details in JSP and how to store date and time in SQL Server 200o0 table from JSP,and how to retrieve date and time from SQL date base to JSP page to display.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- Get all the strings, like month, year, and day
- Concatenate all
- Parse that string using SimpleDateFormat class
- Store into DB
 
Stefan Willi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To to display a date with a custom pattern, you could use <fmt:formatDate> from JSTL.

Stefan
 
kadali srinivas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi willi,
How can i get this jstl-fmt.tld,i have to write or its already there,
can u tell about jstl-fmt.tld also.
bye
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL == JavaServer Pages Standard Tag Library.
[ March 23, 2005: Message edited by: Paul Sturrock ]
 
kadali srinivas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey
paul ur url not is not working ,pls send the url again.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neither it was. Try it now.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kadali,

JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

thanks,
bear
Forum Bartender
 
Stefan Willi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, thanks to Bear Bibeault!
For me, as a non native english speaker, it is sometimes difficult to understand a question or an answer at the first time of reading, if the author is using abbreviations.

Second, there is a reference implementation of the JSTL-specification on Apache. You can it download from the jarkarta site
Steps for installation:
  • Copy the files jstl.jar and standard.jar into your classpath (eg /WEB-INF/lib)
  • Copy the tld Files into your /WEB-INF/tld direcotry.
  • Add the Tablib-element into your web.xml file (section jsp-config)

  • The taglib-uri is important, because you have to point to it in your jsp-file. You can name it, how do you like. I think, each project has its own naming conventions.
    For usage, please se my previous post.

    Stefan.

    [ March 23, 2005: Message edited by: Stefan Willi ]
    [ March 23, 2005: Message edited by: Stefan Willi ]
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Posts: 65833
    134
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You are welcome, Stefan.

    One thing I would point out is that most containers will auto-detect taglibs that are in jars placed in WEB-INF/lib. Therefore it usually not necessary to extract the tld files, place them anywhere and to add anything to the web.xml file.

    Just be sure to reference the correct URI for the taglib in the pages' taglib directive.
     
    Stefan Willi
    Ranch Hand
    Posts: 47
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Bear Bibeault:

    One thing I would point out is that most containers will auto-detect taglibs that are in jars placed in WEB-INF/lib. Therefore it usually not necessary to extract the tld files, place them anywhere and to add anything to the web.xml file.

    Of course, but in my experience, some plugins (especially Lomboz) have problems to dedect the taglib, if they are not declared in the web.xml.

    Stefan.
     
    Adeel Ansari
    Ranch Hand
    Posts: 2874
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Stefan Willi:
    Of course, but in my experience, some plugins (especially Lomboz) have problems to dedect the taglib, if they are not declared in the web.xml.


    I couldn't make Lomboz work. Actually I didn't try hard.
    Bottomline is, I dont like it. Its very buggy, I treid it with eclipse 3.0 on Windows machine. But its me.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!