Found 178 Articles for JSP

How to use multiple resource bundle in same JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

208 Views

The tag is used to load a resource bundle and stores it in the named scoped variable or the bundle configuration variable.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultbasenameBase name of the resource bundle family to expose as a scoped or a configuration variableYesNonevarName of the variable to store the new bundleNoReplace defaultscopeScope of the variable to store the new bundleNoPageExample           JSTL fmt:setBundle Tag                     The above code will generate the following result −One Two Three

How to set locate to identify required resource bundle in JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

129 Views

The tag is used to store the given locale in the locale configuration variable.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueSpecifies a two-part code that represents the ISO-639 language code and an ISO-3166 country code.Yesen_USvariantBrowser-specific variantNoNonescopeScope of the locale configuration variableNoPageExampleResource bundles contain locale-specific objects. Resource bundles contain key/value pairs. When your program needs a locale-specific resource, you keep all the keys common to all the locale but you can have translated values specific to locale. Resource bundles helps in providing content specific to locale.A Java resource bundle file contains a series of key-to-string mappings. The method that we ... Read More

How to use resource bundle in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

865 Views

The tag will make the specified bundle available to all tags that occur between the bounding and tags. With this, you need not specify the resource bundle for each of your tags.For example, the following two blocks will produce the same output − AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultbasenameSpecifies the base name of the resource bundle that is to be loaded.YesNonePrefixValue to prepend to each key name in subtagsNoNoneExampleResource bundles contain locale-specific objects. Resource bundles contain key/value pairs. When your program ... Read More

How to parse date in JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

602 Views

The tag is used to parse dates.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueDate value to read (parse)NoBodytypeDATE, TIME, or BOTHNodatedateStyleFULL, LONG, MEDIUM, SHORT, or DEFAULTNoDefaulttimeStyleFULL, LONG, MEDIUM, SHORT, or DEFAULTNoDefaultparseLocaleLocale to use when parsing the dateNoDefault localepatternCustom parsing patternNoNonetimeZoneTime zone of the parsed dateNoDefault time zonevarName of the variable to store the parsed dateNoPrint to pagescopeScope of the variable to store the formatted dateNopageA pattern attribute is provided that works just like the pattern attribute for the tag. However, in the case of parsing, the pattern attribute tells the parser what format to expect.Example   ... Read More

How to format date in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

4K+ Views

The tag is used to format dates in a variety of ways.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueDate value to displayYesNonetypeDATE, TIME, or BOTHNodatedateStyleFULL, LONG, MEDIUM, SHORT, or DEFAULTNodefaulttimeStyleFULL, LONG, MEDIUM, SHORT, or DEFAULTNodefaultpatternCustom formatting patternNoNonetimeZoneTime zone of the displayed dateNoDefault time zonevarName of the variable to store the formatted dateNoPrint to pagescopeScope of the variable to store the formatted dateNopageThe pattern attribute is used to specify even more precise handling of the date −CodePurposeSampleGThe era designatorADyThe year2002MThe monthApril & 04dThe day of the month20hThe hour(12-hour time)12HThe hour(24-hour time)0mThe minute45sThe second52SThe millisecond970EThe day of the weekTuesdayDThe day of ... Read More

How to parse currencies in JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

155 Views

The tag is used to parse numbers, percentages, and currencies.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueNumeric value to read (parse)NoBodytypeNUMBER, CURRENCY, or PERCENTNonumberparseLocaleLocale to use when parsing the numberNoDefault localeintegerOnlyWhether to parse to an integer (true) or floating-point number (false)NofalsepatternCustom parsing patternNoNonetimeZoneTime zone of the displayed dateNoDefault time zonevarName of the variable to store the parsed numberNoPrint to pagescopeScope of the variable to store the formatted numberNopageA pattern attribute is provided that works just like the pattern attribute for the tag. However, in the case of parsing, the pattern attribute tells the parser what format to expect.Example ... Read More

How to parse percentages in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

241 Views

The tag is used to parse numbers, percentages, and currencies.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueNumeric value to read (parse)NoBodytypeNUMBER, CURRENCY, or PERCENTNonumberparseLocaleLocale to use when parsing the numberNoDefault localeintegerOnlyWhether to parse to an integer (true) or floating-point number (false)NofalsepatternCustom parsing patternNoNonetimeZoneTime zone of the displayed dateNoDefault time zonevarName of the variable to store the parsed numberNoPrint to pagescopeScope of the variable to store the formatted numberNopageA pattern attribute is provided that works just like the pattern attribute for the tag. However, in the case of parsing, the pattern attribute tells the parser what format to expect.Example ... Read More

How to parse number in JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

530 Views

The tag is used to parse numbers, percentages, and currencies.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueNumeric value to read (parse)NoBodytypeNUMBER, CURRENCY, or PERCENTNonumberparseLocaleLocale to use when parsing the numberNoDefault localeintegerOnlyWhether to parse to an integer (true) or floating-point number (false)NofalsepatternCustom parsing patternNoNonetimeZoneTime zone of the displayed dateNoDefault time zonevarName of the variable to store the parsed numberNoPrint to pagescopeScope of the variable to store the formatted numberNopageA pattern attribute is provided that works just like the pattern attribute for the tag. However, in the case of parsing, the pattern attribute tells the parser what format to expect.Example ... Read More

How to format currencies in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

968 Views

The tag is used to format numbers, percentages, and currencies.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueNumeric value to displayYesNonetypeNUMBER, CURRENCY, or PERCENTNoNumberpatternSpecify a custom formatting pattern for the output.NoNonecurrencyCodeCurrency code (for type = "currency")NoFrom the default localecurrencySymbolCurrency symbol (for type = "currency")NoFrom the default localegroupingUsedWhether to group numbers (TRUE or FALSE)NotruemaxIntegerDigitsMaximum number of integer digits to printNoNoneminIntegerDigitsMinimum number of integer digits to printNoNonemaxFractionDigitsMaximum number of fractional digits to printNoNoneminFractionDigitsMinimum number of fractional digits to printNoNonevarName of the variable to store the formatted numberNoPrint to pagescopeScope of the variable to store the formatted numberNopageExample       ... Read More

How to format percentages in JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

401 Views

The tag is used to format numbers, percentages, and currencies.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueNumeric value to displayYesNonetypeNUMBER, CURRENCY, or PERCENTNoNumberpatternSpecify a custom formatting pattern for the output.NoNonecurrencyCodeCurrency code (for type = "currency")NoFrom the default localecurrencySymbolCurrency symbol (for type = "currency")NoFrom the default localegroupingUsedWhether to group numbers (TRUE or FALSE)NotruemaxIntegerDigitsMaximum number of integer digits to printNoNoneminIntegerDigitsMinimum number of integer digits to printNoNonemaxFractionDigitsMaximum number of fractional digits to printNoNoneminFractionDigitsMinimum number of fractional digits to printNoNonevarName of the variable to store the formatted numberNoPrint to pagescopeScope of the variable to store the formatted numberNopageExample ... Read More

Advertisements