[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: Problem with initializing a servlet.
Then it's a bug in cppserv, most likely. File it, along with few minimal
working code pieces that demonstrate the bug.
sergey@total-knowledge.com wrote:
> Yes, it works in samples. But the difference is that it's called in
> service() there, not init().
> I tried to call it in UuServlet::service() too and getInitParameter()
> worked just fine.
>
>
>> Is that how samples do it? Does it work in samples?
>>
>> sergey@total-knowledge.com wrote:
>>
>>>> You should never be overriding Servlet::init(ServletConfig&)
>>>> There is another one - HttpServlet::init() - not the empty parameter
>>>> list.
>>>> You should override that one (and there is no need to call parent's
>>>> init() method - it's empty.).
>>>>
>>>>
>>> I tried that initially, but with the same result: getInitParameter()
>>> operations returned null.
>>> That's why I tried init(ServletConfig&) hoping that it will create
>>> config
>>> object. Apparently it didn't.
>>> Any ideas why getServletConfig().getInitParameter("bla") does not work
>>> in
>>> init()?
>>>
>>>
>> --
>> Ilya A. Volynets-Evenbakh
>> Total Knowledge. CTO
>> http://www.total-knowledge.com
>>
>>
>>
>
>
>
--
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com