Struts2与Liferay 6.1的集成
我正在尝试将Struts2与Liferay 6.1集成 我已经完成了以下步骤 1.内部portlet.xml文件Struts2与Liferay 6.1的集成,struts2,liferay-6,Struts2,Liferay 6,我正在尝试将Struts2与Liferay 6.1集成 我已经完成了以下步骤 1.内部portlet.xml文件 <portlet> <portlet-name>LiferayStruts</portlet-name> <display-name>LiferayStruts</display-name> <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Di
<portlet>
<portlet-name>LiferayStruts</portlet-name>
<display-name>LiferayStruts</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
============
首先,它显示view.jsp,如下所示
但是当我单击submit时,操作没有启动(HelloWorldAction中的execute()没有被调用)
请告诉我问题出在哪里???扫描结果:发现1个威胁:
Worm.Win32.Scriptlet
无法跟踪您??这意味着什么??请详细说明??从代码中删除scriptlet
。使用isnteadOGNL
/EL
/JSTL
/Struts标记
…尝试使其不起作用。我收到错误,因为在Liferay中找不到请求的资源。请尝试查找以下内容:
<struts>
<package extends="struts-portlet-default" name="view">
<action name="index">
<result>/view.jsp</result>
</action>
<action class="com.tutorialspoint.struts2.HelloWorldAction" method="execute" name="hello">
<result name="success">/success.jsp</result>
</action>
</package>
</struts>
<portlet:defineObjects />
<portlet:actionURL name="hello" var="hello" />
<form action="<%=hello.toString()%>" >
<label for="name">Please enter your name</label><br/>
<input type="text" name="name"/>
<input type="submit" value="Say Hello"/>
</form>
package com.tutorialspoint.struts2;
public class HelloWorldAction {
public String execute() throws Exception {
System.out.println("Hi inside the execute method of the execute method");
System.out.println("Welcome"+name);
return "success";
}
private String name ;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}