Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package br.com.seatecnologia.blog.portlet;
- // Imports omitidos. Podem ser copiados daqui: http://pastebin.com/hDzFVT3x
- public class HelloPortlet extends GenericPortlet {
- @Override
- public void doView(RenderRequest renderRequest, RenderResponse renderResponse)
- throws IOException, PortletException {
- String path = "/view.jsp";
- include(path, renderRequest, renderResponse);
- }
- @Override
- public void doEdit(RenderRequest renderRequest, RenderResponse renderResponse)
- throws IOException, PortletException {
- String path = "/edit.jsp";
- include(path, renderRequest, renderResponse);
- }
- public void include(String path, RenderRequest renderRequest, RenderResponse renderResponse)
- throws IOException, PortletException {
- PortletContext context = getPortletContext();
- PortletRequestDispatcher dispatcher = context.getRequestDispatcher(path);
- dispatcher.include(renderRequest, renderResponse);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement