Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2004, 11:50 AM
Registered User
 
Join Date: Nov 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tomcat, Linux and Session scope.

I have an application running on a Windows Server machine, which I am trying to port to Linux Red Hat 9. Within my application, I set session attributes:

public String perform(HttpServletRequest request,
                        HttpServletResponse response)
throws IOException, ServletException, Exception {
{
   HttpSession session = request.getSession();
   ....
   session.setAttribute("sessionBean", svo);
   ....
}


and I also retrieve the attributes:

public String perform(HttpServletRequest request,
                        HttpServletResponse response)
throws IOException, ServletException, Exception
{
   HttpSession session = request.getSession();
   SessionVO svo = (SessionVO)session.getAttribute("sessionBean");
   ...
}


The problem is that the attributes stored in the "session" scope are not available when I go to retrieve them. There is no problem on Windows, just Linux. Request scoped attributes work fine on both platforms. Any help or a good steer would be appreciated.

Regards,

Bluespud.
 
Old November 14th, 2004, 01:05 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not sure what method your using here, I have used session beans on windows and linux with no issue.
I simply declared the bean as having session scope in a jsp line with the following:

<jsp:useBean id="sUser" scope="session" class="params.userSession" />
<jsp:setProperty name="sUser" property="*" />

and was able to access it ok from other pages.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat session varibale ibozo Servlets 2 June 4th, 2007 05:48 AM
problem in tomcat working in linux frozen84 Apache Tomcat 1 January 2nd, 2007 01:56 AM
Passing session variables from IIs to Tomcat aman thaper Internet Information Services 0 November 14th, 2006 09:34 AM
dictionary object with session scope lcsgeek Classic ASP Basics 1 May 3rd, 2005 09:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.