Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Read Param value from web.xml

 
Yahya Arshad
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try config.getServletContxt();
 
Yahya Arshad
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is not working
 
Yahya Arshad
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic