0

I'm trying to put PrettyTime into JSP as a tag. Found this page - http://www.ke-cai.net/2010/03/formatting-time-with-prettytime-jsp-tag.html - as the only source of the tag. But I've never used Maven, so I can't figure out how to get that prettyTime.tag file along with the source code. Can someone suggest something or should I just go ahead and write a tag myself?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Daniil
  • 1,398
  • 2
  • 17
  • 28

3 Answers3

0

That's just a blog of someone else. It's available by the manufacturer's site: http://ocpsoft.com/prettytime/

It's however a JSF tag, which means that you have to install and use JSF as well.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • No, they link to JSP tag. By itself, PrettyTime has no JSP support other than JSF which we don't use. I guess I'll write my own :( – Daniil Nov 29 '10 at 16:21
  • Yes, if you aren't using JSF, then it won't have any value for you. At the manUfacturer's site (with a wink to seanizer ;) ) you can however download the source. – BalusC Nov 29 '10 at 16:24
0

From what I can see in that article, all Maven will be doing is pulling in the java library. You can do this manually, and include it in your standard way (ie, in your "lib").

He seems to be telling you then how to write your own jsp tag (suggesting you call it "prettyTime.tag"), and then how to reference it.

Side note, you may want to consider reading up on and adopting Maven, its quite a powerful build management helper for java web app development.

mBria
  • 2,412
  • 2
  • 15
  • 11
  • Yeah, I did have a suspicion that post is totally pointless, I can download PrettyTime just fine w/out reading that post. What a bummer. Thanks for clearing it up. Seems that I'll have to research Maven as it becomes more used these days. – Daniil Nov 29 '10 at 16:30
0

Instead of using a server-side component, you can use javascript. See the jQuery timeago plugin

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140