aspose file tools*
The moose likes Struts and the fly likes Http  status 404 resource not  available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Http  status 404 resource not  available" Watch "Http  status 404 resource not  available" New topic
Author

Http status 404 resource not available

salkapuram leelavathi
Greenhorn

Joined: Mar 06, 2007
Posts: 7
HI
doing programs using sturts frame work, am getting error called httpstatus 404..lee/login.jsp resource is not available.
am having login.jsp program
it is palced in C:\tomcat4.1\webapps\lee\login.jsp
lee is my folder name, i have created .class files for bean class
and action class.every thing specified in struts-config.xml file

how do i come out of this problem
[ March 26, 2007: Message edited by: Bear Bibeault ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Any number of things could case this problem. Here's what I'd suggest:
  • Save what you've coded to another directory
  • unzip the struts-blank.war file that comes with the download into your /webapps/lee directory
  • Copy and paste your entries into the struts-config.xml file
  • Copy and paste your JSP files and class files into the appropriate directories
  • restart the server and retest


  • Merrill
    Consultant, Sima Solutions
    salkapuram leelavathi
    Greenhorn

    Joined: Mar 06, 2007
    Posts: 7
    Hi Higginson,

    Thank you for replying
    Am not getting what exactly you were telling .Againi i tried this program now am getting error like..lee/lookup resource is not available
    am putting all my files hav a look on that

    this is my login.jsp

    <html>
    <head> <h1> Struts application </h1></head>
    <body>
    <form action="lookup" name="lookupform"/ >
    <input type="text" name="username" />
    <input type="text" name="password"/>
    <input type="submit" name="submit" value="login"/>
    </form>
    </body>
    </html>

    This is web.xml

    <web-app>
    <display-name>Struts Blank Application</display-name>

    <!-- Standard Action Servlet Configuration -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>


    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>


    <!-- The Usual Welcome File List -->
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>

    and this is my struts-config.xml file
    struts-config>

    <form-beans>
    <form-bean name="lookupform" type="LoginForm"/>
    </form-beans>


    <action-mapping>

    <action path="/lookup" name="lookupform" type="LoginAction" input="login.jsp" >

    <forward name="success" path="/enter.jsp"/>
    <forward name="fail" path="/welcome.jsp"/>

    </action>

    </action-mapping>

    </struts-config>
    is there any thing that i have to do..
    Merrill Higginson
    Ranch Hand

    Joined: Feb 15, 2005
    Posts: 4864
    Are you sure that your Struts application was deployed successfully to the server and that the server is started? Have you tried deploying and running the struts-examples.war file that comes with the download?
    salkapuram leelavathi
    Greenhorn

    Joined: Mar 06, 2007
    Posts: 7
    can hav the whole process of deploying. am having struts1.3.5.zip file.i hav set system variables for tomcat.I dont know why its not coming.can i hav whole procedure to install struts in my system

    Thank you
    Merrill Higginson
    Ranch Hand

    Joined: Feb 15, 2005
    Posts: 4864
    You must first unzip struts1.3.5.zip to a working directory. If you want to test the examples, find the struts-examples-1.3.5.war file in the apps directory of the file structure created when you unzipeed the file. Then simply copy the war file to your Tomcat /webapps directory. To run the examples, type the URL http://localhost:8080/struts-examples-1.3.5/

    You will also find the file struts-blank-1.3.5.war in the apps directory. This is the file I was referring to in my first post when I was explaining how to start a new struts application.
    [ March 27, 2007: Message edited by: Merrill Higginson ]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Http status 404 resource not available