0

How to access attribute of servlet context in zk application ?

asked 2014-09-29 08:16:56 +0800

Bhushanngage gravatar image Bhushanngage
59 6

Hello everyone, I have two web application deployed on same server(tomcat). Out of these two, first one is non ZK application, say App1. Second one is ZK application, say App2. Now my requirement is that, I want to access a instance of custom object, say obj from App1 to App2. Somehow I want to set obj as attribute to servletContext of App1 and then access it in App2. Any idea how to do this ?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-10-01 07:01:16 +0800

Bhushanngage gravatar image Bhushanngage
59 6

Anyway, I found how to do this. ((HttpServletRequest)Executions.getCurrent().getNativeRequest()).getSession().getServletContext(); gives me ServletContext.

link publish delete flag offensive edit

Comments

You can also get ServletContext from webapp

WebApps.getCurrent().getServletContext();
vincentjian ( 2014-10-02 10:37:20 +0800 )edit
0

answered 2014-10-01 08:39:40 +0800

robinqq gravatar image robinqq
1
http://www.ponad-bankami....

you this really works ;) good job

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-09-29 08:16:56 +0800

Seen: 23 times

Last updated: Oct 01 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More