English 中文(简体)
Struts2: 问题从其他地点转向我的应用
原标题:Struts2 : Problem in redirecting From other site to myApplication

I am using struts2.0 and the application is deployed and tested over tomcat 6.0.

按照要求,我的申请(myApplication)必须从带域名的PHP网站转播:http://abc.com

When this PHP site redirects the request to my application it calls an action Action1 of my application, which further redirects to another action Action2. But while redirection it changes the domain name to Application s server IP (http://applicationServerIP:8080/myApplication/Action2 ). My expected result is ( http://abc.com/myApplication/Action2).

www.un.org/Depts/DGACM/index_spanish.htm 涡轮机中的行动配置是:

<action name="Action1" class="Action1">
    <result name="success" type="redirectAction">Action2</result>
</action>

<action name="Action2" class="Action2">
    <result name="success">/myJSP.jsp</result>
</action>

www.un.org/Depts/DGACM/index_spanish.htm 任何帮助解决这一问题的措施都将受到赞赏。

问题回答

通过将以下标记放入/米JSP.jsp

<s:a>here</s:a> //I will write the current url as struts understands it.

将会显示,休战分子在确定服务器名称时,会把登机升空。

http://applicationServerIP:8080/myApplication/Action2"rel=“nofollow”http://applicationServerIP:80/myApplication/Action2。 仅改为:http://abc.com/myApplication/Action2"rel=“nofollow”http://abc.com/myApplication/Action2

如果这不是你想要的,那么,在《欧洲刑法》生效之前,就有必要改变《欧洲刑法》。 一些集装箱已经建造,用于支持这一或附加/插图(仅使用管道)。

你们必须绕过休战,因为这只是为了你自己的应用而改变。

public ActionForward method(ActionMapping mapping, ActionForm form,
                HttpServletRequest request, HttpServletResponse response){
       response.sendRedirect("http://www.example.com");
       return null;
}




相关问题
Tomcat´s server.xml dynamic configuration

My web application uses the same database configuration as the application XYZ. I have a resource declaration for a context in server.xml, so I have a duplicated configuration (once for web ...

session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

JSP exception - class not found (tomcat)

I m setting up an existing application on a new Tomcat 5.5 server connecting to a Postgres database (running on Debian Lenny). When I access it I get a series of stack traces with the following root ...

热门标签