tags:

views:

18

answers:

0

Please some one tell tell me what is the problem in this code?? i have created a index.jsp where there is a link for "abhisek/showLogin.action" which will match with the action tag of the sruts.xml and perse the page to /pages/login.jsp. but i dont know why this is not happening please help me someone. i am giving the code here . i bukt the project in struts2 here is the code ....

/index.jsp

<html>
<head>
<title>
abhisek.com
</title>
</head>
<body>
<h2>
Welcome to comviva.com
</h2>
<h3>
<a href="abhisek/showLogin.action">Click here to login</a>
</h3>
</body>
</html>

and for /src/struts.xml

<?xml version="1.0" encoding="UTF-8"?>
<struts>
    <constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <constant name="struts.devMode" value="true" />
<package name="abhisek" namespace="/abhisek" extends="struts-default">
 <action name="showLogin">
<result>/pages/login.jsp</result>
</action>

<action name="dologin.do" class="net.abhisek.Login">
<result name="input">/pages/login.jsp</result>
<result name="error">/pages/login.jsp</result>
<result>/pages/loginsuccess.jsp</result>
</action>
</package>
</struts>