我是liferay 6.2的新手![在这里输入图像描述] [2]。我在我的eclipse IDE中创建了一个名为EmployeeLiferayMVC的portlet,用ant.Build构建成功。现在我在tomcat中运行应用程序,并以admin身份登录。但是在样本类别下我找不到要添加的porlet。我在liferay-display.xml中有样本的映射。
<display>
<category name="category.sample">
<portlet id="EmployeeLiferayMVC" />
<portlet id="Employee Liferay Mvc"></portlet>
</category>
</display>
我将截图添加到我所做的内容。有人请帮助。谢谢。
Catalina log
Nov 24, 2014 3:05:15 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jdk1.7.0_03/bin/../jre/bin/client;C:/Program Files (x86)/Java/jdk1.7.0_03/bin/../jre/bin;C:/Program Files (x86)/Java/jdk1.7.0_03/bin/../jre/lib/i386;C:\Program Files (x86)\Java\jdk1.7.0_03\bin;c:\app\Jeet\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;F:\eclipse\eclipse;;.
Nov 24, 2014 3:05:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 24, 2014 3:05:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Nov 24, 2014 3:05:15 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 535 ms
Nov 24, 2014 3:05:15 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 24, 2014 3:05:15 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Nov 24, 2014 3:05:15 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat- 7.0.42\conf\Catalina\localhost\ROOT.xml
Nov 24, 2014 3:06:39 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\calendar-portlet
Nov 24, 2014 3:06:44 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\kaleo-web
Nov 24, 2014 3:06:48 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\marketplace-portlet
Nov 24, 2014 3:06:59 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\MyFirstPortlet-portlet
Nov 24, 2014 3:07:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\notifications-portlet
Nov 24, 2014 3:07:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\opensocial-portlet
Nov 24, 2014 3:07:21 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory F:\liferay resource\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\resources-importer-web
答案 0 :(得分:1)
如果部署成功,您应该在tomcat日志中收到一条消息,如: &#34; {您的portlet名称}的1个portlet可供使用&#34;
如果您是liferay的新手,您可能会发现此网站对您的第一个portlet有用: https://dev.liferay.com/develop/learning-paths/-/knowledge_base/6-2/writing-your-first-liferay-application
答案 1 :(得分:0)
我也通过在服务器上运行portlet来解决相同的错误... 右键单击您的portlet-&gt;运行as-&gt;在服务器上运行 您的portlet将被部署。