File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getContext() returning null

 
Nikhil Sagar
Ranch Hand
Posts: 216
Java Linux Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anirudh Srivastav
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikhil,

Hope this helps you!

http://www.coderanch.com/t/359528/Servlets/java/ServletContext-getContext-method
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anirudh's link is good.
Sorry,I'm new here.I just want a post to test my account.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch Ning Si Liu !
 
Ning Si Liu
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:Welcome to JavaRanch Ning Si Liu !

Thanks so much.I didn't plan to be gotten noticed.
 
Nikhil Sagar
Ranch Hand
Posts: 216
Java Linux Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ning,

You are welcome. Enjoy your Java Ranch journey !!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic