Note that there are some explanatory texts on larger screens.

plurals
  1. POaction is not getting mapped in struts
    primarykey
    data
    text
    <p>struts.xml</p> <pre><code> &lt;struts&gt; &lt;!-- Configuration for the default package. --&gt; &lt;package name="default" extends="struts-default"&gt; &lt;action name="HelloWorld" class="vaannila.HelloWorld"&gt; &lt;result name="SUCCESS"&gt;/success.jsp&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt; </code></pre> <p>web.xml</p> <pre><code> &lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; </code></pre> <p>index.jsp</p> <pre><code> &lt;%@taglib uri="/struts-tags" prefix="s" %&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;Hello World&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;s:form action="HelloWorld" &gt; &lt;s:textfield name="userName" label="User Name" /&gt; &lt;s:submit /&gt; &lt;/s:form&gt; &lt;/body&gt; </code></pre> <p></p> <p>success.jsp <h1></h1> </p> <p>HelloWorld.java</p> <pre><code> package vaannila; public class HelloWorld { private String message; private String userName; public HelloWorld() { } public String execute() { setMessage("Hello " + getUserName()); return "SUCCESS"; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; }} </code></pre> <p>error message i am getting is</p> <p>HTTP Status 404 - There is no Action mapped for action name HelloWorld.</p> <p>i am using netbeans ide 6.8</p> <p>struts.xml ,web.xml file is in WEB-INF directory . Source Package->vannilla->HelloWorld is the action location of action class.</p> <p>can anyone help me </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload