This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Combine two struts applications. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Combine two struts applications." Watch "Combine two struts applications." New topic
Author

Combine two struts applications.

Vamsi Pemmaraju
Greenhorn

Joined: Dec 11, 2008
Posts: 4
Hi,
I have two struts applications each having a separate struts-config file. How do I call the second application from the first?.
I have tried calling the application, but when we step into the second app the previous session gets closed. How do I overcome this problem and retain previous session values?
Regards,
Vamsi
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The simple answer is that you don't share sessions across applications--different applications have different sessions. It's unlikely that the previous session is "closed", you're just not in that app anymore.
Vamsi Pemmaraju
Greenhorn

Joined: Dec 11, 2008
Posts: 4
Hi David,

I could get you that when we enter in to a new session the previous session is gone. Is there a way so that I can pass a value?(Example: user Id). I will be retrieving the necessary information in the new session from then on.

Regards
Vamsi
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You can pass anything you want in a request.
Vamsi Pemmaraju
Greenhorn

Joined: Dec 11, 2008
Posts: 4
Hi David,

I am not able to retrieve the request attributes in the servlet, which are set in request in a jsp file. A call to the servlet is made from the jsp file. Another point is this servlet is present in a different application. How do I access them?

Regards
Vamsi
Vamsi Pemmaraju
Greenhorn

Joined: Dec 11, 2008
Posts: 4
Hi David,

Thank you very much for your suggestion. i have tried a lot using the request object but it did not help. Finally I could send the attributes across applications with in a web server using the ServletContext.

Regards
Vamsi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Combine two struts applications.
 
Similar Threads
Struts-Config Roles and redirection
STRUTS BLAZE DS FLEX problem
How to maintain/preserve session between applications on same AS?
flex and struts integration and communication
Invoking a new Session