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
Subscribe to Tutorials
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. thxxx :) very simple explanation
View Tutorial By: mohamed at 2012-09-09 04:16:06
2. Simple and easy code..........
View Tutorial By: mandalson at 2011-12-24 06:50:38
3. i want to know about basic requirement for jdbc ,
View Tutorial By: Amit sharma at 2009-03-19 04:10:24
4. Hi Ramlak
I am trying to run your code.
View Tutorial By: jainitya at 2011-05-04 12:26:16
5. Can u please help me to implement traversing forw
View Tutorial By: Rahi at 2015-09-18 11:12:32
6. Hi everyone!
Pls I dnt know hot to configur
View Tutorial By: DSE90 at 2010-02-12 12:05:57
7. i got an error msg at runtime of jdbc program with
View Tutorial By: madhu sudan at 2012-06-17 02:52:53
8. Never use gets for taking inputs from users. Your
View Tutorial By: Aneesh Dogra at 2012-07-20 04:08:32
9. @pankaj because u need to cast it. when u add num
View Tutorial By: raziq at 2011-12-18 16:06:09
10. wow... and Thanks...
View Tutorial By: lasitha at 2010-07-24 21:38:50