| Author |
err: The requested resource (/Login.do) is not available.
|
Mike Jeya
Ranch Hand
Joined: Apr 15, 2004
Posts: 54
|
|
Hi, I am just trying a simple struts application. It has a login form, while submitting , I invoke /login.do My struts.config is <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> <struts-config> <!-- ========== Action Definitions ============================== --> <action path="/Login" type="Demo.LoginAction" name="LoginForm" input="./index.jsp"> </action> <!-- ========== Form bean Definitions ============================== --> <form-beans> <form-bean name="LoginForm" type="Demo.LoginForm" /> </form-beans> <!-- ========== Action Mapping Definitions ============================== --> <action-mappings> <action path="/Login" name="LoginAction" type="Demo.LoginAction"> <forward name="load" path="/jsp/Login.jsp" redirect="true"> </forward> <forward name="unauthorised" path="/jsp/Unauthorised.jsp" redirect="true"> </forward> <forward name="authorised" path="/jsp/Main.jsp" redirect="true"> </forward> </action> </action-mappings> </struts-config> But The following error is coming, requested resource /Login.do is not available. As I am very new struts , I couldn't traceout what is the error?, Waiting for replies.. Thanks in Advance
|
 |
sreenath reddy
Ranch Hand
Joined: Sep 21, 2003
Posts: 415
|
|
Hi what is this action definition and actionmapping definituion ..in ur xml only one netry is needed and send even the jsp code ....as of now i dont fweel there is some problem in ur code except this.....i want a clarification on this
|
 |
Mike Jeya
Ranch Hand
Joined: Apr 15, 2004
Posts: 54
|
|
Hi, Thanks for your reply, This is my index.jsp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <FORM METHOD="POST" name="LoginForm" ACTION="/Login.do"> <INPUT TYPE="text" NAME="username"> <INPUT TYPE="text" NAME="password"> <INPUT TYPE="submit"> </FORM> </BODY> </HTML>
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 23635
|
|
This action is defining "/Login", not "Login.do". If you try using /Login in your link or changing the action, it should work.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Certs: SCEA Part 1, Part 2 & 3 & Core Spring 3, OCAJP
|
 |
Mike Jeya
Ranch Hand
Joined: Apr 15, 2004
Posts: 54
|
|
Hi , I solved that changed to Login.do instead of /Login.do (I declared that URL pattern in web.xml as do) Thanks all
|
 |
 |
|
|
subject: err: The requested resource (/Login.do) is not available.
|
|
|