Try to link to internal jsp pagegs

Hi there.
I try to link from one .jsp to anohter .jsp Page. They're both located the same .par and there in the same directory.
So I'm not able to get them linke successfully by using either a native html <a href=...> or using the <hbj:link...
Here some infos:
<% String strWRoot = componentRequest.getWebResourcePath(); %>
<hbj:link
  id="link1"
  text="BlaBla"
  reference="<%= strWRoot+\"/jsp/myPage.jsp\"%>"
  target="_TOP"
  tooltip="BlaBla"                  
  onClick="LinkClick"
/>
I think problem is getting the right ressource path. So I also tried:
<% String strPubPath = componentRequest.getPublicResourcePath(); %>
But no success.
Bye.

So now we get I little closer. The JSP is an AbstractportalComponent, but no JSPDynPage.
Here's the .java:
package one;
import com.sapportals.portal.prt.component.*;
import com.sapportals.portal.prt.resource.IResource;
o now we get I little closer. The JSP is an AbstractportalComponent, but no JSPDynPage.
Here's the .java:
package one;
import com.sapportals.portal.prt.component.*;
import com.sapportals.portal.prt.resource.IResource;
public class myPageOne extends AbstractPortalComponent
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        IResource jspResource = request.getResource(IResource.JSP, "jsp/myPageOne.jsp");
        response.include(request, jspResource);
Now in myPageOne.jsp I want to link to myPageTwo.jsp which is also a AbstractPortalComponent and the .java looks like:
package two;
import com.sapportals.portal.prt.component.*;
import com.sapportals.portal.prt.resource.IResource;
public class myPageTwo extends AbstractPortalComponent
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        IResource jspResource = request.getResource(IResource.JSP, "jsp/myPageTwo.jsp");
        response.include(request, jspResource);
