Discussions

Web tier: servlets, JSP, Web frameworks: JSTL to retrieve init Param

  1. JSTL to retrieve init Param (5 messages)

    Hi, We have a defined an init parameter in web.xml as below x.y someValue Now I want to access the same in JSP using JSTL but it is not accessible. JSP code is as below If I change the context param name to "x" then using initParam.x the value can be retrieved. But If we keep the context param name to "x.y" then JSTL is not able to retrieve the value. I think there must be problem fetching the value when name is "x.y". Has anyone faced this kind of problem? Any help is appreciated. regards, Amit

    Threaded Messages (5)

  2. Re: JSTL to retrieve init Param[ Go to top ]

    this should solve your problem regards, pradheesh
  3. Re: JSTL to retrieve init Param[ Go to top ]

    Hello, Thank you very much for the input. It has solved the problem. Can I know what is the logic behind this? This may be the simple one but i am very new to this JSTL and hence not able to figure out exactly how it is working. Many thanks Again Amit
  4. Re: JSTL to retrieve init Param[ Go to top ]

    The EL borrows the JavaScript syntax for accessing structured data like named array element ,with the ["name"] operator. JavaBeans component properties and java.util.Map entries, using the key as the property name, can be accessed this way. ${myObj["myProperty"]}
  5. Re: JSTL to retrieve init Param[ Go to top ]

    Many thanks once again for the explaination. In the mean time i found a good overview PDF for JSTL tags. Sending you the link herewith as attachment is not possible. http://www.oio.de/public/java/jstl-reference/jstl-reference-2005.pdf regards, Amit
  6. Re: JSTL to retrieve init Param[ Go to top ]

    thank you amit for the reference guide