Comment on Tutorial - Creating the first application using Struts 2 By Gokul Verma
Comment Added by : Trishul
Comment Added at : 2009-10-26 07:32:57
Comment on Tutorial : Creating the first application using Struts 2 By Gokul Verma
I got the sample and the test working. Thanks a lot. Here's web.xml for the sample:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="<a href="http://java.sun.com/xml/ns/j2ee"">http://java.sun.com/xml/ns/j2ee"</a> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance"">http://www.w3.org/2001/XMLSchema-instance"</a> xsi:schemaLocation="<a href="http://java.sun.com/xml/ns/j2ee">http://java.sun.com/xml/ns/j2ee</a> <a href="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"">http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</a>>
    <display-name>Struts Blank</display-name>
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-app>
Also,
struts.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "<a href="http://struts.apache.org/dtds/struts-2.0.dtd"">http://struts.apache.org/dtds/struts-2.0.dtd"</a>>
<struts>
    <constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <constant name="struts.devMode" value="false" />
    <!--
    <include file="example.xml"/>
    <package name="default" namespace="/" extends="struts-default">
        <default-action-ref name="index" />
        <action name="index">
            <result type="redirectAction">
                <param name="actionName">HelloWorld</param>
                <param name="namespace">/example</param>
            </result>
        </action>
    </package>
-->
    <!-- Add packages here -->
    <package name="default" namespace="/" extends="struts-default">
      <action name="HelloWorld" class="com.thinkbeyond.action.HelloWorld">
         <result>/HelloWorld.jsp</result>
      </action>
    </package>
</struts>
View Tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Program using concept of byte long short and int in java
Update contents of a file within a jar file
Tomcat and httpd configured in port 8080 and 80
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
MultiLevel Inheritance sample in Java
Archived Comments
1. FilenameFilter only = new OnlyExt("html"
View Tutorial By: joyes at 2009-08-25 11:34:13
2. hi please help me out.. how to use this card for r
View Tutorial By: sasivarnan at 2011-04-27 15:01:12
3. Verrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
View Tutorial By: Amarnath.A at 2011-07-14 00:32:08
4. It's a good article.Would you please elaborate th
View Tutorial By: Chandra at 2015-10-05 12:24:24
5. i installed the code in ecllipse,but i have one do
View Tutorial By: vamsi at 2015-05-19 10:56:25
6. I have loaded allthe 5 java files.But how to imple
View Tutorial By: devi at 2008-04-01 01:02:28
7. it is not working
View Tutorial By: shaishav at 2013-06-20 08:03:06
8. i want to learn the java from basics onwards.
View Tutorial By: vinay at 2010-03-08 22:54:15
9. This tutorial is really Good and enhance my desire
View Tutorial By: Yasin at 2011-07-09 10:04:57
10. 1==how can we use vb.net web service data in JSF?<
View Tutorial By: kumaraswamy at 2009-01-06 23:56:53