This sound very similar to the following issue that I posted on the
Pluto mailing list when I didn't get a response on this one.

I'm assuming you're using Tomcat. This is apparently a Tomcat issue. I
had to upgrade to Tomcat 5.5.4 and make the following change to
conf/server.xml

Added the attribute emptySessionPath="true" to the following tag:

    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
port="8080"               maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
               enableLookups="false" redirectPort="8443"
acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true"
emptySessionPath="true"/>



Probably because of the following issue:

http://issues.apache.org/jira/browse/PLUTO-53

It turns out this is actually a problem with most servlet containers. To

date it looks like the only platform this functionality works on is 
Tomcat 5.5

-Eric Dalquist

LaCasse, John wrote:

> It is my understanding from the JSR168 spec that all application
> scoped attributes should be accessible from the HttpSession object. 
> When I redirect to a regular jsp page via a link on a portlet, the 
> HttpSession object in that JSP isn't carrying the attributes that are 
> in the Application scoped PortletSession. Based on other responses 
> from the Jetspeed mailing list I've gotten; I want to be clear that 
> because I'm redirecting via a link or a response.sendRedirect that the

> PortletSession attribute does not exist in the request attributes. 
> Because of this it is very difficult if not impossible to communicate 
> data between portlets and there supporting jsp's or servlets. I don't 
> have this issue in Weblogic or WebSphere; in both those containers the

> PortletSession attributes are accessible via the standard HttpSession.

> Am I missing something or is there some configuration that needs to 
> take place?
>
> Thanks for any help on this,
>
> Jpl
>


-----Original Message-----
From: Amit Soni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 18, 2005 4:27 AM
To: jetspeed-user@jakarta.apache.org
Subject: How to get Session in portlet

Hi all,

Here i have problem to get session which i have set in servlet and want
to get this session in portlet...

here i have made on file call login.jsp which has acton security

then i modify jetspeed's  web.xml lik ::



<servlet-name>jetspeed</servlet-name>
        <servlet-class>org.apache.turbine.Turbine</servlet-class>
        <init-param>
            <param-name>properties</param-name>
        
<param-value>WEB-INF/conf/TurbineResources.properties</param-value>
        </init-param>
        <init-param>
            <param-name>resources</param-name>
           
<param-value>org.apache.jetspeed.services.resources.JetspeedResourceServ
ice</param-value>
        </init-param>
        <init-param>
            <param-name>logging</param-name>
           
<param-value>org.apache.jetspeed.services.logging.JetspeedLoggingService
</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>


     <servlet>
        <servlet-name>controller</servlet-name>
       
<servlet-class>com.netcore.sso.controller.SSOController</servlet-class>
     </servlet>
     <servlet-mapping>
       <servlet-name>controller</servlet-name>
          <url-pattern>/security</url-pattern>
          <!--url-pattern>portal</url-pattern-->
    </servlet-mapping>

    <servlet-mapping>
       <servlet-name>jetspeed</servlet-name>
       <url-pattern>/portal/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
       <servlet-name>jetspeed</servlet-name>
       <url-pattern>/jetspeed/*</url-pattern>
    </servlet-mapping>



now in controller servlet i set my session and give redirection like ::

String url = "/portal?action=JLoginUser&username="+userName+
             "&password="+password;

getServletContext().getRequestDispatcher(res.encodeRedirectURL(url)).inc
lude(req,res);


and in my class i write 

session = data.getRequest().getSession();

session.getAttribute("session_name");

But it gives me null;;

so any one of u have idea for this then pls help me..

Regards,
Amit





----------------------------------------------------------
Netcore's New Website
http://www.netcore.co.in
----------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to