Results 1 to 3 of 3
  1. #1
    anthrax is offline Member
    Join Date
    Feb 2009
    Posts
    57
    Rep Power
    0

    Default Struts2: why do i get http status 404 error?

    here are my settings
    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>practise</display-name>

    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.FilterDispatch er</filter-class>

    </filter>

    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    </web-app>


    struts.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
    <package name="mypackage" namespace="/web"
    extends="struts-default">

    <action name="add">
    <result>/addPhone.jsp</result>
    </action>

    <action name="Registration">
    <result>/chapterThree/Registration.jsp</result>
    </action>

    </package>
    </struts>

    all necessary jars have been placed in lib folder
    when i entered the url http://localhost:8080/practise/web/add.action i expect addPhone.jsp to be displayed but it displayed an error.. help pls :(

  2. #2
    narendra144 is offline Member
    Join Date
    Apr 2012
    Posts
    1
    Rep Power
    0

    Default Re: Struts2: why do i get http status 404 error?

    hi, I think , u need to add .action in jsp then it should be working properly.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,305
    Rep Power
    20

    Default Re: Struts2: why do i get http status 404 error?

    Quote Originally Posted by narendra144 View Post
    hi, I think , u need to add .action in jsp then it should be working properly.
    Do you also think the person who asked the question is still waiting for the answer after more than two years?

    If you're going to continue to post here, Use proper spellings (you, not u) and a capital letter at the start of a sentence and for the first person singular I. This is a programming forum, not SMS chat. And don't post to long dead threads unless you have something really, really important to offer.

    Closing this thread.

    db

    THREAD CLOSED
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 7
    Last Post: 11-11-2009, 08:29 PM
  2. what does this means HTTP Status 500 -
    By gissah in forum New To Java
    Replies: 0
    Last Post: 03-28-2009, 03:27 AM
  3. Http Status 404 - LoginServlet.do
    By mbalas2 in forum Java Servlet
    Replies: 4
    Last Post: 03-05-2009, 05:52 PM
  4. problem with HTTP Status 404
    By orkun in forum JavaServer Faces (JSF)
    Replies: 1
    Last Post: 02-05-2009, 09:28 PM
  5. HTTP Status 404 - Servlet action is not available---Error
    By sireesha in forum Web Frameworks
    Replies: 0
    Last Post: 04-18-2008, 07:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •