not getting parameters when request is submitted from portlet to aservlet - Websphere

This is a discussion on not getting parameters when request is submitted from portlet to aservlet - Websphere ; I have a query.Is it possbile to use a servlet filter to obtain parameters when a request is submitted from a portlet to a servlet.I am not able to get the userid in the servlet(other than through the url which ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: not getting parameters when request is submitted from portlet to aservlet

  1. not getting parameters when request is submitted from portlet to aservlet

    I have a query.Is it possbile to use a servlet filter to obtain parameters when a request is submitted from a portlet to a servlet.I am not able to get the userid in the servlet(other than through the url which is not a good practise).
    If yes, is this a good practise and could you help me out with a few code snippets?

  2. Re: not getting parameters when request is submitted from portletto a servlet

    Could you provide more details about your use-case?
    Are the servlet and portlet part of the same application?
    Are you trying to get the user who is logged in or are you passing another userid parameter?

    Ryan

    SCJP & SCWCD
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: not getting parameters when request is submitted from portletto a servlet

    Thanks for your reply Ryan.
    Both the servlet and Portlet are part of the same application. I need to get the logged in user id in the servlet.
    The flow is as follows. The user enters details in a Web form. Based on the Logged in User Id I need to query the database and present him the details. Upon clicking on the details, I need to take the control to a servlet.
    I need the logged in user id in the servlet. I can pass this as part of the URL, but due to security reason it's not recommended. What I did initially was to save the user id in the session and the scope of the session was APPLICATION. It had some other issues. So I changed the scope back to portlet. As a result of that the user id is not available in the session.
    Is it necessary to use a Servlet Filter for this and is that a good practice since all the request will be intercepted by the servlet? Or are there any other workarounds possible?
    Could you please help me?

    Thanks

  4. Re: not getting parameters when request is submitted from portletto a servlet

    The best approach would be to use the application scope. It may be best to focus on what problems you were having with that.

    Ryan

    SCJP & SCWCD
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  5. Re: not getting parameters when request is submitted from portletto a servlet

    That was done initially and I was able to get the user id in the servlet. But the problem is- On one page we had two portlets from the same application. The first time when the user submits the form of on portlet, the other portlet also gets refreshed. It happens only once. In the other portlet dojo's charting tools were used and it takes a lot of time to load.

    Thanks

+ Reply to Thread