Oracle portal HTML template - session, context or user identification

I have an HTML template in a page group. Users come to this through SSO authentication. I have put a link in this HTML template to another page group. Problem is, user loses session in second page group. It always shows a public user in second page group. Please see my code snippet below.
*<body>*
     *<oracle>*
          declare
          v_buf VARCHAR2(4000);
          l_http_language varchar2(30);
          l_logged_on number;
          BEGIN
               l_http_language := portal.wwctx_api.get_http_language;
               IF l_http_language='en-gb'
               THEN
                    mydb.RenderPortletXMLContent('header_EN.xml', 'sspheader.xslt');
               ELSE
                    mydb.RenderPortletXMLContent('header_CY.xml', 'sspheader.xslt');
               END IF;
               l_logged_on := portal.wwctx_api.logged_on;
               HTP.P(l_logged_on);
               IF l_logged_on > 0 THEN
                    mydb.RenderPortletXMLContent('header_EN_withLogout.xml', 'sspheader_withLogout.xslt');
               END IF;
               HTP.P(v_buf);
          END;
     *</oracle>*
*</body>*
xml and xslt files produce HTML code which has a link to second page group. (The link is a plain static link whithout any parameters).
"l_logged_on" variable gives me a value of 1 in first page group after authentication but it returns 0 in the second page group.
If I use "Don't chache" option then it works fine. But I can not use this option because of performance problem.
Many thanks in advance for your kind replies.
Edited by: user2543792 on 14-Jul-2010 02:52
Edited by: user2543792 on 14-Jul-2010 03:06

Hmmm - not a good idea to do user related stuff on page which is set to system level caching. In general, your Portal landing page should not do any customization to aid performance as you can cache content at system level for an X number of minutes, by far the best approach for fast portals.
But you could also use owa_util.get_cgi_env('ORACLE_SSO_USER') :
1. Create a function ssouserid in an application schema
create or replace function ssouserid
return number
is
  l_ssouser varchar2(200) := owa_util.get_cgi_env('ORACLE_SSO_USER');
  i number(1) := 1;
begin
  if l_ssouser = 'PUBLIC'
  then
    i := 0 ; 
  end if ;
  return i;
end ;
/2. Create a HTML page skin with the following code between the oracle tags :
<oracle>
declare
p number(1) := portal.ssouserid;
BEGIN
IF p>0 THEN
HTP.P('Logged on');
ELSE
HTP.P('Not logged on');
END IF;
END;
</oracle>3. Associate your page with the page skin created in step 2. You should now see the message 'Logged on' when you view the page while being logged on.
Hope this helps,
EJ

Similar Messages

  • Replacing default Oracle Portal HTML pages

    How do I modify/replace the default Oracle Portal pages, such as the home page for non-logged-in users, the login page, the customize page, etc.? I'd like the fact that we're using Oracle Portal to be transparent to the users.
    This is probably covered someplace in these forums or the product documentation but I have yet to find it.

    Benjamin,
    Home Page = home page for the PUBLIC user. You can also set the home page for the AUTHENTICATED_USERS group for logged in users.
    Login Page = If you're using 3.0.7, search for "Login" in the online help. Select the topic "Customizing the Single Sign-On (Login) and Change Password pages". You can also use the Login Portlet on any Portal Page.
    Customize Page = Cannot be customized. In 3.0.7, we've removed the Oracle branding from the Wizard-type pages.
    Most of these tips are contained in the Portal FAQ.
    Regards,
    Jerry

  • Oracle Portal Portlet 404 Error for Specific Users

    I have a single portlet in Oracle Portal that is returning the message "Error: The listener returned the following error: 404 Not Found" that is occurring for just 2 out of my 350+ users. I have tried clearing user cache, clearing portlet cache, deleting these two users from portal and recreating their accounts, changing their usernames, rebooting the entire app server and nothing is working. There are other users for which the portlet will return the exact same data that the 2 problem users are requesting without an issue.
    Portal version is 10.1.2.3. Any help that anyone can provide would be greatly appreciated as I am about ready to beat my head against a wall.

    Hi Kirk,
    Please check below MOS ID, your issue will be resolved.
    Error: The Listener Returned The Following Message: 404 Not Found [ID 456421.1]
    Mark if this helps you.
    Regards,
    Kishore

  • How can I send files by FTP with Oracle Portal?

    I want to send some file by FTP.
    How can I send files by FTP with Oracle Portal?
    Any ideas?

    Enrique,
    Are you trying to transfer more content from remote locations to expose as items within a portal page? By itself, the Oracle Portal runs within the context of the database so I'm not sure how FTP at the OS level will help. However, if you're attempting to transfer files from a remote PC to upload within the Portal, here are a couple of suggestions.
    Option 1:
    A. Create a portal page.
    B. Convert a region to Items.
    C. When you're challenged to upload a file from the local OS, ensure you've a drive mapped to your remote location and pick the file to upload into the Oracle9iAS Portal.
    Option 2:
    Alternatively, the Oracle9iAS Portal 9.0.2 supports the WebDAV protocol(Web-based Distributed Authoring and Versioning Protocol) allowing endusers with a WebDAV client to upload content into the Portal seamlessly from their desktop.
    Pls. check out:
    http://portalcenter.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/OTN_CONTENT/MAINPAGE/PUBLISH_CONTMGMT/TECHNOTE_WEBDAV.HTML
    Hope that helps!
    Thanks,
    Sudi Narasimhan
    Oracle9iASPortal Partner Management/Development
    I want to send some file by FTP.
    How can I send files by FTP with Oracle Portal?
    Any ideas?

  • OracleAS Portal Extension for Macromedia Dreamweaver

    Were you ever wondering, how you can integrate Portal pages seamlessly into your Web site ? You can now using our extension for Macromedia Dreamweaver. Simply create or edit OracleAS Portal UI Templates directly from within Dreamweaver. These UI Templates can be used as "skins" for your Portal page. The extension also provides support for the UI Template substitution tags from Dreamweaver's Insert Panel.
    For more information, go to http://portalcenter.oracle.com and click on Integration Solutions.

    Hi,
    I am testing the integration and encountering some problems :
    my portalTemplate.ear was deployed to a standalone OC4J instance (904).
    The portalTemplate.xml contains valid information ( tested with sqlplus ).
    The Dreamweaver extension was correctly installed.
    When I try to login to Portal, i get a "There was an error connecting to Portal. Please check the db connection in portalTemplate.xml" .
    I thought about many potential causes like starting my OC4J instance with -Dhttp.proxyHost and -Dhttp.proxyPort or to provide LDAP users credentials instead of db credentials when login in ... what's wrong ?
    PS : When navigating to http://localhost:8888/portalTemplate/portalTemplate?operation=getName I cannot invoke the operation successfully; I get the same error "Error in making the database connection".

  • Oracle portal and session tracking

    Friend I am working in JDeveloper in my PC and my statements in with setAttribute and getAttribute does work ,but the same statement doesn't work when I use this jsp as my portlet.The error is given below.So portal doesnot support this method's ?
    Method getAttribute(java.lang.String) not found in interface javax.servlet.http.HttpSession.
    OConnect = (Connect)Session.getAttribute("OConnect");
    Method getAttribute(java.lang.String) not found in interface javax.servlet.http.HttpSession.
    OMainMenu = (MainMenu)Session.getAttribute("OMainMenu");
    Method setAttribute(java.lang.String, ccrspackage.Connect) not found in interface javax.servlet.http.HttpSession.
    Session.setAttribute("OConnect",OConnect);
    Method setAttribute(java.lang.String, ccrspackage.MainMenu) not found in interface javax.servlet.http.HttpSession.
    Session.setAttribute("OMainMenu",OMainMenu);
    please help
    Note : below is my jsp code as it is.
    **************my jsp code**************
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@page import = "oracle.portal.provider.v1.*, oracle.portal.provider.v1.http.*, oracle.portal.utils.v1.*, java.sql.*, ccrspackage.*" %>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <TITLE>
    CCRS Application
    </TITLE>
    </HEAD>
    <BODY BGCOLOR = #FFCC00 FONT SIZE = "+2" >
    <FORM NAME="CCRSMenu " action="CCRSMenu.jsp" METHOD="POST" target ="NewWindow">
    <%
    //create session for connection
    HttpSession Session = request.getSession(true);
    //set the connection to the database variable null
    Connect OConnect = null;
    MainMenu OMainMenu = null;
    if (request.getMethod().equals("POST"))
    OConnect = (Connect)Session.getAttribute("OConnect");
    OMainMenu = (MainMenu)Session.getAttribute("OMainMenu");
    //throws the page returned by the method
    String LoadJsp = OMainMenu.ReturnLoadJsp(request);
    response.sendRedirect(LoadJsp);
    else
    OConnect = new Connect();
    OConnect.ConnectDatabase();
    OMainMenu = new MainMenu();
    OMainMenu.InitialSetting();
    Session.setAttribute("OConnect",OConnect);
    Session.setAttribute("OMainMenu",OMainMenu);
    %>

    If Oracle Portal is running on Apache/Jserv, which is the only application server it runs on as far as I know, then that's your problem. JDeveloper uses one of the newer Servlet specificatione, 2.1 or 2.2, where as Jserv is using a very old one. 2.0, which doesn't support the session.setAttribute() method.
    I happen to know a little bit about portal and the JPDK. You do have the option of using the ProviderSession object that is provided by the JPDK PortletRenderRequest.getSession() method. I believe they have a setAttribute() method in there. In fact, if you want this object in the user's session, then you HAVE to use the ProviderSession from the JPDK.
    There are some other configurations you have to set to use this, you must specify to use session in your provider.xml, and you must also set the login frequency on the provider registration page to "Once per user session".
    Check out the discussion boards on http://technet.oracle.com for more info.

  • Unable to set session in Oracle Portal useing reverse proxy

    I have deployed a reverse proxy (using Oracle HTTP Server) in front of a Oracle Portal Install (version 10.1.2.0.2). The steps followed to set this up came from the following documents:
    Steps mentioned in Section 9.2 Configuring a Reverse Proxy for OracleAS Portal and OracleAS Single Sign-On for a reverse proxy on a Oracle HTTP Server.
    http://download-west.oracle.com/docs/cd/B14099_15/core.1012/b13998/variants.htm#ASTED005
    Also performed steps mentioned in -> Section 5.3.7 - Step 7: Enable Session Binding on OracleAS Web Cache of the Oracle® Application Server Portal Configuration Guide 10g Release 2 (10.1.2) -- B14037-03.
    My current (example names shown only)setup details are as follows:
    Reverse Proxy for SSO server (running on internal.oracle.com:7777): proxy.oracle.com:7777
    Reverse Proxy for Portal server (running on internal.oracle.com:7778): proxy.oracle.com:7778
    With the above steps completed, I can successfully use the http://proxy.oracle.com:7777/pls/orasso for login into SSO without any issues.
    Users get authenticated successfully.
    I can also use http://proxy.oracle.com:7778/pls/portal for viewing pages on the portal fine . All self referencing links have also been successfully modified to point to proxy.oracle.com:7778.
    However, an attempt to login in the portal is not successful. Clicking on the 'Login' link successfully redirects to the SSO login page (http://proxy.oracle.com:7777/<login-page>). However, after successful authentication, the success page fails to show up and the user gets shown the initial login portal home page again.
    There are no error messages shown on the screen.But it seems that user session is failing to be initiated/set correctly, as shown by the log file (in $PORTAL_ORACLE_HOME/j2ee/OC4J_Portal/application-deployments/portal/OC4J_Portal_default_island_1/application.log ):
    06/11/21 16:49:31 portal: [module=RepositoryServlet, ecid=83928411196,1] Repository Gateway: LWUser: PUBLIC, Cookie: oracle.uix=0^^GMT+10:00;
    portal=9.0.3+en-au+us+AUSTRALIA+22BC75924EEAD8A2E040007F010019F7+8DAC5E3559C95F5E0090A6F56FFA58192CB0F437CA57A9102A6394F1EB7FAB5DEE3BFA12C65
    91C0C009B6......
    06/11/21 16:49:31 portal: [module=RepositoryServlet, ecid=83928411196,1] ERROR: Repository Gateway error: Database Error: ORA=20001 ORA-20001:
    Unable to obtain session information from the cookie. Please close your browser and reconnect.
    ORA-06512: at "PORTAL.WPG_SESSION", line 149
    ORA-06512: at line 22
    Any help with this will be appreciated.
    Thanks.

    Hi Chris,
    The begin of the expection stack gives you the reason:
    06/11/03 09:13:59 java.sql.SQLException: The method 'setSavepoint' cant be called when a global transaction is active
    The reason is, that either the whole global transaction must be commited or rollbacked.
    I don't know your actual configuration, but between the methods begin() and commit()/rollback() of the UserTransaction instance, OC4J/OracleAS uses a global transaction (= XA transaction) in your configuration. The state of a global transactions is completely under the control of the application server and several restrictions must be considered. One of them is, that you can't use the method setSavePoint/. E.g. you can't also call the method setAutoCommit(true) in this state, or change the transaction isolation level via setTransactionIsolation(newLevel).
    This is NOT a limitation of the OC4J/OracleAS but is true for ALL application servers.
    P.S. I can successfully set savepoints and rollback to savepoints in weblogic 9.0This means, that WebLogic 9.0 doesn't use a global transaction in this case.
    Because I don't know your configurations (Oracle and WebLogic) I can't say, why the behave different in this situation.
    Best,
    Manfred

  • Oracle portal  session and pl/sql

    Hi all i use portal v.10.1.2.2.0 and i would like to play with a session variable. all i do is
    grant execute on wwsto_api_session to myportal from portal schema. and then i want to do
    l_store := portal.wwsto_api_session.load_session (p_domain, p_sub_domain);
    l_store.set_attribute ('myname', 'name');
    l_store.save_session;
    1) i do not know what is the p_domain, p_sub_domain
    2) when i do wwsto_api_session.get_sub_domain and wwsto_api_session.get_domain i get an error.
    How can i read and write to a variable session in oracle portal? to to like java set session and get session?
    Thank you in Advance,
    Antonis

    [email protected] wrote:
    Hi all i use portal v.10.1.2.2.0 and i would like to play with a session variable. all i do is
    grant execute on wwsto_api_session to myportal from portal schema. and then i want to do
    l_store := portal.wwsto_api_session.load_session (p_domain, p_sub_domain);
    l_store.set_attribute ('myname', 'name');
    l_store.save_session;
    1) i do not know what is the p_domain, p_sub_domain
    2) when i do wwsto_api_session.get_sub_domain and wwsto_api_session.get_domain i get an error."Storage is located by the combination of the domain and subdomain parameters, and the Login session ID.
    If a session store object has not previously been created for this combination of domain, sub-domain, and session ID, then an empty session store object is created and returned. "
    How can i read and write to a variable session in oracle portal? to to like java set session and get session?Hi,
    You may want to see the wwsto_api_session here in [Portal APIs|http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1012/index.html].
    "Working with the session object
    The general procedure for working with the session object is:
    1. Load the session object, with an appropriate domain and sub-domain combination, using the load_session method.
    2. Manipulate the content of the object using the set_attribute methods, or just access its content using the get_attribute methods.
    3. Force these changes to be saved, using the save_session method.
    Typically this sequence occurs within the scope of one client routine that extracts and/or sets all of the client states. For example:
    declare
    l_store portal30.wwsto_api_session;
    l_date date;
    begin
    l_store := portal30.wwsto_api_session.load_session ('PORTAL', 'TEST');
    l_store.set_attribute ('LAST_ACCESSED', sysdate);
    l_store.set_attribute ('USERNAME', 'SMITH');
    l_store.set_attribute ('COUNRTY_CODE', 1);
    l_store.set_attribute ('LOCATION', 'US');
    l_store.set_attribute ('LAST_LOGGED_ON', sysdate);
    l_store.set_attribute_as_string
    ('OFFICE_LOCATION', 'CALIFORNIA', 'US', 'STRING');
    l_store.save_session;
    end;
    The login session that creates the session storage object is defined by wwctx_api.get_sessionid. "
    ref: wwsto_api_session for Portal 10.1.2
    then, look for the functions for getting attributes as number, varchar2, string or index, etc. in the above link.
    hope that helps!
    AMN

  • Set User preferences in oracle portal’s database in portal environment

    Hi All,
    I need to set User preferences in oracle portal’s database in portal environment.
    I need to get some oracle PL/SQL API for the said purpose.
    In user preferences I need to save Preference name and preference value.
    Can any one have idea?
    Regards
    Amit Tiwari

    http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/index.html
    and http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/wwpre_api_name.html
    Patrick.

  • How to publish - Circular / News - all oracle portal users

    Dear friend,
    I am new to Oracle Portal,
    want to design two pages
    one contains about news about our organization or any new updates everyday or week those will be updated here
    another one page contains about circular for all our portal users
    anyone help with details, will be appreciated
    Thanks in advance
    Regs...
    selvan
    [email protected]

    Can you do with wikis? http://docs.oracle.com/cd/E21764_01/webcenter.1111/e10149/content_wikis.htm#WCSUG7207
    If not, take a look also here: http://www.oracle.com/technetwork/middleware/ias/index-089317.html or at discussion in this thread: Re: Metadata through user input from portal application while new check In

  • Noob q: How to work with templates like in OracleAS Portal

    Hi gurus
    Coming from the OracleAS Portal world one of the first things I look for are templates. But there doesn't seem to be any?!?! The templates I can find resembles HTML Templates from the Portal world. Can this be true?
    To be very specific: How do I reuse a component from one page to the other? Do I really have to add the component to each page? And what if I have several components - on a number of pages - and want to rearrange them? Do I really have to do that on each page?
    Can anyone shed some over this?
    Thanks in advance
    Claus

    Hi gurus
    Coming from the OracleAS Portal world one of the
    first things I look for are templates. But there
    doesn't seem to be any?!?! The templates I can find
    resembles HTML Templates from the Portal world. Can
    this be true?
    To be very specific: How do I reuse a component from
    one page to the other? Do I really have to add the
    component to each page? And what if I have several
    components - on a number of pages - and want to
    rearrange them? Do I really have to do that on each
    page?
    Can anyone shed some over this?
    Thanks in advance
    ClausClaus,
    I would suggest you look at the manual and example applications before you jump into developing APEX applications..
    For Example, if you need a set of controls and regions for all pages in your application, you can create a page 0, and all the items from it will be inherited by your other application pages..
    Thank you,
    Tony Miller
    UTMB/EHN

  • How to bind Context elements to a HTML template

    Hi,
    I want to display all the context elements in my webDynpro application in a html page, I have html template my requirement is to bind all the context elements to fields in the html template.please provide me the solution.
    thanks,
    kishore.

    Hi Kishor,
    I do not think there is some straight forward solution for this scenario.
    You need to create two applications 1 webdynpro application and one portal application.
    What you can do is Pass the context values from webdynpro application to a flat file and store then in that(every time create a new flat file). Now after successfully creation of flat file call the portal application which reads the flat file and get the context values and set them.
    If you require more info, i can help you.
    Regards
    Narendra

  • Page link error when other user connect to the oracle portal

    Hi,
    I have a problem which I just realized today. I have created a page group, named community, and this page group contains few pages that are created using templates.
    My problem is, when my colleagues logged to the oracle portal using their account, they cannot see the pages that I created, instead, when clicked on the pages within the page group, they only see the page templates (only the skeleton). They should be able to view the actual page that I created using the template, not the template I used to create the page.
    Anybody with this problem can help? or maybe others can help me solve this problem.
    Thanks in advance

    Hi,
    Did you try granting the page to PUBLIC or the users whom you want to show the page to ..
    Thanks,
    Anu

  • Publish a BI Publisher HTML output to the Oracle Portal

    We currently use multiple JSPs to assemble and display employee data in portlets in our Oracle Portal. We're interested in redoing the display of this data using BI Publisher and would still like to send it to a portlet in our Oracle Portal. Essentially we would pass the userid as a parameter to BI Publisher when the employee logs on to the portlet. I was wondering if anyone ever published the HTML formatted output to an Oracle Portal?

    Hi,
    I am facing the same problem. Any updates on this issue.
    Thanks

  • Pl/sql and oracle portal session

    Hi all i use portal      v.10.1.2.2.0 and i would like to play with a session variable. all i do is
    grant execute on wwsto_api_session to myportal from portal schema. and then i want to do
    l_store := portal.wwsto_api_session.load_session (p_domain, p_sub_domain);
    l_store.set_attribute ('myname', 'name');
    l_store.save_session;
    1) i do not know what is the p_domain, p_sub_domain
    2) when i do wwsto_api_session.get_sub_domain and wwsto_api_session.get_domain i get an error.
    How can i read and write to a variable session in oracle portal?
    Thank you in Advance,
    Antonis

    Hi Antonis,
    Perhaps you question is better asked in [Oracle Application Server Portal|http://forums.oracle.com/forums/forum.jspa?forumID=14] forum
    Regards
    Peter

Maybe you are looking for

  • Open a new url in  same  window

    I am displayed a button using web dynpro abap, if i click the button means a new url page should be opened in the same window. I did the application but when i click the button means a new window is opened.It should not be happened. Anyone can plz se

  • Help With Kernel Panic in Mid 2012 13" Macbook Pro

    I have a 13" Mid-2012 Macbook Pro. 2.5 GHz Intel Core i5 / 8GB Memory OS X 10.9.5 Recently I have been getting kernel panics / grey screens of death.  From the Console logs, it appears I have had four kernel panics since September 22. I am not aware

  • Bought a game, what app do i need for it

    i just bought a game for my itouch. i have downloaded it. it is not on my itouch. i think i need a certain application for it to be on my itouch but i am not sure which one.

  • Different offsetting account displayed in FB03 and KSB1

    Hi, We have a problem, the number of offsetting account displayed for documents in FB03 is different than number displayed in KSB1 report. Notes 755291and 806041 are already implemented. regards, Rafal

  • 90b error

    When I turn on my laptop, which is an HP Pavilion 9-7131Uos, it states "system fan (90B) error an instructs me to go to this web page. What is wrong? How can it be fixed?