1

Hi I am trying to map a action in struts.xml file but it is not working properly. I am using struts2 framework of my projects.- my code is being displayed below-

<?xml version="1.0" encoding="UTF-8" ?>  
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts  
Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">  
<struts>   
   <package name="default" extends="struts-default" namespace="/">  
     <action name="guideLogin" class="com.my.orderguide.action.GuideLogin">  
        <result name="success">logic/logsuccess.jsp</result>  
     </action>  
   </package>  
</struts>   

and my web.xml is being displayed in below-

<?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" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>ORDERGUIDE</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <filter>
    <filter-name>struts2</filter-name>
    <filter-class>
       org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
    </filter-class>
  </filter>
  <filter-mapping>
     <filter-name>struts2</filter-name>
     <url-pattern>/*</url-pattern>
  </filter-mapping>
</web-app>

When i trying to login from index.jsp page with action="guideLogin"of form then it is refering in - http://localhost:8080/index.jsp URL.

Please give me suggestions to solve this issue...`

Roman C
  • 49,761
  • 33
  • 66
  • 176
Rajeev
  • 61
  • 1
  • 2
  • 7

0 Answers0