Putting a HashMap in the portlet session

I am trying to put a HashMap into a portlet session bean, so I am using this code
HashMap sectype = getSessionBean(request).getAccess();
               if (sectype == null){
               Security security = new Security();
               Vector secvec = security.findDistinctlevels(division, request.getUser().getID());
               Iterator i = secvec.iterator();
               while (i.hasNext()) {
                    sectype.put(i.next(),i);                                   
getSessionBean(request).setAccess(sectype);
it is falling over at the "if (sectype == null)" part. is there another way to test if the hashMap has been fullfilled by the session bean or I have to create one?

"Falling over"?

Similar Messages

  • Putting an attribute into the request/session/servletContext

    Hello,
    I would like to add an attribute into the request (or session or servletContext) from JSF. Is that possible? If so how? (I want the equivalent of request.addAttribute only the request object is not available in JSF).
    Thanks in advance,
    Julien.

    you can use <f:param> in combination with the command link component or directly put it with FacesContext.getCurrentInstance().getExternalContext().getRequestParameterParm().put(..)

  • I have an iphone 5 with iOS 6.  I just  tried to sync it with my itunes account to put new music on my phone and it gave me a message that said the iphone could not be synced b/c "the sync session had failed to start".  How do I fix this?

    I have an iphone 5 with ios 6.1.4.  I just tried to sync my phone to my itunes acct to load new music onto my phone and it gave me a message saying that it was unable to sync b/c "the sync session failed to start".  It let me download all pictures, but would not let me do anything else and just kept repeating the same message.  Why is this happening and how do I fix it?

    You need to subscribe to iTunes Match to store your music on iCloud:
    http://www.apple.com/itunes/itunes-match/
    To transfer iTunes Store purchases made on your phone to your computer, connect your phone then choose "Transfer purchases..." from the File menu in iTunes.
    Photostream transfers photos taken on your iOS devices to other devices and your computer. For troubleshooting Photostream see: http://support.apple.com/kb/TS3989

  • How to reset the JSF Portlet session state in weblogic portal 10.3

    Hi All,
    We are implementing our application with the jsf1.2 with 10.3.0 portal framework.
    in a tab i placed my jsf portlet, it will navigate up to 4 pages. We do have some other tabs too in our application. So when i navigate to other tabs and when i comeback to the jsf portlet tab i am resetting the portlet state to first page by onDeactivation portal event.
    But the problem when the user within the tab and navigate to pages if he clicks again the tab it is not redirecting to start page.
    I know we do have refresh action in our pageflows .. but how to reset the jsf portlet to start page when it is not deactivating. Please do help me..
    Thanks in advance...
    Edited by: Siddu4u on Oct 10, 2011 8:33 PM

    Hello,
    This documentation should help you to use the import tool in the Portal Admin Console:
    http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14245/deployment.htm#i1047336
    Kevin

  • JSTL, HttpSession and Portlet Session

    Here's a mysterious problem.
    I am trying to use portlet with JSP together. Inside the portlet, I populate some data, put the data into portlet session and dispatch (include) to a jsp. On the jsp, if I use JSTL to access the http session data:
    <c:out value="{sessionScope.test}"/> I got the following excepiton:
    14:27:08,880 ERROR StandardWrapper[portlet:jsp]:727 - Servlet.service() for se
    vlet jsp threw exception
    java.lang.IllegalStateException: Cannot access session scope in page that does
    ot participate in any session
    at org.apache.jasper.runtime.PageContextImpl.doGetAttribute(PageContext
    mpl.java:264)
    at org.apache.jasper.runtime.PageContextImpl.getAttribute(PageContextIm
    l.java:249)
    at org.apache.taglibs.standard.lang.jstl.ImplicitObjects$3.getValue(Imp
    icitObjects.java:633)
    If I use jsp scriptlet to access the http session, everything is fine:
    <%= request.getSession("test") %>
    Has anyone seen this exception? I posted the question on portlet forum already and no one is able to answer it so far.
    What's the different between JSTL sessionScope and jsp scriptlet?
    thanks!

    Try the calls
    <%= session.getAttribute("test") %>
    and
    <%= request.getSession().getAttribute("test") %>
    Make sure do not have on your page anywhere:
    <%@ page session="false" %>

  • Portlet session

    I have a small query regarding PortletSession. Could you please confirm if it's possible to use PortletSession in Java page flow controller portlet in weblogic.If yes, please share the sample code for the same.
    We see only HttpSession. Is there a way to restrict the scope to User (like application Scope).
    Waiting for your reply.

    Hello,
    The javax.portlet.PortletSession object is part of the JSR168 (Java Portlet) API and can be used only with JSR168 portlets. It will not work with other portlet types.
    However, you can implement the same scoping functionality yourself using HttpSesssion by "namespacing" your session attributes. Attributes stored in HttpSession without any special scoping are the equivalent of the PortletSession's application scope, as there is one HttpSession per user session. To emulate the PortletSession's portlet scope using HttpSession, you can put a unique portlet identifier such as the portlet instance label in your HttpSession attribute names when you store or get attributes, such as:
    String portletScopedAttributeName = portletInstanceLabel + "sampleAttributeName";Kevin

  • Getting Portlet Session.

    HI,
    I have indidual portlet applications deployed in OAS Portal 10G. I need to pass user related information to all applications which are indidual portlets to do some co-branding. I know that I can append these as a parameter to the Portlet URL. But I don't want to do that. Apart from that what are the possible options to put that in Session and access them in other portlets?
    Please let me know.

    HI Sudip,
    Thanks for the reply.
    Can you please give me any sample code or explain me about using the PortletSession API?
    I never used that before and want a brief intro on that.
    If you have any articles or documentation, that would be real helpful.

  • Using jsessionid to get to the right session

              We've got an odd situation that we've run into using Weblogic Server 8.1 SP2 to
              serve up dynamic VoiceXML pages. Our VoiceXML platform has a VoiceXML browser
              and another component called a compilation server, whose job is to retrieve grammars,
              compile them and make them available for recognition. Although the browser itself
              supports cookies, the compilation server does not.
              Here's the scenario:
              Server A (the browser) makes a request to Weblogic for its initial page, and a
              new session is created. The page that is returned contains a link that includes
              the session ID appended to the end of the URL, so that it looks like this. http://someserver/voice/grammars/grammar.jsp;jsessionid=A0vIhV1RkYzwYI0vcS1b0ykU21YPy2Ww3r9WBzoDAOq04liAWnQf!507937038!1089777544278.
              Server A sends that URL (including the jsessionid) to server B (the compilation
              server), and B uses the URL to fetch a grammar.
              In the HTTP access logs for Weblogic, we see the second request (from B) come
              in, and it contains the correct jsessionid. However, our application logs show
              that a entirely new session is actually created, with a brand new session ID.
              To further test it out, some attributes that were put into the session during
              the initial request are definitely not there on the second request.
              Anyone know how we can make Weblogic use the jsessionid to find the correct session
              rather than create a new one? Our assumption is that since the request is coming
              from a different client, Weblogic is automatically creating a new session.
              

    Our assumption is that          > since the request is coming
              > from a different client, Weblogic is automatically
              > creating a new session.
              Server will create a new session only if the jsessionid is not present in the original request. Making a request from a different client should not make a difference.
              Are you making the request to the same application in both the cases ?
              You may try the following code and access it from diff. client to see the expected result.
              <html>
                   <head>
                        <title>some Application</title>
                   </head>
                   <body>
                   Session is new ==> <%=session.isNew()%> <BR>
                   Session Id is ==> <%=session.getId()%>     <BR>
                   <% if(session.isNew()){
                        session.setAttribute("one","sesion-one");
                             else{
                             out.println("Attribute is " + session.getAttribute("one"));
                   %>     
                   </body>
              </html>

  • I just down loaded lion and now every time i turn on the computer every single thing i had used in the last session opens up--how do i stop this?

    I just loaded lion on my macbook pro, and everytime i turn on the computer, every thing i did in the last session, like word, instant messanger, sites, pop-up-how do i stop this and just get to my desktop when the computer is first turned on--please help!

    Remember that you can just put your Macbook to sleep by closing the lid. Unless you're not going to use it for a few days this makes more sense than shutting it down. I sleep my MBP overnight and it uses about 3% of battery power. I only shut it down if I install updates.

  • Problem in accessing a Lotus Notes installed in French from the portlet

    Hi,
    We installed the Lotus Notes Portlet on a 9iAS V2 on a solaris Box. The installation of the portlet worked fine and we tried to get the messages from notes.
    Accessing a french install of Notes on a Win2K box, we got the following error:
    Error: Lotus Notes Portlet encountered Domino error:4045 Invalid date lotus.domino.NotesException at lotus.domino.cso.Session.createDateTime(Session.java:196) at oracle.lotus.application.LotusProvider.showPortlet(LotusProvider.java:817) at oracle.lotus.application.LotusProvider.process(LotusProvider.java:1091) at oracle.lotus.application.InboxShowRenderer.renderBody(InboxShowRenderer.java:84) at oracle.portal.provider.v1.RenderManager.render(RenderManager.java:165) at oracle.portal.provider.v1.http.ServletProviderResponse.showPortlet(ServletProviderResponse.java:528) at oracle.portal.provider.v1.http.HttpProvider.dispatchProviderAction(HttpProvider.java:660) at oracle.portal.provider.v1.http.HttpProvider.service(HttpProvider.java:390) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:500) at org.apache.jserv.JServConnection.run(JServConnection.java:321) at java.lang.Thread.run(Thread.java:484)
    We tried to change the NLS_LANG and NLS_DATE_FORMAT in jserv.properties without any success.
    After that, we connected the Lotus external application to an American Notes install on Linux and we didn't got the problem.
    Where do i have to modify something to be able to use the portlet WITH my French Notes install ?
    Thanks
    regards

    We have the same problem with a spanish Lotus Domino installation.
    This is the stack of error shown when display the Domino portlets.
    Error: Lotus Notes Portlet encountered Domino error:4045 Invalid date lotus.domino.NotesException at lotus.domino.cso.Session.createDateTime(Session.java:196) at oracle.lotus.application.LotusProvider.showPortlet(LotusProvider.java:817) at oracle.lotus.application.LotusProvider.process(LotusProvider.java:1091) at oracle.lotus.application.CalendarShowRenderer.renderBody(CalendarShowRenderer.java:64) at oracle.portal.provider.v1.RenderManager.render(RenderManager.java:165) at oracle.portal.provider.v1.http.ServletProviderResponse.showPortlet(ServletProviderResponse.java:524) at oracle.portal.provider.v1.http.HttpProvider.dispatchProviderAction(HttpProvider.java:660) at oracle.portal.provider.v1.http.HttpProvider.service(HttpProvider.java:390) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:424) at org.apache.jserv.JServConnection.run(JServConnection.java:216) at java.lang.Thread.run(Thread.java:479)

  • Online chat, Aug. 12, n the Portlet Specification (JSR 168)

    The Portlet Specification, JSR 168 ( http://jcp.org/en/jsr/detail?id=168 ), establishes a standard API for creating portlets. It's designed to ensure interoperability between portlets and Java-based portal servers or other Web applications that implement the specification. Learn more about the Portlet Specification, and get questions answered in this chat with Portlet Specification co-lead Alejandro Abdelnur, and Sun ONE Portal Server product manager Adam Abramski. The chat is scheduled for Tuesday, August 12, at 11 A.M.-to-noon Pacific Daylight Time (6:00 P.M.-to-7 P.M. GMT).
    To join the chat on August 12, go to http://developer.java.sun.com/developer/community/chat/index.html and click on "Join the current session".

    The transcript of this chat is now available at http://developer.java.sun.com/developer/community/chat/JavaLive/2003/jl0812.html

  • Online Chat, Aug. 12, on the Portlet Specification (JSR 168)

    The Portlet Specification, JSR 168 ( http://jcp.org/en/jsr/detail?id=168 ), establishes a standard API for creating portlets. It's designed to ensure interoperability between portlets and Java-based portal servers or other Web applications that implement the specification. Learn more about the Portlet Specification, and get questions answered in this chat with Portlet Specification co-lead Alejandro Abdelnur, and Sun ONE Portal Server product manager Adam Abramski. The chat is scheduled for Tuesday, August 12, at 11 A.M.-to-noon Pacific Daylight Time (6:00 P.M.-to-7 P.M. GMT).
    To join the chat on August 12, go to http://developer.java.sun.com/developer/community/chat/index.html and click on "Join the current session".

    The transcript for the chat is now available at http://developer.java.sun.com/developer/community/chat/JavaLive/2003/jl0812.html

  • How to view the portlet properties in the streamline mode

    Hi,
    I have configured my portal in the streamline mode. I had a problem on one of the page which has 3 portlets(A,B,C).
    When the user clicks on a link in the portlet A, based upon his selection we should be showing either portlet B/C and A should be hidden.
    I achieved this by forwarding it to the same pageURL and on the pageFlowRefreshAction I used PortletBackingContext and made the setVisible property to false. But for some reason it is not working on the production server(portlet A's refreshAction is not invoked) where the portal is configured in the streamline mode.
    Is there a possibility to view this portlet's refreshAction in the streamlinemode?
    Please help.
    Thanks & Regards
    Prakash

    Hi Deepak,
    Portlet A contains links which invokes one pageFlowAction. The links has some netui:parameters to decide which portlet should be hidden/show. After executing this validations or some business processing in that pageFlow action, i constructed the pageURL using the portlet API as:
    PageBackingContext backingContext = PageBackingContext.getPageBackingContext(this.getRequest());
    PageURL pageUrl = PageURL.createPageURL(this.getRequest(), this.getResponse(), backingContext.getLabel());
    forward = new Forward(new URL(pageUrl.toString()));
    Since we forward it to the same page containing those 3 portlets, the refreshAction of those portlets are invoked. And inthose refresh action methods i disabled the portlets using PortletBackingContext(by taking help of some session attribute).
    The thing is that the refreshActions of the portlet B and C are invoked. But the portlet A's refreshAction is not invoked. And the most annoying fact is that it worked fine in my local PC. But for some reason it's not in LINUX box.

  • How to  put "yahoo addrbook" in "Email-portlet"

    how to put "yahoo addrbook" or "outlook's addrbook " in "Email-portlet" ?

    Have you tried
    http://www.google.com/search?hl=en&q=javascript+clock&btnG=Google+Search?
    Subbu
    Jeffrey Graber wrote:
    Howdy,
    I know how to put the time in a portlet,
    Date and time is: <%=new Date(System.currentTimeMillis())%>
    But how do I get it to change/refresh/redisplay. in the portlet without refreshing the whole browser window?
    Better yet-- does anyone know of a little clock portlet I could use?
    Thanks.
    Jeff

  • Which event is the best one to put JS for HIDING the pages?

    Hello
    I have developed a interactive form, the back end system is SAP and ERP system.
    The form is launching on the browser, am hiding 2 & 3 pages of 4 page adobe form, working fine(if popup do not ooccurs, pls. read further), but in some exceptional scenarios, we are throwing a popup from our SAP, that popup will be take place on the middle of the screen position and above the adobe form (i mean, the adobe form is become dull in color and inactive), so, when user CLICKS the okay button on the popup, ALL OF SUDDEN the hidden 2 & 3 pages are displaying/coming out from hide state!!
    I wrote the JavaScript for conditional hiding the 2 & 3 pages on docReady event of my form level, say, my form name is VISITOR, i mean, its the TOP MOST node, so, i put cursor here and selected it and wrote script in its docReady event.
    Pls. let me know which is the good event to hide for all the user session, is it INITIALIAZATION or formReady or layourrEADY?
    Thank you

    On a Core Duo Mac, none. Lion and newer require at least a Core 2 Duo or Xeon CPU.
    (112052)

Maybe you are looking for

  • Where can I find a guide / How to about how to upgrade using SM?

    Hi, Where can I find a guide / How to about how to upgrade a NetWeaver server using SAP Solution Manager? Thanks.

  • Document Archiving

    Hi, We are planning to store employee docuemnts in sap; Conetent repository is avilable and i Linked business object prel with content repository and created document type; But basis consultant is not willing to give OADD tcode which is used to uploa

  • Overall Results in Queries

    Alright guys - I know this might be a simple question. I am attempting to apply totals to master data in a query - Funds Center & Committment Item. I can do this when the hierarchies for any of this master data is inactive via the 'Suppress Rows' etc

  • For no reason Firefox will no longer start up - no window opens

    I have been using Firefox 4 for several days with no problem. For no reason this am Firefox will not open when I try to start the program. If looks like it is trying to open but no window ever appears. I tried uninstallling and reinstalling 4.0 and t

  • FM to import a hierarchy selection...?

    Gurus, I need to advice the BW team with a FM.I have to write a routine to call a function module that imports a hierarchy selection and uses that selection as a criteria to filter on transactional data from an BW infocube.  That data will then be co