| Author |
getContext() returning null
|
Nikhil Sagar
Ranch Hand
Joined: Apr 21, 2012
Posts: 214
|
|
Here is My code..
here on this line....
i am getting NullPointerException
first_app is deployed and running and working fine.
I am a newbie to serblets so please explain your answer properly.
Thanks in advance.
|
OCPJP 6 86%
|
 |
Anirudh Srivastav
Greenhorn
Joined: Jun 30, 2012
Posts: 13
|
|
Nikhil,
Hope this helps you!
http://www.coderanch.com/t/359528/Servlets/java/ServletContext-getContext-method
|
Anirudh
PMP, OCJCP 6
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
otherCtx is null?
did you tune crossContext attribute in Context xml?
*Note:Some of the server may not support this function.
|
 |
Ning Si Liu
Greenhorn
Joined: Jul 27, 2012
Posts: 2
|
|
Anirudh's link is good.
Sorry,I'm new here.I just want a post to test my account.
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
|
Welcome to JavaRanch Ning Si Liu !
|
 |
Ning Si Liu
Greenhorn
Joined: Jul 27, 2012
Posts: 2
|
|
Seetharaman Venkatasamy wrote:Welcome to JavaRanch Ning Si Liu !
Thanks so much.I didn't plan to be gotten noticed.
|
 |
Nikhil Sagar
Ranch Hand
Joined: Apr 21, 2012
Posts: 214
|
|
Seetharaman Venkatasamy wrote:otherCtx is null?
did you tune crossContext attribute in Context xml?
*Note:Some of the server may not support this function.
Unable to locate Context xml please tell me where is it??
i am using GlassFish Server Open Source Edition 3.1.2 (build 23)
|
 |
Anirudh Srivastav
Greenhorn
Joined: Jun 30, 2012
Posts: 13
|
|
I guess you would have figured it out by yourself in case haven't here is a piece of info which would help you.
There is property named crossContextAllowed which is equivalent to crossContext of tomcat. It should be available in your web application's web app xml. You may refer your server user guide to know the exact syntax.
Hope this helps.
Regards
|
 |
Anirudh Srivastav
Greenhorn
Joined: Jun 30, 2012
Posts: 13
|
|
Ning,
You are welcome. Enjoy your Java Ranch journey !!
|
 |
 |
|
|
subject: getContext() returning null
|
|
|