• 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
Posts: 65679
129
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!