Skip to main content
Improved the title to make it more generic and relevant; added the related tag.
Source Link
informatik01
  • 16.3k
  • 11
  • 77
  • 108

Can I get Getting the init parameters in doGet()?a servlet

I am new to servlets. I got the init parameters in DD within the init() method using getInitParameter("name"). I tried a lot from within doGet() method to access the init parameters, but it always returns null.

I tried with

getServletContext().getInitParametr("name")

and with

getServletConfig().getInitParametr("name")

but they all return null. Can I get the init parameters in the doGet()?

Can I get the init parameters in doGet()?

I am new to servlets. I got the init parameters in DD within the init() method using getInitParameter("name"). I tried a lot from within doGet() method to access the init parameters, but it always returns null.

I tried with

getServletContext().getInitParametr("name")

and with

getServletConfig().getInitParametr("name")

but they all return null.

Getting the init parameters in a servlet

I am new to servlets. I got the init parameters in DD within the init() method using getInitParameter("name"). I tried a lot from within doGet() method to access the init parameters, but it always returns null.

I tried with

getServletContext().getInitParametr("name")

and with

getServletConfig().getInitParametr("name")

but they all return null. Can I get the init parameters in the doGet()?

edited tags
Link
informatik01
  • 16.3k
  • 11
  • 77
  • 108

Can iI get the init parameters in dogetdoGet()?

I am new to servlets. I got the init parameters in DD within the init() method using getInitParameter("name"). But iI tried a lot from within doGet() method to access the init parameters, but it always returningreturns null. 

I tried with

getServletContext().getInitParametr("name") 

and with

getServletConfig().getInitParametr("name")

but they all returningreturn null.

Can i get the init parameters in doget()

I am new to servlets. I got the init parameters in DD within the init() method using getInitParameter("name"). But i tried lot from within doGet() method to access the init parameters, but it always returning null. I tried with

getServletContext().getInitParametr("name") and with

getServletConfig().getInitParametr("name")

but all returning null.

Can I get the init parameters in doGet()?

I am new to servlets. I got the init parameters in DD within the init() method using getInitParameter("name"). I tried a lot from within doGet() method to access the init parameters, but it always returns null. 

I tried with

getServletContext().getInitParametr("name") 

and with

getServletConfig().getInitParametr("name")

but they all return null.

Code formatted
Source Link
Bob Kaufman
  • 12.7k
  • 16
  • 80
  • 111
Loading
Source Link
Shameer
  • 361
  • 2
  • 5
  • 11
Loading