This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You did the same thing I did ,Please give a second thought of my post. Declaring variable outside the jspInit method doesn't change the output because we have to set attribute inside the method. It's not working.
Originally posted by Vijay Bharghav bheemineni: Hi Omi,
I feel that your statement "Actually init-param is not for jsp it's for servlet for jsp we use context-param like a charm" is "wrong".
John was right, actual problem is we can't have both "<jsp-file>" and "<servlet-class>" tag, at any time we can have only "<jsp-file>" or <servlet-class>" tag.
I would request you to check the first version of the code by removing the "<servlet-class>" tag.
Well my dear ,jsp is servlet for container not for client. If jsp is really servlet for client ,then please tell me why do we need to use <jsp-file> element in DD?
Yes , I know John was right.I did not know the whole story because I had form-parameters to access via servlet and then process it in jsp and a model java class.When I tried to remove <servlet-class> I got null-pointer exception so that time I thought what was he talking about.Later I knew what did he mean.
I already solved my problem. Thank you for reply.
best regards, omi [ May 23, 2008: Message edited by: omi sharma ]