Announcement Announcement Module
Collapse
No announcement yet.
How to link JSP Pages in a portlet application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to link JSP Pages in a portlet application

    Hello Everyone,

    I am looking for an example how to link JSP pages in a Spring MVC Portlet.
    I have already took a look at some Spring portlet samples at liferay.com and of course the Spring MVC book sample portlet. But I am still missing something. So it would be great if someone could tell me, might on an example, how to simply link two JSP pages.

    Thanks
    Christian
    Last edited by Christian Esocidae; Oct 6th, 2009, 04:40 PM.

  • #2
    Hey,
    this is still an issue. Got no one an example how to link portlet pages?

    Comment


    • #3
      hi

      i think there's no way to link JSP pages. Ive been searching on net for this but it came out to be "not in the search" maybe if someone out there could figure this out, please post some of the steps to likn JSP... thanks

      anne

      stop snoring
      Last edited by dearest_anne; Oct 9th, 2009, 06:13 AM. Reason: forgot something

      Comment


      • #4
        i think there's no way to link JSP pages. Ive been searching on net for this but it came out to be "not in the search" maybe if someone out there could figure this out, please post some of the steps to likn JSP... thanks

        Comment


        • #5
          When you are in a portlet, you have to create links via the Portlet API. You can either use the methods on the RenderReponse object for this directly, or you can use the tags in the JSP taglib that is specifically for portlets. The books sample has plenty of examples of this.

          Comment


          • #6
            thank you for your reply dealing with our beginner issues. We solved this by using annotations.

            Just for some followers having the same question, the source code looks like this.

            the link in View.jsp
            Code:
            <a href="<portlet:renderURL>
                           <portlet:param name="action" value="viewprof"/>
                       </portlet:renderURL>">
                       Professors View
                    </a><br />
            the viewController
            Code:
            @Controller
            @RequestMapping("VIEW")
            public class ViewController {
            
                @RequestMapping(params = "action=viewprof")  // default render
                public String getLectures(Model model) {
            
                    return "viewProf";
                }
            }
            In you applicationContext.xml you need to add
            Code:
            <context:annotation-config/>
            to register your annotations.

            Regards,
            Christian
            Last edited by Christian Esocidae; Oct 24th, 2009, 07:03 AM.

            Comment

            Working...
            X