Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Param in Java class

 
Dan Parsons
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need a web.xml context value to work in a plain Java Class that is not a Servlet.


For a servlet I can fetch the value like this:
config.getInitParameter("myValue")


Anyway to get a web.xml param or something similiar to work in a Java class?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fetch it in the servlet and pass it to the non-servlet class as a parameter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic