Opening a New page on click of a link in Struts PDK portlet

Hi All,
Please help me to sort out my issue..
I created a portlet(say P1) using struts Portlet.That portlet is added to a portal page..which has some other portlets already(p2,p3,p4)...So my portal page has 4 portlets p1,p2,p3,p4..In Portlet P1 There is JSP which has a link inside...When i click on the link..I need to open a new JSP page with some prepopulated data inside it..Now the problem is..it is opening a page with data..but in the new page i am seeing all the remaining portlets as well..P1(with new data),P2,P3,P4 portlet..
But i need to see only the JSP page with my new content..please help me with this..
Here is the code...what i have written
INDEX.JSP
<%@ page contentType="text/html; charset=windows-1252"
import="java.io.File, java.io.FilenameFilter"
%>
<%@ taglib uri="/WEB-INF/tlds/struts/pdk-struts-html.tld" prefix="html" %>
<html>
<head>
<title>
Struts Sample Portlet - Hello World...
</title>
<body>
<html:link action="/sayActionHello" target="_blank">My Link</html:link>
</body></html>
ACTION CLASS
public class SayHelloAction extends Action {
     public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
System.out.println("Inside execute ................................");
PortletRenderRequest pReq = (PortletRenderRequest)
     request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
ProviderSession pSession = pReq.getSession();
if(null != pSession){
     System.out.println("Inside---pSession...........................");
     pSession.setAttribute("sample","Sample Data for Testing");
return mapping.findForward("success");
Provider.xml
<?xml version = '1.0' encoding = 'UTF-8'?>
<?providerDefinition version="3.1"?>
<provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
<session>true</session>
<passAllUrlParams>true</passAllUrlParams>
<portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
<id>1</id>
<name>samstruts</name>
<title>samstruts</title>
<description>sample struts Portlet Description</description>
<timeout>40</timeout>
<showEditToPublic>false</showEditToPublic>
<hasAbout>false</hasAbout>
<showEdit>false</showEdit>
<hasHelp>false</hasHelp>
<showEditDefault>false</showEditDefault>
<showDetails>false</showDetails>
<renderer class="oracle.portal.provider.v2.render.RenderManager">
<renderContainer>true</renderContainer>
<renderCustomize>true</renderCustomize>
<autoRedirect>true</autoRedirect>
<contentType>text/html</contentType>
<showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
<defaultAction>/sayHello.do</defaultAction>
</showPage>
</renderer>
</portlet>
</provider>
Strutss-config
PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<action-mappings>
<action path="/sayHello" scope="session" type="com.up.tey.SayHelloAction">
<forward name="success" path="/jsp/index.jsp"/>
</action>
<action path="/sayActionHello" scope="session" type="com.u p.tey.SayHelloAction1" input="/htdocs/jsps/index.jsp">
<forward name="success" path="/jsps/indexsample.jsp"/>
</action>
</action-mappings>
</struts-config>
Indexsample.jsp
<%@ page contentType="text/html; charset=windows-1252"
import="java.io.File, java.io.FilenameFilter"
%>
<%@ taglib uri="/WEB-INF/tlds/struts/pdk-struts-html.tld" prefix="html" %>
<html>
<head>
<title>
Struts Sample Portlet - Hello World...
</title>
<body>
<h1>HELLO WORLD Sample using Struts !!!!!!<%=session.getAttribute("sample")%></h1>
</body></html>
In new window i am cing Indexsample.jsp inside my P1 portlet..But the remaining 3 portlets(p2,p3,p4) are also there..Which i dont want..Please Help..this is really very urgent for me..

HI
i am also facing same problem with session but in simple portlet with ajax implementation.
i am setting session in portlet jsp with following code using oracle application server portal 10g.
(here portlet jsp means which is included from portlet.)
session.setAttribute("map",map);(here session is implicit object )
i want to call ajax jsp from portlet jsp with below code.(i.e setting session in portlet jsp and accessing in ajax jsp)
var url = "<%=renderRequest.getContextPath()%>/AjaxProcessRequest.jsp?q=" + random;
var pars = '&namespace=<portlet:namespace/>' +'&imagesPath=' + '<%=imagesPath%>';
var myAjax = new Ajax.Updater(
{success: 'emailbody'},
url,
method: 'get',
parameters: pars,
onFailure: reportError,
evalScripts: true
i am accessing map object from session in my AjaxProcessRequest.jsp as shown in below code.
Map map=(Map)session.getAttribute("map"); (here session is implicit object )
here map object is getting null from session.
Please help on this if u know about this session.
Regards
Raju

Similar Messages

  • Opening a new page on click of a button

    Hello Everybody,
    I have a small requirement. i need to open a new web page on click of a buttton on a bsp application. How do I achieve this technically?
    Thanks,
    Paul

    Hi!
    By impelemntign a litte javascript with window.open(...) that is called when button is clicked (onClientClick).
    Does that solve your issue?
    Regards,
    Volker

  • Is there some way to keep Safari from opening a new tab when clicking on a link?

    When one clicks on a link on a page in Safari a new tab is opened. This is fine if the link is to a different site. However, it is annoying when navigating through the pages of a single site such as is required, for example, in on-line banking. Firefox seems to be smarter in this regard, opening a tew tab in the former case but not in the latter. Is there some way to keep Safari from opening a new tab each time?

    Safari Preferences > Tabs (in Safari 7)
    There is an option there for specifying how new pages open

  • Opening a new window when clicking on object links

    Hi,
      I have installed business package for crm and configured the object links, but when i click on object links, it is opening a new window, but i want it to be opened in the same window form which that link was activated.
    could you please help me in this regard
    Thank you

    Hello Koduru,
    you should have a look at the work protect modus settings of the user.
    Regards
    Gregor

  • Open a new window by clicking on a link using Personalization

    We have a requirement in personalization mode.
    i want to create one link,called "Customer Credit Information" when user clicks on that link it should open in another window.
    if anybody knows how to do it using personalizaion,can you throw me some points?

    set the destination URI and targetFrame property to _blank which will make the new window popup automatically                                                                                                                                                                                                                           

  • How to open a new page from a Spry Table click, with element info?

    Hello, Spry experts!
    This is probably simple, but I've searched for hours and can't find what I need. I'm using Dreamweaver CS4 and Spry 1.6.1 to create a simple Spry Table from an XML data set using PHP as my back end.  I've used Dreamweaver's Insert->Spry->Spry Data Set to create everything, and the table is working fine.  Colors, clicks, sorts, etc., are all working correctly as expected.
    What I want is to be able to add a behavior such that when a table row is clicked, I can open a new page.  Moreover, I want to pass a parameter from the table to the new page, like http://www.mydomain.com/newpage.php?aid=12345 or whatever.
    So, for example, my table has two columns, "a_id" and "a_name", and my repeat region looks like this:
    <div spry:region="xml_assignments">
    <table width="500">
    <tr>
    <th spry:sort="a_id" class="spry_header">ID</th>
    <th spry:sort="a_name" class="spry_header">Assignment</th>
    </tr>
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    <td>{a_id}</td>
    <td>{a_name}</td>
    </tr>
    </table>
    </div>
    What I want is to be able to open an entirely new URL, passing the value of the {a_id} in the selected row as a parameter to the new URL, as in something like:  http://www.mydomain.com/newpage.php?aid={a_id}
    So my questions are: 
    1. How best to apply the action to the table?  Add an onclick to the tr tag?  Something else?
    2. How to extract the {a_id} value from the current row and pass it as a parameter to the action?
    Or maybe just take another approach entirely?
    I know that I can make the actual text in the table cells hyperlinks, and use them to link to the new page, which is fine.  The desire here is just to make it so that the user can click "anywhere" on the table row (as they can currently do with the spry:select behavior) and have the link kick off, whether they actually click on the linked text or somewhere in the row where there is no text.
    I'm sure this is obvious and simple, but I'm new to this level of Spry detail, and my brain is fried from hunting.  Any guidance will be gratefully appreciated!
    Glen Barney

    I found the answer myself, after posting this, of course!
    I changed:
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    to
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select" onclick="window.location.href='./newpage.php?aid={a_id}';">
    Basically just added the onclick parameter...
    And it all just worked!

  • All of a sudden I can no longer open tabs by clicking "+" or right clicking on the tool bar. To open a new page, I have to open a whole newFirefox window. How can I fix this?

    All of a sudden I can no longer open tabs by clicking "+" or right clicking on the tool bar. To open a new page, I have to open a whole new Firefox window. How can I fix this?
    Also, Firefox crashes frequently. Is there a fix for this also?

    Uninstall the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and Firefox 3.6 that prevents new tabs from being opened.
    There are a couple of places to check for the Ask toolbar:
    * Check the Windows Control panel for the Ask Toolbar - http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    * Also check your list of extensions, you may be able to uninstall it from there - https://support.mozilla.com/kb/Uninstalling+add-ons
    For the second issue, the [[Firefox crashes]] support article may help.

  • Clicking on a link to open a new page or tab gives me a blank page.

    If I click on a link to open a new page or a new tab, the page that opens is always blank and no address is in the address bar. Also, occasionally, my refresh button is "grayed" out so I can't hit that either. I think this is some sort of security setting blocking it. Can anyone help.

    Thanks Jason, I had the same problem and did exactly the steps above. Problem solved! You rock! :)

  • When I click a link to open the page in new tab, it open the new page beside my page.

    After I update FireFox to version 3.6.8, I could not open the new page in the last tab, it always opens the new page in beside the tab.
    Mmm…I could not make sure the new page or new tab I said is the same with you…?? (I use Chinese version so that I don’t know if it’s the same or not…)
    A window could open several pages with different tabs, and I could click different tab to different page, right?
    If I right clicked a link to open the page to “new tab” in the same window, the new tab opened in the last tab of my window.
    But after I update FireFox to version 3.6.8 and I click a link to open the page to “new tab” in the same windoe, the new tab will open beside my page. (Mmm…Open on right of my page.)
    I would like the “new tab” open to the last tab in my window, not “beside” the tab I used. How could I change the setting??)
    == This happened ==
    Every time Firefox opened
    == After I update FireFox to 3.6.8

