liferay中jsp超链接的路径问题及配置文件

nigundan 2010-02-28 10:26:53
tomcat报错
WARN [PortletRequestProcessor:171] This URL can only be invoked using POST: /
web/guest/home?p_p_id=module&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&p_p_col_id=c
olumn-1&p_p_col_pos=1&p_p_col_count=2&_module_struts_action=%2Fforallsoft%2Fcommon%2Fmodule
%2Fedit
16:37:28,671 ERROR [jsp:165] com.liferay.portal.security.auth.PrincipalException: /web/gues
t/home?p_p_id=module&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-1&
p_p_col_pos=1&p_p_col_count=2&_module_struts_action=%2Fforallsoft%2Fcommon%2Fmodule%2Fedit
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcesso
r.java:176)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(Filter
ChainImpl.java:98)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.j
ava:57)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:632)
at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:664)

at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:359
)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:6
04)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:428)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.
java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.
java:157)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:608)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)

view.jsp:
<a
href="<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>"><portlet:param name="struts_action" value="/forallsoft/common/module/edit" /></portlet:actionURL>">test</a>

struts-config.xml
<action path="/forallsoft/common/module/edit"
type="com.forallsoft.portlet.common.module.action.EditModuleAction">
<forward name="portlet.forallsoft.common.module.edit"
path="portlet.forallsoft.common.module.edit"/>

EditModuleAction

public class EditModuleAction extends PortletAction {
public ActionForward render(ActionMapping mapping, ActionForm form,
PortletConfig config, RenderRequest req, RenderResponse res)
throws Exception {
return mapping.findForward(getForward(req,
"portlet.forallsoft.common.module.edit"));
}

public EditModuleAction() {
}

public void processAction(ActionMapping mapping, ActionForm form,
PortletConfig config, ActionRequest req, ActionResponse res)
throws Exception {

setForward(req, "portlet.forallsoft.common.module.show_modules");
}

我的主要目的就是:jsp页面上有个超链接,通过这个超连接能链接到EditModuleAction中,转到show_modules页面中。但是我的href后面的地址不会写!如果重新写的话,需要配置哪些文件?
...全文
535 4 打赏 收藏 举报
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
青草样的忧郁 2010-09-03
  • 打赏
  • 举报
回复
lz问题解决了么?我遇到同样的问题
viqsoft 2010-03-10
  • 打赏
  • 举报
回复
http://issues.liferay.com/browse/LPS-2652
nigundan 2010-03-05
  • 打赏
  • 举报
回复
什么意思?直接在后面加上什么
Defonds 版主 2010-03-03
  • 打赏
  • 举报
回复
引用楼主 nigundan 的回复:
tomcat报错
WARN  [PortletRequestProcessor:171] This URL can only be invoked using POST: /
web/guest/home?p_p_id=module&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&p_p_col_id=c
olumn-1&p_p_col_pos=1&p_p_col_count=2&_module_struts_action=%2Fforallsoft%2Fcommon%2Fmodule
%2Fedit
16:37:28,671 ERROR [jsp:165] com.liferay.portal.security.auth.PrincipalException: /web/gues
t/home?p_p_id=module&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-1&
p_p_col_pos=1&p_p_col_count=2&_module_struts_action=%2Fforallsoft%2Fcommon%2Fmodule%2Fedit
        at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcesso
r.java:176)
        at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197)
        at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(Filter
ChainImpl.java:98)
        at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.j
ava:57)
        at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:632)
        at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:664)

        at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:359
)
        at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:6
04)
        at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:428)
        at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.
java:431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.
java:157)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:608)
        at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:846)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)

view.jsp:
<a
href=" <portlet:actionURL windowState=" <%= WindowState.MAXIMIZED.toString() %>"> <portlet:param name="struts_action" value="/forallsoft/common/module/edit" /> </portlet:actionURL>">test </a>

struts-config.xml
<action path="/forallsoft/common/module/edit"
type="com.forallsoft.portlet.common.module.action.EditModuleAction">
<forward name="portlet.forallsoft.common.module.edit"
path="portlet.forallsoft.common.module.edit"/>
EditModuleAction
public class EditModuleAction extends PortletAction {
public ActionForward render(ActionMapping mapping, ActionForm form,
PortletConfig config, RenderRequest req, RenderResponse res)
throws Exception {
return mapping.findForward(getForward(req,
"portlet.forallsoft.common.module.edit"));
}

public EditModuleAction() {
}

public void processAction(ActionMapping mapping, ActionForm form,
PortletConfig config, ActionRequest req, ActionResponse res)
throws Exception {

                setForward(req, "portlet.forallsoft.common.module.show_modules");
}

我的主要目的就是:jsp页面上有个超链接,通过这个超连接能链接到EditModuleAction中,转到show_modules页面中。但是我的href后面的地址不会写!如果重新写的话,需要配置哪些文件?
直接在后边加上就是了。
相关推荐
今天在写jsp的时候,相对路径问题一直存在,因此希望一点一点记录一下这个问题超链接路径 超链接 的引用路径,若是引用自己项目的资源,则引用路径则是从当前路径开始去找,若是请求页面资源就不必说了,并且接口的映射路径也是如此,将会从当前目录去寻找借口路径。 例如 当前路径:http://localhost:8888:/L/learn/login.jsp 页面
发帖
Java

4.9w+

社区成员

Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
帖子事件
创建了帖子
2010-02-28 10:26
社区公告
暂无公告