This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes err: The requested resource (/Login.do) is not available. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "err: The requested resource (/Login.do) is not available." Watch "err: The requested resource (/Login.do) is not available." New topic
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: 30068
    
149


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]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: err: The requested resource (/Login.do) is not available.
 
Similar Threads
HTTP Status 404
Strange Problem
Struts Without Form Bean
Problem with resource bundle
Looking for Action instance for class test.struts.LoginAction