Hello,

your code and struts settings looks fine, so I guess the problem will be in
the web.xml.

How is set your Filter? What filter do you use? By the way, in struts page
you sent, there is FilterDispatcher mentioned, but it is deprecated since
2.1.3. More about it here:
http://struts.apache.org/2.1.6/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html

<http://struts.apache.org/2.1.6/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html>Can
you provide your complete web.xml?

Jozef

On Sat, Nov 7, 2009 at 9:19 AM, reason <k...@pop.gr> wrote:

>
> i'm trying to get the example outlined in
> http://struts.apache.org/2.1.8/docs/ready-set-go.html to work
>
> i managed to compile the project in eclipse and it seems to be working with
> the exception that the output page is blank.
>
> i.e. the
>
>    <body>
>        <h2><s:property value="message" /></h2>
>    </body>
>
> directive in the jsp doesn't seem to be outputing anything
>
> below are my struts.xml HelloWorld.java and HelloWorld.jsp
>
> struts.xml
> <!DOCTYPE struts PUBLIC
>    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>    "http://struts.apache.org/dtds/struts-2.0.dtd";>
> <struts>
>    <package name="tutorial" extends="struts-default">
>        <action name="HelloWorld" class="tutorial.HelloWorld">
>            <result>/HelloWorld.jsp</result>
>        </action>
>        <!-- Add your actions here -->
>    </package>
> </struts>
>
> HelloWorld.java
> package tutorial;
> import com.opensymphony.xwork2.ActionSupport;
> public class HelloWorld extends ActionSupport {
>
>    public static final String MESSAGE = "Struts is up and running ...";
>
>    public String execute() throws Exception {
>        setMessage(MESSAGE);
>        return SUCCESS;
>    }
>
>    private String message;
>
>    public void setMessage(String message){
>        this.message = message;
>    }
>
>    public String getMessage() {
>        return message;
>    }
> }
>
> HelloWorld.jsp
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
> <html>
>    <head>
>        <title>Hello World!</title>
>    </head>
>    <body>
>        <h2><s:property value="message" /></h2>
>    </body>
> </html>
>
>
> all i'm getting is a blank page with "Hello World" as the title
>
> thanks for any replies,
> k
> --
> View this message in context:
> http://old.nabble.com/struts-2-helloWorld-example-not-properly-working-in-tomcat-5.5-tp26240890p26240890.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to