Now i change the .jave of myPageOne to:
package One;
import com.sapportals.portal.prt.component.*;
import com.sapportals.portal.prt.resource.IResource;
public class myPageOne extends AbstractPortalComponent
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        IResource jspResource = request.getResource(IResource.JSP, "jsp/Intro_v5.jsp");
        response.include(request, jspResource);
    public void linkToPageTwo(IPortalComponentRequest request, IPortalComponentResponse response){
      IResource jspResource = request.getResource(IResource.JSP, "jsp/Intro_v3.jsp");
      request.dispatchRequest(jspResource, response);
...and i changed the JSP to:
    <hbj:link
    id="link1"
    text="BlaBla"
    reference=""
    target="_TOP"
    tooltip="this takes you to: http://www.google.com"
    onClick="linkToPageTwo();"
    />
...without Success.
Perhaps I didn't really understood you..?

Similar Messages

  • I get an error coode 5506 when i try to link to my comp. can you help

    i have been try to link to my computer to down load music and  recive an error message 5506. Can  you help me?

    This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes for Windows forum.
    Regards.

  • When I try to use the internal hard drive as a scratch disk I get this error "unable to set scratch disk- the selected directory is on write protect or non-writable media.  Any ideas on how to fix this.  It only happens in fcp.

    When I try to use the internal hard drive as a scratch disk I get this error "unable to set scratch disk- the selected directory is on write protect or non-writable media.  Any ideas on how to fix this.  It only happens in fcp.

    By internal, I assume you're referring to your systems (boot) drive. Is it, by chance, a partitioned dive?
    Also…although many people successfully use their systems drives as scratch disks, over time you'll have better results using a dedicated drive for your media.
    Good luck.
    Russ

  • HT1338 When I try to link my Macbook to my TV, I cannot find the "Arrangement" button that would lead me to "Mirror Display". Please help!

    When I try to link my Macbook to my TV, I cannot find the "Arrangement" button that would lead me to "Mirror Display". Please help!

    The Arrangement tab only appears in System Preferences Displays pane if a second display is recognized by the system (the OS).  So it seems like your MacBook is not seeing the TV as being connected.
    Describe the video connection between MacBook and TV...  What type of video out port does your MacBook model have?  How is it converted to the type of port used on the TV?

  • Using hyper-links in a jsp pages that are in a Session

    Hi i am trying to include a hyper-links in my jsp pages that are in a Session, however when i use the links to navigate throughout the pages i get a java.lang.NullPointerException. The Session begins after the user has been validated i.e
    String cid= request.getParameter("counsellorID")
    session.setAttribute("counsellorID",cid);
    All the pages included within the session have a session scope=session
    ; and they call the attributes that have been set when the session first begins i.e
    String counsID= (String) (session.getAttribute("counsellorID"));
    Any advice on this problem would be most appreciated!
    Many Thanks
    Stephen

    check if you borwser have cookies enabled

  • Linking two internal orders in the report S_ALR_87013019

    Hi friends,
    Can I link an internal order "A"  to another internal order "B" in the report "S_ALR_87013019".
    it means when I choose the order "A" in "S_ALR_87013019", the report shows the result of the two internal orders (A and B).
    your prompt response will be very apreciated.

    Hi,
    As per my knowledge with out giving the input fields you can't get report.
    You have to A and B both as a input fields, if you want to take the report.
    Regards
    Srinu

  • Link Problem in JSP Dynpage

    Hi Folks,
             My requirement is as follows.
    I have jsp file being integrated with JSPDynpage.on the left hand side of the jsp file I am trying to call one more jsp file on hyperlink.I have all my jsp files under pagelet/webapps/holcim/jsp folder.
             But my problem is when I click the hypelink in the first jsp I am not able to go the second jsp.It says the reqd file is not found.
             I tried with componentRequest.getWebResourcePath() also.Nothing worked?
              The above scenario works perfectly in Tomcat.
               Any clues you will be rewarded for really helpful answers.
    Regards,
    Guru

    Hi Guru,
    In order to access the JSP's via url, you need to create a new component in your portalapp.xml as such:
        <component name="Help">
          <component-config>
            <property name="ComponentType" value="JSPNative"/>
            <property name="JSP" value="pagelet/help.jsp"/>
          </component-config>
    Then in order to create your link in the JSP do the following:
    <% String componentName = componentRequest.getComponentContext().getApplicationName();
       String helpUrl = "/irj/servlet/prt/portal/prtroot/"+componentName+".Help";
    %>
    Hope this helps,
    Marty

  • Links from header.jsp

    Hi,
    I have developed a alert jsp page, which needs to be included in the header.jsp.
    The alert page includes some links, which links to different jsp.
    I have tested the alert jsp , without including in the header jsp and it works
    fine.
    I used relative links inside the jsp and it works fine.
    The name of the jsp is index.jsp & the detailed alert message is in the alert.jsp.
    Both the jsps are under the directory alert.
    When I include the contents of index.jsp inside the header.jsp , the detailed
    alert.jsp does'nt
    show up. I get 404 error message.
    When I give the complete path of the alert.jsp page it shows up.
    The following is the directory structure.
    - web_app
    --alert
    -----alert.jsp
    --resources
    -----jsp
    -------header.jsp
    -------template.jsp
    When I have the link with complete path i.e. /web_app/alert/alert.jsp inside
    the header, it
    displays in the browser.
    Is there a way , where in I can specify the link for detailed alert jsp as a relative
    path and
    not the complete path.
    thanks,
    sathish.

    one way is to keep things all in the same directory.
    another would be to put a page variable in all pages that have their base directory...
    in index.jsp
    <% request.setAttribute("base", "/demo/"); %>
    in memberHome.jsp
    <% request.setAttribute("base", "/demo/member/"); %>
    and in header.jsp
    <a href="<%= request.getAttribute(base") %">index.jsp">
    <a href="<%= request.getAttribute("base") %>member/memberHome.jsp">
    Of course the setAttribute has to happen before the include. Or maybe you could use a jsp:param in the include.</a>

  • Publish Internal JSP Page as Portlet

    9ias 9.0.2.0.1
    Portal 9.0.2.0.3
    I have written some Internal JSP pages that I now want to display as a portlets within a normal portal page. However I am unable to locate a "Publish As Portlet" option in the properties of the JSP pages.
    Does anyone know if this is possible and if so, point me in the right direction?
    Thanks,
    Paul.

    Hiya (and bump, I do realize this post is ancient...).
    It seems to me that one simply cannot publish a jsp-page as a portlet. I have this exact issue as well, pl/sql implementation of what I'm trying to do (utilizing utl_http) is so buggy it will not work, jsp works beautifully with just a few lines of code, but what use is a jsp page when I cannot utilize it?
    What is the point of jsp-pages in Oracle portal?

  • When I try to link to a site I am redirected to App Store. How can I stop this?

    When I try to link to a site on my iPad4 I am redirected to App Store. How can I stop this?

    o poop no respond thats ok i know where to go now

  • Installed my new Airport extreme and try to link it to airport express  but the wifi still very slow

    I installed my new Airport extreme today and try to link it to my airport express to expend my wifi coverage to my second floor  but the wifi si very slow on second florr not better then without express? what can I do??

    Hi Francois
    Any wired connection or WiFi network extension (using your AirPort Express) with your second floor will make your network signal stronger but not necessarly faster.  If your WiFi signal is so poor that internet connection keeps dropping, it will make a speed difference.  Otherwise the only difference you'll notice is that the range of the wireless network has increased.
    You say "wifi is very slow on the second floor".  Do you mean that the internet is slow?  Is it very fast on the first floor?
    Try checking your internet connection speed on a laptop on each floor:
    speedtest.net
    and press "begin test recommended server".
    The download speed should approximate your ISP contracted speed.  Upload speed will be a fraction of this.  Wifi will be slower but unless you have a super-fast internet connection, you probably shouldn't notice it.
    Peter

  • Internal server error when I try to view my portlet jsp page

    Hi,
    I am a newbie on Oracle portal and extremely frustrated. Does this technology actually work?? I followed every single step in portlet developer guide and tried several times Java portlet/Oracle PDK portlet but this thing just doesnt work. Lately I have been getting this error when I get to the file on the http server:
    500 Internal Server Error
    java.lang.NullPointerException
         at htdocs.thirdportlet._ThirdPortletShowPage._jspService(_ThirdPortletShowPage.java:56)
         [SRC:/htdocs/thirdportlet/ThirdPortletShowPage.jsp:15]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Any help would be appreciated.
    Thanks
    SK

    How does one view a portlet? Registring a provider doesnt work as the portal doesn't pick up a deployed portlet. None of the the tutorials worked for me -- i.e., adding a parameter or an event.
    Please please help!
    SK

  • How can I link to a jsp page from another jsp page within websphere portal?

    Afternoon all,
    I have a websphere portlet which displays a jsp page. I want to put a hyperlink on the jsp page which when clicked will open another jsp page.
    Does anyone know how to do this?
    Thanks,
    Alex

    The anchor tag is the correct one for generating clickable links.
    <jsp:forward> is for transferring control at the server end. Its when you decide to change which page you want to show the user. ie check user is logged in. If not then forward them to login page, else display current page.
    I tried that. It does open the jsp page
    but the place and page links in the portal theme get screwed up.Whats mucked up about them? Do they point where they shouldn't?
    You might try using a <base> tag to set where relative links are resolved from.
    Cheers,
    evnafets

  • How to put Download Links on a Jsp Page?

    Hi,
    I am a student and I am working as an intern. This is my question:
    My boss wants me to put some download links(pdf and flash files) on to a jsp page. when a user clicks on the link, all the user info (i.e. name, filename, download time etc) should be stored in a database and then a pop up should appear asking user where you want to download the file.
    I have done most of the part but there is a problem. when a user "left click" on the link then it opens the PDF file in the browser. but if the user "right click and select save target as" then it brings up the box. My boss dont need the user to VIEW the file by left clicking it. I mean on both clicks a pop-up box should appear.
    one more thing to note is that, the PDF are not on the same server. I mean they do not have the same context path.
    Here is what I am doing:
    on the link page:
    sample
    on the other page (which stores information):
    // ... this is downloadfile.jsp
    response.setContentType("application/force-download");               
    String filename = request.getParameter("file");          
    String path = "http://www.domain.com/pdf/" + filename;
    bean.addDownloadDetails(session.getAttribute("email").toString(), filename, request.getRemoteAddr());  // save info in database
    response.sendRedirect(path);
    // ...any ideas or help is appreciated.
    Thanks.

    Straight to the question in the topic title: just use <a> links. But you already found that out. In the future please invent clear topic title covering the actual problem :)
    I have done most of the part but there is a problem. when a user "left click" on the link then it opens the PDF file in the browser. but if the user "right click and select save target as" then it brings up the box. My boss dont need the user to VIEW the file by left clicking it. I mean on both clicks a pop-up box should appear.Change the content disposition to "attachment" instead of "inline".
    one more thing to note is that, the PDF are not on the same server. I mean they do not have the same context path.
    Here is what I am doing:
    // ... this is downloadfile.jsp
    response.setContentType("application/force-download");               
    String filename = request.getParameter("file");          
    String path = "http://www.domain.com/pdf/" + filename;
    bean.addDownloadDetails(session.getAttribute("email").toString(), filename, request.getRemoteAddr());  // save info in database
    response.sendRedirect(path);
    // ...any ideas or help is appreciated.
    Thanks.Better obtain its InputStream by java.net.URLConnection and write it to the OutputStream of the HttpServletResponse. A redirect would create a brand new request, hereby dropping the current request and the response (so setting the content type makes really no sense).
    You can find some pointers in this FileServlet example: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • External Web Server links to internal web server on LAN - how to configure?

    I'm hoping someone can give me a bit of assistance with some routing configurations:
    Currently, I have a Cisco PIX 515E that's handling my VPN and routing/DNS, etc. I'm dumping the PIX (it's overkill for my organization and it's costing too much money for Cisco-certified techs to come in and still not configure it correctly for my needs - long story).
    Furthermore, an external website hosted with our ISP links to a public IP (let's say 192.x.x.1) that points through the current PIX firewall, through a DMZ, and then to a webserver hosted locally behind our firewall.
    I'd like our Xserve to take over for the PIX, providing VPN access, DNS, etc. and to properly route calls from the web to 198.x.x.1 to the correct server behind out network.
    The Xserve has two NIC cards, one on a public IP 192.x.x.2 (for the sake of this discussion) and one with it's internal address of 10.1.0.2 for file sharing, etc.
    The internal web server also has 2 NIC cards, one that listens for the links to 192.x.x.1, and one that listens locally on 10.1.0.80 for LAN application services.
    How do I configure DNS/etc. on the Xserve to properly channel the incoming calls to 192.x.x.1 to properly reach the server they're supposed to reach?
    Any help is appreciated. If more info is needed, I'm happy to provide.
    Thanks in advance!

    I've read your post several times and I'm pretty sure I understand what you're saying, until the line:
    >How do I configure DNS/etc. on the Xserve to properly channel the incoming calls to 192.x.x.1 to properly reach the server they're supposed to reach?
    Assuming that the 192.x.x.1 address is a real-world, public IP address that the web server is using, you want all requests from the outside world to go to this address, correct? but requests from the inside world want to go to the 10.1.0.80 address on that server?
    That part I get - you want split DNS, which is not trivial to setup, but is manageable. The part I don't get is where the firewall comes in - you're removing the pix and replacing it with an XServe, but the web server has a public IP address in the same range as the XServe's public IP address and on that basis no traffic is going to flow through the firewall.
    So I'm not sure if this is a firewall or a DNS question.
    Split DNS will handle the internal vs. external traffic going to the different IP addresses of your server. You can't use Server Admin to do this (it can't handle multiple views of the DNS), but it is possible to do by hand.
    The firewall element stumps me, though - but if the XServe is going to run as the firewall you might just find it easier to put the web server behind the firewall and forget the whole DMZ concept.
    Then again, you could get the PIX operating correctly - it's a viable firewall appliance and I'd be surprised if it couldn't do what you want here.

Maybe you are looking for