struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: web.XML - lookup values?
Date Sun, 26 Aug 2001 00:42:04 GMT
In the <servlet> section of your web.xml file, you can define an init param
like this:

      <param-value>dd, MMM, yyyy hh:mm</param-value>

Then, in your code, you can access it like this:

    String dateFormat =

Martin Cooper

----- Original Message -----
From: "Ben Jessell" <>
To: <>
Sent: Wednesday, August 22, 2001 9:17 AM
Subject: web.XML - lookup values?

> Slightly off-subject, but does anyone know how you can define values in
> and then look them up in your actionForm? Or if it can't be done in
> how about
> Basically, I want to format a date according to a time format string eg,
> "dd, MMM, yyyy hh:mm". However, I want to be able to configure this via a
> setting. I'd imagine there'd be something in web.xml  like
> <mapping>
> <var>
> myTimeFormatVar
> </var>
> <type>
> java.lang.String
> </type>
> <value>
> "dd, MMM, yyyy hh:mm
> </value>
> <mapping>
> failing that, can I do it in JDNI?
> Thanks
> -b
> =**********************************************************
> If you are not the intended recipient, employee or agent responsible for
delivering the message to the intended recipient, you are hereby notified
that any dissemination or copying of this communication and its attachments
is strictly prohibited.
> If you have received this communication and its attachments in error,
please return the original message and attachments to the sender using the
reply facility on e-mail.
> Internet communications are not secure and therefore the UCLES Group does
not accept legal responsibility for the contents of this message.  Any views
or opinions presented are solely those of the author and do not necessarily
represent those of the UCLES Group unless otherwise specifically stated.
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses although this does not
guarantee that this email is virus free.
> **********************************************************=

View raw message