aspose file tools
The moose likes JSF and the fly likes How to Read Param value from web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to Read Param value from web.xml" Watch "How to Read Param value from web.xml" New topic
Author

How to Read Param value from web.xml

Yahya Arshad
Greenhorn

Joined: May 15, 2011
Posts: 26
i am trying to read param value "Mobile Pattern"



by putting

for this i imported import javax.servlet.*;
import javax.servlet.ServletContext;
packages
but it is not recognizing getServletContext method

can any one tell me how i can read this param in jsf
please i am waiting i am new in jsf

srinivas srinivasmeenavalli
Ranch Hand

Joined: Jul 13, 2008
Posts: 65
try config.getServletContxt();
Yahya Arshad
Greenhorn

Joined: May 15, 2011
Posts: 26
it is not working
Yahya Arshad
Greenhorn

Joined: May 15, 2011
Posts: 26
After searching i got way to get instance of FacesContext and from which i get refrence to ExternalContext and after obtaining ExternalContext's reference i am able to use its methods but i am unable to obtain.

my web.xml entries are still same


any suggestion please
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to Read Param value from web.xml
 
Similar Threads
getServletConfig() and getServletContext()
getServletContext() throws NullPointerException
how to initiate hashtable and linklist
not able to get the context attribute set in ServletContextListener
Problem with RichFaces Calendar control