Hi all,
I am new to struts framework. I am creating a sample application. I am getting the following error message. i am using Tomcat 5.0 server
The requested resource (/Login.do) is not available
my files are as follow
Struts-config.xml
===================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<action-mappings>
<action path="/Login" type="action.DemoAction" input = "/jsp/common/Login.jsp">
<forward name="Success" path="/jsp/common/Message.jsp">
</forward>
</action>
</action-mappings>
</struts-config>
JPS
========
<html>
<body>
<form name = "LoginForm" action="/Login.do">
UserName<input name="name"><br>
Passwd<input name="passwd"><br>
<input type="submit" value="Go">
</form>
</body>
</html>
ACTION CLASS
================
package com.phr.action;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;
public class DemoAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
System.out.println("\nExecution Sucess");
// Call the Business Logic
System.out.println("object : ");
System.out.println("Msg : " );
String name = "amul";
//ModelClass model = new ModelClass();
//String retMessage = model.returnMessage(request,response);
request.setAttribute("Message",name);
return(mapping.findForward("Success"));
}
}
After going to the url i am getting that the resource could not be found. i am now totally confuse as why this is not working.
It will be a great help if anyone can pin poing the problem wiht this. I am using the folder structure as follows
e:
Our project
|
-- PHR
|
---JavaSource
|
---
action
|
--- All java Files
|
--WebContent
|
----
jsp
|
---
Common
|
-- All JSP Files
|
WEB-INF
|
----
classes
lib
All XML Files
action
All Java Files
WebContent
Classes
JSP
Common
All JSP Files
WEB-INF
Classes
lib
All the XML Files as well
[ April 19, 2008: Message edited by: amul shah ]
[ April 19, 2008: Message edited by: amul shah ]