    That feature isn't new to 3.6.8, it was changed in 3.6.
    Type '''about:config''' in the URL bar and hit Enter.
    ''If you see the warning, you can confirm that you want to access that page.''
    Filter = '''browser.tabs.insertRelatedAfterCurrent'''
    Double-click that preference to change the value to '''''false'''''

  • Does anyone know if there is a way to arrange songs on a playlist that has 100 songs? I used to be alble to double click and open a new page but that is no longer an option. Because you cant get a total view of the playlist it is almost impossible

    I used to be alble to double click and open a new page but that is no longer an option. Because you cant get a total view of the playlist it is almost impossible.. if a song is in position 95 and I want to put it at 3 I have to hold it and drag it till the curor moves.. This makes creating an order almnost impossible because you cn only see half of the songs

    1.SmartyPanouZe3rd,
    Sep 4, 2013 1:03 PM   in reply to SmartyPanouZe3rd
    This is a follow-up to the above question I had.
    Since i noticed people looking at the question, but no replies showing up, i contacted BC support directly with the same question.
    I got a reply.
    I did tests based on the reply.
    Here is what is going on based on the reply.
    (spoiler alert : It works... but it's not yet a perfect score.)
    All the details are posted here :
    http://www.animavdo.com/mut/ambiguity-001.html
    Hope this can help others.
    Cheers.
    PS  I still will use DW for the heavy lifting...
           But MUSE is nice for quickly putting together a mini website.
           Highly recommended App.

  • Why does Fiefox require me to click allow when opening a new page?

    When I try to open a new page, Firefox requires that I click the "allow" button below the toolbar in order to proceed. This is new (within the last few weeks).

    This?
    See: [http://kb.mozillazine.org/Menu_differences Firefox > Preferences] > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    * [[Options window - Advanced panel#General_tab]]
    See also: http://kb.mozillazine.org/accessibility.blockautorefresh

  • Menu bar button hyperlink to open a new page?

    I want to know if there is a way to add a hyperlink to a Menu bar button to open a new page showing a pdf file?

    To open url on button click, you can use the following example, that I used in one of my cases...
    Z P/L analysis
        ls_button-text     = 'P/L analysis monitor'.
        ls_button-tooltip = 'P/L analysis monitor'.
        lv_string1 = 'javascript:window.open( "'.
        lv_string2 = '" );'.
        CONCATENATE lv_string1
        lv_url2
        lv_object_id
        lv_string2
        INTO lv_string3.
        ls_button-on_client_click = lv_string3.
        ls_button-page_id  = me->component_id.
        ls_button-enabled  = abap_true.
        APPEND ls_button TO rt_buttons.
        CLEAR ls_button.
    Comments:
    - lv_string3 represents the URL
    - lv_url2 contains the url of bsp component, which you can build manualy or read from any table with select single statement
    - lv_object_id represents the id of opportunity which you can read from BOL or with one of crm_order_read function modules
    Regards.

  • Open a new page  in new window programatically.

    Hi all,
    I am able to open the new page in new window by setup (setting up the distination URI and and target fram as balnk), my requirememet is to do it programatically, from CO i have to call the new page on some conditions, how can i achive this?

    Hi
    You can open a new page in new window programmatilcally like this :
    for this we have created a Static Styled Text Bean of Id item1
    import oracle.apps.fnd.framework.webui.beans.* ;
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAStaticStyledTextBean ost = (OAStaticStyledTextBean)webBean.findChildRecursive("item1") ;
    ost.setLabel("Click here for my website");
    ost.setDestination("http:\\XX.com");
    } Ajay
    Edited by: Ajay3107 on Jul 19, 2010 9:53 PM

  • Open a new page from a button of table view

    Hello,
    I search how to open a new page when i click on a button of a table view. I already tried to use navigate connector but i have an error when I compiled it (flash doesn't support). Do you know a workaround or tips ?
    Thanks,

    Hi Aurelien,
    Why don't you try creating a pop up iView on clicking the button on your table view.
    You can have a look at this link for understanding how a pop up iView works:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a88c4b3c-0a01-0010-afa4-a6eeb859d8d2
    You can also see page 50 of this doc:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-0010-b9a2-e1f7457a7fbe
    Bye
    Ankur
    Do reward points if it helps!!

  • Unable to open a new page  with transparent background.

    I must have hit something (or maybe several things), because suddenly I can't open a new page in Photoshop (CS2). I can see it's picking up  the white background color (from the lower left corner of the tool menu), but I can't figure out how to change it. Also  noticed that  my camera is suddenly automatically savings  pix  as jpgs (instead of tiffs) which I think I read somewhere prevents removing the white background color . . . but even if I start by trying to create an empty transparent background and  pasting my graphic into it (which is what I usually do), it still loads as a white one.
    After fighting with the software for the past 2 hours, maybe I'm just too confused to see the obvious. I  do know how to get a transparent background  when all is running smoothly. (Have been doing it for years, without running into problems.) It's figurng out what the problem is tonight that has  me running in circles. The answer probably is staring me in the face, but  if it is, I can't see it. I need  help . . . PLEASE!

    Yes. When I select  all and edit/clear  the screen stays white.
    Unfortuantely, it alsois not allowing me to grab a screen shot. I've tried both keystrokes and "Grab" (in  Application Utilities.)
    But the  image in the layers panel is easy to describe.
    1) When I open a new  PS document and click on transparent, the icon is a small rectangle with a double line border that has a white space midway on each side.
    Whether it is active or hidden, the  box next to it just says "layer 1" (i.e., not background.
    In this mode, the Transparency & Gamut settings  show the following:
    Grid Size    Medium
    Grid Colors  Light
    Below that are 2 empty boxes
    In the bottom section, Gamut Warning shows a darkened out  Square. A both ends of the Opacity bar (1% and 100%) it remains unchanged.
    When I add an image, it does not add a layer. The icon just changes to a thumbnail of the image.
    If I don't change them, the  Transparency  & Gamut  pane remains unchanged.
      point, I'm running out of time, so would switch to  that other Adobe  Application  (with fewer options and tools, which came on the same disk as another Adobe  graphic program ), but can't search for  it on my computer because I don't remember it's name.  But since it's not in the application folder, if it was not compatible with  System 10, I may have removed it. By any chance do you know which  application I'm referring to?

Maybe you are looking for