I was using "Apache Standard Taglib Standard 1.1" for setting different resource bundle based on the user. I also added default resource bundle name in web.xml as below.
I was using setBundle tag in my code so that it will set different bundle based on the user.
I tried to set the scope in the setBundle tag, but in "Apache Standard Taglib Standard 1.1" it was throwing an exception saying that var argument need to be used when you are using the scope variable …
Error: passiontemplate1.jsp:31:1: The page failed validation from validator: "Illegal scope attribute without var in "fmt:setBundle" tag.".
Then I was running the code without scope variable, but the setBundle was not overriding the default build name (which is specified in the web.xml)
When I was debugging the code of the JSTL Message Tag (org.apache.taglibs.standard.tag.rt.fmt.MessageTag), they are getting the bundle name from the pageContext .Below is the code which searches the bundle name.
Bear i think it will stil holds good with setBundle tag.. the reason is my message can use the bundle which was set in the different scope based on my requirments...i have learnt that it was bug in Apache Standard Taglib Standard 1.1..... in updated version we have option to set the bundle without any war arguments....
Joined: Oct 17, 2007
The one thing which i can't understand is why they took from web.xml and storing in page context... is that the right way to do ???