This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • 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: 66199
151
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!