• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic