• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

err: The requested resource (/Login.do) is not available.

 
Mike Jeya
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34218
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This action is defining "/Login", not "Login.do". If you try using /Login in your link or changing the action, it should work.
 
Mike Jeya
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I solved that

changed to Login.do instead of /Login.do

(I declared that URL pattern in web.xml as do)

Thanks all
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic