[Logo]
Forums Register Login
How to send values from one Servlet Context to other
Heyy Can any one tell me that How can I send values from one servletContext to other?.
Regards,
Vasantha
not directly, and for good reasons (mainly security).
There's several indirect ways:
- write a file with the data and check in the other application whether the file is there, if so read and delete.
- send HTTP requests back and forth
- use some other means of network communication
To switch between web application contexts (in the same container) you need to call getcontext()method of servletcontext. That is -
getServletContext().getContext("\app2").
[ March 22, 2004: Message edited by: Varun Khanna ]
 

In a security conscious environment, the servlet container may return null for a given URL.


Not guaranteed to work, and in fact I'd recommend any servlet container disabling it by default as it is a potential serious security problem.
Let's get him boys! We'll make him read this tiny ad!
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature


This thread has been viewed 607 times.

All times above are in ranch (not your local) time.
The current ranch time is
Apr 25, 2018 03:03:32.