struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: provide Helloworld application in Struts2.0
Date Tue, 15 Nov 2011 22:02:49 GMT
Please look in your server logs for startup errors. Seriously!

Dave

On Tue, Nov 15, 2011 at 2:14 PM, Praveen Jain <
jain_praveen_mailing@yahoo.com> wrote:

> On using it is showing the error as follows
>
> HTTP Status 404 - /HelloWorldStruts2/HelloWorldAction.actiontype Status
> reportmessage /HelloWorldStruts2/HelloWorldAction.actiondescription The
> requested resource (/HelloWorldStruts2/HelloWorldAction.action) is not
> available.
>
>
> Thanks, Praveen Jain
>
>
>
>
> --- On Tue, 11/15/11, Ilya Kazakevich <Ilya.Kazakevich@JetBrains.com>
> wrote:
>
> From: Ilya Kazakevich <Ilya.Kazakevich@JetBrains.com>
> Subject: RE: provide Helloworld application in Struts2.0
> To: "'Struts Users Mailing List'" <user@struts.apache.org>
> Date: Tuesday, November 15, 2011, 10:31 AM
>
>  What URL do you use?
>
> Struts uses ".action" extension by default.
>
> Try /HelloWorldStruts2/HelloWorldAction.action if HelloWorldStruts2 is your
> .war file name
>
>
>
>
>
> Ilya Kazakevich,
> Developer
> JetBrains Inc
> http://www.jetbrains.com
> "Develop with pleasure!"
>
> -----Original Message-----
> From: Praveen Jain [mailto:jain_praveen_mailing@yahoo.com]
> Sent: Tuesday, November 15, 2011 9:52 PM
> To: Struts Users Mailing List
> Subject: Re: provide Helloworld application in Struts2.0
>
> Dear Demo, Still it is not running and following error message is occurring
>
> HTTP Status 404 - /HelloWorldStruts2/
>
>
> type Status report
> message /HelloWorldStruts2/
> description The requested resource (/HelloWorldStruts2/) is not
> available.
>
>
> Apache Tomcat/5.0.28
>
>
> Thanks Praveen Jain
>
> --- On Mon, 11/14/11, Damian Krawcewicz <dkrawcewicz@gmail.com> wrote:
>
> From: Damian Krawcewicz <dkrawcewicz@gmail.com>
> Subject: Re: provide Helloworld application in Struts2.0
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Date: Monday, November 14, 2011, 8:58 AM
>
> For starters, this line:
> <package name="Struts2"  namespace= "/" "struts-default">
>
> either remove "struts-default" or change it to: extends="struts-default"
>
> Damo
>
> On 14 November 2011 16:53, Praveen Jain
> <jain_praveen_mailing@yahoo.com>wrote:
>
> > Yes I made a Simple hello application in Servlet and it is running fine.
> > But my hello world application in struts  is not running please find the
> > four files which compose the application i have made 4 files index.jsp ,
> > Helloworld.jsp , web.xml , struts.xml
> >
> > Please go through the code and help me out to run the application.
> > code for index.jsp
> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> >    pageEncoding="ISO-8859-1"%>
> > <%@taglib prefix="s" uri="/struts-tags" %>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> > http://www.w3.org/TR/html4/loose.dtd">
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> > <title>Hello World</title>
> > </head>
> > <body>
> > <h1>Hello World fron struts 2  </h1>
> > <form action="HelloWorldAction">
> > <label for="name">      Please enter ur name</label><br>
> > <input type="text" name="name"/>
> > <input type="submit" value="Say Hello">
> > </form>
> > </body>
> > </html> Code for Helloworld.jsp
> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> >    pageEncoding="ISO-8859-1"%>
> > <%@taglib prefix="s" uri="/struts-tags" %>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> > http://www.w3.org/TR/html4/loose.dtd">
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> > <title>Hello World JSP</title>
> > </head>
> >
> > <body>
> > Hello world,<s:property value="name"/>
> >
> > </body>
> > </html>
> >
> >
> >
> >  Code for 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>HelloWorldStruts2</display-name>
> >        <welcome-file-list>
> >                <welcome-file>index.jsp</welcome-file>
> >        </welcome-file-list>
> >        <filter>
> >                <filter-name>Struts2</filter-name>
> >
> >
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >        </filter>
> >
> >        <filter-mapping>
> >                                        <filter-name>Struts2</filter-name>
> >                                        <url-pattern>/*</url-pattern>
> >
> >        </filter-mapping>
> >
> > </web-app>
> >
> > Code for 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>
> > <constant name="struts.devMode" value="true"></constant>
> >   <package name="Struts2"  namespace= "/" "struts-default">
> >            <action name="HelloWorldAction"
> > class="Struts2.HelloWorldAction" method="execute">
> >            <result name="success">Helloworld.jsp</result>
> >             </action>
> >   </package>
> > </struts>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --- On Sun, 11/13/11, Ilya Kazakevich <Ilya.Kazakevich@JetBrains.com>
> > wrote:
> >
> > From: Ilya Kazakevich <Ilya.Kazakevich@JetBrains.com>
> > Subject: RE: provide Helloworld application in Struts2.0
> > To: "'Struts Users Mailing List'" <user@struts.apache.org>
> > Date: Sunday, November 13, 2011, 10:07 AM
> >
> > You probably need to familiarize yourself with concepts of servlet and
> > context.
> >
> > Please read servlet specification (at least "Overview" chapter) and
> tomcat
> > context manual
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
> >
> > Try to write and deploy simple servlet then that does nothing but writes
> > "hello" to the output. After success you may get back to struts.
> >
> >
> >
> > Ilya Kazakevich,
> > Developer
> > JetBrains Inc
> > http://www.jetbrains.com
> > "Develop with pleasure!"
> >
> > -----Original Message-----
> > From: Praveen Jain [mailto:jain_praveen_mailing@yahoo.com]
> > Sent: Sunday, November 13, 2011 9:51 PM
> > To: Struts Users Mailing List
> > Subject: RE: provide Helloworld application in Struts2.0
> >
> >
> > HelloWorldStruts2
> >  is the name of the project made in Eclipse and its web.xml is as under
> > mentioned
> >
> >
> >  <?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>HelloWorldStruts2</display-name>
> >     <welcome-file-list>
> >         <welcome-file>index.jsp</welcome-file>
> >     </welcome-file-list>
> >     <filter>
> >             <filter-name>Struts2</filter-name>
> >
> >
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >     </filter>
> >
> >     <filter-mapping>
> >                     <filter-name>Struts2</filter-name>
> >                     <url-pattern>/*</url-pattern>
> >
> >     </filter-mapping>
> >
> > </web-app>
> >
> >
> > ThanksPraveen Jain
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message