Linking to other pages with JSP

Hi guys,
I'm just getting my feet wet with creating Java portlets, so sorry if this question has been answered many times before and seems ridiculously simple.
Say I have two pages in portal. Page A has JSP portlet 1. Page B has portlet 2, also JSP.
What I want to do is create a link in portlet 1 on page A, clicking on which will navigate the browser to page B and pass a parameter (through the querystring?) to portlet 2.
How do I go about doing this? If anyone has an answer, or a place i can find documentation about this, I would be thrilled.
TIA

Hi,
The JPDK parameters & events sample does exactly the same thing. Register the event provider & add these portlets to your page. The provider.xml for event provider is located at %OC4J_PORTAL%/j2ee/home/applications/jpdk/jpdk/WEB-INF/providers/event
Also go through the eventform.jsp & publicparam.jsp in the WEB-INF/htdocs/ folder. However, before starting with this, if you are not too familiar with the "Parameters and Events" concept, you should start from the document overview.parameters.events.html at %PDK_EXTRACT%/pdk/articles
Hope this helps,
Abhinav

Similar Messages

  • JSP links to other pages

    Hi,
    I have a web app that does not use a framework. I do try to follow the MVC pattern though by having all requests go through one Controller Servlet.
    I have a Home page jsp, which only has links to other pages. The Home JSP does not have a <form>. Just <a href's.
    These links take the user from the home page to other pages which do work and submit forms. However, some of these pages (jsp's) need to be prepopulated with data. For example, I have a page which gives a random phrase from the Database when clicking on the submit button. But when I first get to the page by following the link from Home Page, it is empty. I want to arrive at the page and have it already gotten the first phrase for me.
    One option I thought of is to have the link from the Home Page which took me to the Random Phrase page, go through the Controller servlet initially and have the Controller servlet, after having done the work of retrieving the phrase redirect to the Random Phrase page.
    If this is the correct approach, how can I accomplish this? How do I have a <a href link in a jsp, redirect to a servlet right away without submitting a form or something?
    Thanks.

    So I put this in my home.jsp:
    <a href="/Household/randomPhrase.php">Random Phrase of The Day</a> In web.xml I have this:
    <servlet>
           <servlet-name>VHController</servlet-name>
      </servlet>
      <servlet-mapping>
           <servlet-name>VHController</servlet-name>
           <url-pattern>*.php</url-pattern>
      </servlet-mapping>According to the above, when I click on this link it should take me to the Servlet's doGet() method.
    However, when I actually click on it, I get the following exception in the browser:
    java.lang.NullPointerException
         com.myapp.servlet.VHController.doPost(VHController.java:47)
         com.myapp.servlet.VHController.doGet(VHController.java:35)All I do in the doGet() method is:
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("URL: " + request.getRequestURL());
              out.println("URL: " + request.getRequestURL());
              out.println("METHOD: " + request.getMethod());Could anyone suggest what the problem may be? Why I am not getting the expected behavior?
    Thanks.

  • How can I create links to other pages in iBooks that will function in PDF?

    Hi,
    I know some people have asked previously how to create links to other pages of their book within iBooks. I having an issue with this myself that I haven't been able to resolve. I am able to create the links, and they seem to function within the program, however, once I export the document as a PDF file (the format in which I need to have this ebook!), the links seem to be non-functional. Does anybody have a fix for this?
    Thank you so much for any suggestions you may have!! I really need to figure this out for my client.
    Regards,
    Meggyn

    Exporting as a PDF does alter/lose/remove certain functions. Adobe Acrobat has its own page navigation system.
    A lot of the hidden engine of iBooks Author is basically very similar to building a website! so links and books marks are an "internal" function.
    IF you  have Acrobat and not just the Adobe Reader, you can make links.  I have never needed to try, but  I see a working link related index  in the many software manuals  I have.

  • Click on a textbox, display alert and link to other page.

    hi, here i wanna do is when i click on a textbox, onFocus on it, then call a function to perform checking, and then if the textbox data have breakdown record then display an alert to the user and link to breakdown page.
    [Display out in a table]
    <%for(int c=0; c<progPect.size(); c++){%>
    <td id=progPect><input type="text" size=5 id="progPect" value='<%=progPect.elementAt(c)%>' onFocus="chkBreakdown(pass in 3 parameter);"></td>
    <td id=progQty><input type="text" size=5 id="progQty" value='<%=progQty.elementAt(c)%>' onFocus="chkBreakdown(pass in 3 parameter);></td>
    <td id=progLump><input type="text" size=5 id="progLump" value='<%=progLump.elementAt(c)%>' onFocus="chkBreakdown(pass in 3 parameter);></td>
    after calling the chkBreakdown function and found out that it has record, then pop up an alert that tell the user this record have breakdown, and then link to the other page with the same window.
    so the problem is how to identify user click on which row in the table.

    Vuze installs ask.com's tool bar also. Check for a Vuze plug in. Thanks for the fix.

  • Create links to other Pages documents

    I am a singer and have been using a binder with all my lyrics in it for shows. I got an iPad for my birthday and want to use it in the binder's place. With each show the set list changes and I'd like to be able to create a setlist document in Pages with links to other Pages documents with the corresponding lyrics. The lyrics documents would be static; the setlist document would always be changing. The links in the setlist document would be like hyperlinks of sorts, except instead of taking you to the web, they would take you to other Pages documents in the My Documents folder in Pages.
    I've searched all over the place for a solution. I've even tried using spotlight to search for the lyrics documents as a workaround, but spotlight doesn't find the Pages documents. Is this something I can set up on my MacBook and then transfer to my iPad? Is there other software besides Pages that can do this?
    Thank you in advance!

    I think it would be much simpler to save your lyrics as pdfs and use one of the many dedicated music apps that allow you to create setlists. I use forScore (love it!), but you might also check out Unreal Book and Music Reader.
    If you have a Mac, of course it's a cinch to print any file to PDF. For windows, possibly the free version of CutePDF would work for you.
    EDIT I see you already have these printed out in binders. Just scan to PDF, then.

  • How can I create a Login-page with jsp???

    Hello,
    I have to create a page with JSP code on the Netweaver Developer Studio.
    But I do not know how I do it.
    Can anyone tell me what to write in the portalapp.xml?
    An example would be very helpful.
    Thank you
    Greetings

    As you can see in the example:
    The portalapp.xml file (deployment descriptor) provides configuration information for your application, and defines the components and services in your application. For each component and service, you specify the implementing Java class and configuration information.
    For more information on the format of the portalapp.xml, see Deployment Descriptor (portalapp.xml).
    <application>
        <application-config>
            <property name="SharingReference" value="com.sap.portal.navigation.service, com.sap.portal.navigation.api_mimeservice, com.sap.portal.navigation.helperservice"/>
            <property name="Vendor" value="MY_COMPANY"/>
            <property name="SecurityArea" value="PERMISSION"/>
        </application-config>
        <components>
            <component name="SimpleNavigationExample">
                <component-config>
                    <property name="ClassName" value="MY_CLASS"/>
                    <property name="SecurityZone" value="no_safety"/>
                </component-config>
                <component-profile/>
            </component>
        </components>
        <services/>
    </application>
    You can only update in this example, your class name and other details:
    <property name="Vendor" value="sap.com"/>
    <property name="SecurityArea" value="MyCompany"/>
    <property name="ClassName" value="LOGINCLASS"/>
    <property name="SecurityZone" value="no_safety"/>
    Modify this portalapp.xml file as follows:
           1.      NAVIGATION SERVICE, so you must add references to the following portal applications that define these services:
            com.sap.portal.navigation.service
            com.sap.portal.navigation.api_mimeservice
            com.sap.portal.navigation.helperservice
           2.      In the <application-config> section, create the following properties that help to define the security zone for all components and services in this application:
    ○     Vendor: String identifying the company or organization that provided the application, for example, sap.com.
    ○     SecurityArea: String identifying the security area for the application, for example, NetWeaver.portal.
           3.      In the <component-config> section for the mySiteMap component, create the property SecurityZone to define the specific security zone for the component.
    For Permission, check this document:
    http://help.sap.com/saphelp_nw04s/helpdata/en/44/489e2df5ee4e35e10000000a1553f6/frameset.htm

  • Build a blank/other type of page which can show links to other pages

    Can someone please tell me how to build a blank/other type of page which can show links to other pages? I mainly want a page to show 3 links, once someone clicks on it, then it will go to a specified page. I tried using URL, but that did not work. Any advice is greatly appreciated. Thank you very much for your help in advance.
    -Grace

    Do a region (probably a HTML-based one is fine), enter in the HTML for your links, and that should be it. What didn't work about this?
    Your links probably should appear like this in your coding (use substitution variables):
    f?p=&APP_ID.:3:&APP_SESSION.
    In the above example, "&APP_ID." will resolve dynamically to the application ID that you are in, "3" is page 3 (change this to whatever page you want the link to be), and "&APP_SESSION." is the existing session number (if you don't include this, the user will receive a new session ID if the destination page is public or will be intercepted annoyingly to log in and get a new session ID which you probably don't want).
    Do not include the full http path. Just start with f?p... and everything is assumed to be relative to Apex on the current environment.
    Those are effectively the minimum requirements for a URL in Apex to go from one page to another in an app. You can add to that the additional URL parameters for Request value, Set items with values, clear cache, reset pagination, etc. if you need to. Check the Apex online help under "understanding URL syntax" for details on these.

  • How to create links to other pages i create??

    I have finished my "homepage" and it has 5 buttons on it.("home",
    "Contact us", etc.).
    I have no idea how to create links to other pages i create.
    For example, if the user clicks on "Contact us", i wnat contact information
    to appear. So, do i create another html document that will contain contact
    information and then call that page whenever the user clicks "Contact us". Or
    do i just create another applet that contains contact information and display
    the applet in the appropriate area, whenever the user clicks "contact us".
    Hope that wasnt confusing. Bascially, I am sitting here looking at my buttons, not knowing
    what code to put under the actionPerfomed part of each button.
    thanx
    trin

    ... judging from your question... the best way i think is to create another page...
    .... so when ur user clicks on Contact Us..... he/she will be taken to another page...
    there are other techniques besides this.... but it is always better to stick with the easiest one
    ... so you need to create separate pages for all of your links....
    ... if you have any questions... let me know
    .... have fun

  • Linking to a page with a URL hyperlink

    Is it possible to create a hyperlink that links to another page in the same document using the "Link To: URL" option in the New Hyperlink window?
    Normally I'd just use the "Link to: Page" option but I want to upload a bunch of documents to Issuu and the only interactive object that seems to survive the conversion process is a URL hyperlink. I've also tried creating a button with a "Go To Destination" action attached but it isn't recognised by Issuu either.
    I can add buttons in Issuu after I've uploaded the documents but I was hoping there would be a way to do it in InDesign that works for both normal PDFs and uploaded Issuu files.
    I hope this makes sense. Let me know if it needs clarification.
    InDesign version: CS6 - 8.0.1
    OS: Win 7 SP1

    Issuu is an online digital publishing platform. Here's an example (not mine!). You upload PDF files to the Issuu website and they are converted to a proprietary format for viewing.
    The problem I'm having is that these converted files support URL hyperlinks but not any other kind of interactivity. I was hoping I would be able to use URL hyperlinks to other pages within the document if this was even possible.
    I'm trying to get some assistance from the Issuu help staff but I'm not really getting anywhere. Hence the post!

  • Linking to other pages is not working

    I have a slice that I want to link to another page. I selected the slice and in the drop down that displays in the property inspector for the Link field, I select the page I want it to go to. However, when I test the page, it does not work, and in Safari, I get this message:
    No file exists at the address “/Users/MediaFred/Library/Application Support/Adobe/Fireworks CS5/FWTemp/4193627/page2.htm”.
    What is wrong with this?

    Did you try previewing all the pages in browsers?
    Click on File>Preview in Browser>Preview all pages in your_browser_name.exe.

  • Redirect a page with JSP

    Hi there,
    How do you redirect a page using JSP. For example I create a login screen and once a user click on the login button it goes to validate page and validate the userID and password. If the userID and password is correct I want to redirect to the application else redirect to a Fail login screen.
    Thanks in advance with any help.
    Nite()
    null

    Hi Slag,
    Thanks for your help, it work. Now another problem is I am trying to write a code that validate the password and it didn't check the request.getParameter. Here are the following code:
    <% if (request.getParameter("password") == null) { %>
    <jsp:forward page="LoginFailed.jsp" />
    <% } else { %>
    <%@ include file="untitled1.jsp" %>
    <%
    %>
    If I run the response page(current page) it work, it actually see it null and populate the LoginFailed.jsp page, but when I run the login page and it didn't check against the statement.
    Thanks in advance,
    Nite()
    null

  • Does pages 6.0 support internal links to other pages?

    I want to create links inside of Pages 6 to take the reader to other locations in the document. I need to have these fully functional links exported with the document into pdf. Has anyone actually tried this in 6.0? Des it work?

    Keynote is a version number ahead of Pages, because it was the first iWork app that came out. Numbers was the last and is one version behind.
    Pages '09 has Bookmarks that do the internal linking.
    It is Pages 5.2.2, the current version, that is brain dead.
    Peter

  • Selectable items within an image that has links to other pages

    Hello All,
    I have recently started to learn Dreamweaver CS5 and need some help.  I have a jpeg of a floor plan and want the user to be able to click on the different rooms within the floor plan.  Once you click on the room it would take the user to another page with more details about that room.  For example, I have a floor plan and want to learn more about the Family Room. I would click on the room that says Family Room and it would take me to another page with details about the Family Room.  Any help would be appreciated.
    Thanks,
    Knowledge Seeker2

    I have recently started to learn Dreamweaver CS5 and need some help.
    The best approach would be to put DW away, and focus on learning HTML and CSS.  That will make picking up DW again ever so much easier.
    I would click on the room that says Family Room and it would take me to another page with details about the Family Room.  Any help would be appreciated.
    Use the hotspot tool to apply hotspots to the image.  Link each hotspot to the associated pages by selecting the hotspot and applying the link with the "Link" field of the Property inspector.

  • Building HTML page with JSP from different applications

              Hi,
              we need to build a HTML page with 2 JSPs. If both JSP were in the same Application
              (Weblogic 8,1) there is no problem. But I have to use JSPs from differents web
              applications, each JSP is in different war files.
              How can I compose this page? How can I management the request object?
              thanks
              

    Your program print the whole jsp source code??
    This is your web server configuration problem.
    Your web server handle your jsp page like text file only.

  • Menus created using manual won't link to other Pages

    Created a site and had a menu created using manual which was linked to sub pages within the site. The menu was for specific pages not requiring access from the sites top level menu.
    The menu was working but now it is not possible to edit or replace the menu as there does not seem to be any way of adding the link to the required page. The dropdown box to the side of hyperlink stays greyed out and can't be accessed. This is only happening to links added using the menu widget under manual, ordinary text links seem to be OK.

    Welcome to the Apple Discussions. Confirm that there are no objects overlaying the navbar. How did you change the background, from the Inspector/Page/Layout pane?
    Happy New Year

Maybe you are looking for

  • Report S_ALR_87013558

    Dear Experts, The user needs to show in the report S_ALR_87013558  the column of the last fiscal year (2009), but it seems that the possible chooses are only for 2010 -2011-2012-2013 and previous exercises (the sum of all previous exercises). Is ther

  • How can i share photos on the same mac but different users?

    how can i share photos on the same mac but different users? we have different iphoto acounts and just want to be able to look under users in the finder and view another users iphoto.

  • Print with  write statements from webynpro does not trigger top-of-page

    Print launched from webdynpro application via application server created with write statements does not trigger top-of-page event. When print is done from sapgui it works ok. The idea is to reuse backend print which was created for sapgui with abap l

  • Tip for creating auto-updating Smart Playlists for iPod

    Short Answer: Don't use Smart Playlists that use rules with nested playlists which aren't completely on iPod. Long Answer: If you're like me and use nested Smart Playlists, make sure that any Smart Playlist you want to have auto-update on the iPod do

  • Windows left on dual monitor after disconnect

    (I'm sure this is easy so I apologize in advance for being clueless I have a 15" powerbook AL. When I disconnect my dual display, I often have windows that get stuck on the "other" display. For example, Google Earth seems to think it should display o