This tutorial demonstrates how to get a Portlet to link back to itself within a JSP or even with the HTML code spit out within the doView method of a Portlet. The key is the PortletURL object… The full video CBT tutorial, along with Java code, downloadable source and sample portlets, and the full resolution vid, can be seen here: jpa.thebookonhibernate.com Programming portlets presents the web developer with many new challenges, not the least of which is figuring out how to invoke a particular portlet from an html form. A portlet can be placed on a variety of different web pages at runtime. How can we invoke a web-based resource when we don?t know the web address of the page on which it will appear? Another challenge is making sure that the data submitted through our form goes to our portlet, and our portlet only. We don?t want other portlets on the page using data submitted from our form. Fortunately, the portlet API addresses these very challenges. The Challenge of Linking Back to a Portlet When a user clicks the submit button on a form, there must be an object sitting on the server that is ready to process the user?s request. With typical Servlet/JSP applications, form submissions are forwarded to a servlet, and the name of the servlet is specified as the action of the form; however, we can?t do that with a portlet. This tutorial looks at the PortletURL object (formerly the PortletURI), and how it can be used to link back to a portlet running on the portal server …
Other Related Blogs
- Generating sitemap for JSP / J2ee applications | Free practice test , mock test, driving test, interview questions
- MySQL and JSP Web Applications: Data-Driven Programming Using Tomcat and MySQL | eBook Home Index And Review
- sasInct Portlet – Zone Portlet – Alpha – whats your thoughts? | Blogging about all things SAS
