• Post Reply Bookmark Topic Watch Topic
  • New Topic

Param in Java class  RSS feed

 
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
Posts: 66158
146
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
Boost this thread!