---
title: "Struts2中action重定向跳转到jsp页面两种配置方式"
author: "andyniu"
date: "2016-07-06T12:38:35Z"
tags: []
categories: ["编程语言"]
slug: "struts2-action-jsp"
draft: false
lastmod: "2016-07-06T12:38:35Z"
id: 2309523
url: "https://andyniu.iteye.com/blog/2309523"
---

第一方式：

    参数之间必须使用&amp;。&amp;是&在xml中转义字符

&lt;result name="error"type="redirect"&gt;  

   /login.jsp?userId=${orgStrucUser.userId}&amp;error=1  

&lt;/result&gt;  

第二方式：

&lt;result name="error"type="redirect"&gt;   

     &lt;paramname="location"&gt;/login.jsp&lt;/param&gt;   

     &lt;paramname="userId"&gt;${orgStrucUser.userId}&lt;/param&gt;   

     &lt;paramname="error"&gt;1&lt;/param&gt;   

&lt;/result&gt;