You can use any valid java.text.MessageFormat pattern in the format attribute. Sorting will be based on the original object, not on the formatted String.
Note that errors due to an invalid pattern/object combination (for example trying to format a String like a number) will not be rethrown. Instead, an error log will be written and the original unformatted object displayed.
You can also use a format pattern along with column decorators (the pattern will be applied after the decoration).
<display:table name="test">
...
Thursday, 31 January 2013
How to get Month Name
Java Calendar returns month in numeric integer format. To get month
name in string (Jan, Feb, Mar, …), we have to use SimpleDateFormat
class. First calendar date should convert into millisecond to parse into
date object. SimpleDateFormat returns this date in month name string.
import java.util.Calendar;
import java.text.SimpleDateFormat;
public class MonthName {
public static void main(String[] args) {
Calendar ca1 = Calendar.getInstance();
// set(year, month, date) month 0-11
ca1.set(2009,...
Get Month Name
In this Example we want to describe you a code that help you in understanding
a how to get a 'Get Month Name Example'.For this we have a class name 'GetMonthNameExample'.
Inside the main method we declared a String array name
month name. This String array variable is initialized with month name values.
1)getInstance ( ) - This method return you the calendar object
with a specific time zone and locale.
2)get(Calendar.Month) - This get method return you the current month
Finally the System.out.print...
Wednesday, 30 January 2013
split()
String string = "004-034556";
String[] parts = string.split("-");
String part1 = parts[0]; // 004
String part2 = parts[1]; // 03455...
String split() Method
Description:
This method has two variants and splits this string around matches of the given regular expression.
Syntax:
Here is the syntax of this method:
public String[] split(String regex, int limit)
or
public String[] split(String regex)
Parameters:
Here is the detail of parameters:
regex -- the delimiting regular expression.
limit -- the result threshold which means how many strings to be returned.
Return Value:
It returns the array of strings computed by splitting this string around matches of the given...
What Are Magnet Links
Soon, popular torrent site The Pirate Bay will no longer host torrent files. Instead, it will only offer magnet links. Magnet what now?
You may have seen the term "magnet link" before, but if you haven't
used one, here's the lowdown on what this change means for you as a
BitTorrent user.
How Magnet Links Are Different From .Torrent Files
When
you download a .torrent file, you're essentially downloading a small
file that contains...
What is Proxy
Definition: proxy: In communications, a proxy is something that
acts as a server, but when given requests from clients, acts itself as a
client to the real servers. Analogy: Consider talking to somebody who
speaks a foreign language through a translator. You talk to the
translator, who receives your statements, then regenerates something
else completely to the other end.
The translator serves as your proxy.
Key point: The communication terminates at the proxy. In other words,
the proxy doesn't forward data so...
What is Proxy Server
In computer networks, a proxy server is a server (a computer system or an application) that acts as an intermediary for requests from clients
seeking resources from other servers. A client connects to the proxy
server, requesting some service, such as a file, connection, web page,
or other resource available from a different server and the proxy server
evaluates the request as a way to simplify and control its complexity.
Today,...
Tuesday, 29 January 2013
Difference between application server and web server?
Following are some of the key differences in features of Web Server and Application Server:
Web Server is designed to serve HTTP Content. App Server can also serve HTTP Content but is not limited to just HTTP. It can be provided other protocol support such as RMI/RPC
Web Server is mostly designed to serve static content. Though most of the Web Servers are having plugins to support scripting languages like Perl, PHP, ASP, JSP etc. through which these servers can generate dynamic HTTP content.
Most of the application servers...