liferay

liferay学习(源码调试问题)

风流意气都作罢 提交于 2019-11-26 15:09:11
环境搭建: liferay-portal-tomcat-6.2-ce-ga4-20150416163831865.zip liferaytomcat服务器 liferay-ide-eclipse-windows-x64-2.2.4-ga5-201507230603.zip liferayIDE开发工具 liferay-portal-sql-6.2-ce-ga4-20150416163831865.zip liferay建库语句 liferay-portal-src-6.2-ce-ga4-20150416163831865.zip liferay源码包 liferay-plugins-sdk-6.2.zip liferay插件 直接使用官网提供的ide进行开发 ,jdk版本为jdk1.7 省略环境搭建过程,(下载以上包直接解压就能搞定) 将源码包导入到开发环境中, 在ant添加built.xml文件,并进行源码的编译和部署工作,编译和部署完成之后启动Tomcat (debug模式)当然启动的时候会遇到一些问题,具体问题如下: 编译源码 问题一、 Please set the environment variable ANT_OPTS to the recommended value of "-Xmx1024m -XX:MaxPermSize=512m". 解决方法 1

respond to http request with json object in portlet

纵然是瞬间 提交于 2019-11-26 11:32:55
问题 I am a beginner in liferay portlet development and I am developing a portlet that receives a http get request, processes some information and than it has to return a json object. My problem is that my portlet sends a whole html page instead of just the json object. This is my code: HttpServletResponse servletResponse = PortalUtil.getHttpServletResponse((renderResponse)); servletResponse.setHeader(\"Content-type\", \"application/json\"); servletResponse.setCharacterEncoding(\"application/json\