/portal-impl/src/com/liferay/portlet/helloworld/HelloWorldPortlet.java
https://github.com/spreddy/liferay-portal · Java · 53 lines · 25 code · 12 blank · 16 comment · 0 complexity · cdc738f90e5b1779832ade433caed46c MD5 · raw file
- /**
- * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
- package com.liferay.portlet.helloworld;
- import com.liferay.portal.kernel.util.ContentTypes;
- import com.liferay.portal.kernel.util.ReleaseInfo;
- import java.io.IOException;
- import java.io.PrintWriter;
- import javax.portlet.ActionRequest;
- import javax.portlet.ActionResponse;
- import javax.portlet.GenericPortlet;
- import javax.portlet.RenderRequest;
- import javax.portlet.RenderResponse;
- /**
- * @author Brian Wing Shun Chan
- */
- public class HelloWorldPortlet extends GenericPortlet {
- @Override
- public void processAction(
- ActionRequest actionRequest, ActionResponse actionResponse) {
- }
- @Override
- public void doView(
- RenderRequest renderRequest, RenderResponse renderResponse)
- throws IOException {
- renderResponse.setContentType(ContentTypes.TEXT_HTML_UTF8);
- PrintWriter writer = renderResponse.getWriter();
- writer.print("Welcome to " + ReleaseInfo.getReleaseInfo() + ".");
- writer.close();
- }
- }