Struts 2 - perda de contexto

0 respostas
rafaduka

[list]URL (antes da chamada da action)[/list]
[img]http://lh4.ggpht.com/_Dq3a4KcC2bY/TSSTiWp23fI/AAAAAAAAA9g/avjXsE0D-0w/s800/urlbefore.png[/img]

[list]URL (depois da chamada da action)[/list]
[img]http://lh3.ggpht.com/_Dq3a4KcC2bY/TSSVptdMrMI/AAAAAAAAA9o/B_vWuKd1Lbg/s800/issue.png[/img]

[list]Gostaria que o contexto permanece-se assim:[/list]
[img]http://lh6.ggpht.com/_Dq3a4KcC2bY/TSSVpmhnctI/AAAAAAAAA9s/ZB9HQgM_ic4/s800/correct.png[/img]

[list]index.jsp[/list]
<s:form action="add">
   <s:textfield name="user" />
   <s:submit />
</s:form>
[list]web.xml[/list]
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Struts2</display-name>
     <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  
</web-app>
[list]struts.xml[/list]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
	<package name="default" extends="struts-default">
		<action name="add" method="add"
			class="com.action.ClassAction">
			<result name="success">/pages/cadastro/index.jsp</result>
		</action>		
	</package>
</struts>

É alguma configuração que precisa ser feita? :?

Criado 5 de janeiro de 2011
Respostas 0
Participantes 1