Several people have mentioned Preparable, but TBH I'm not sure why.  The OP
is really just trying to get a "Hello World" Struts app working ...
something for which Preparable is irrelevant.

Wes's questions are good - I'd also like to see the Action class
declaration, the contents of the log, and the .jsp contents.

-Brian



On Fri, Nov 27, 2009 at 10:42 AM, Oscar <oscar.kalde...@gmail.com> wrote:

> I think that you have to implement Preparable interface, and you can't
> declare prepare() throwing an exception because that's not permitted by
> methods implementation rules (if i'm wrong tell me please).
>
> Wes Wannemacher escribió:
>
>  On Fri, Nov 27, 2009 at 4:04 AM, Nguyen Xuan Son <yama...@gmail.com>
>> wrote:
>>
>>
>>> Dear Thompson
>>> Here is the web.xml's content
>>> <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>
>>>
>>> I've try to use
>>> void prepare() throws Exception {
>>> System.out.println("you're now in C0002_Home page");
>>> }
>>> but it still doesnt work out
>>> please tell me what should i correct
>>> thank you very much
>>>
>>>
>>>
>>>
>>
>>
>> Are you seeing any errors in your logs? What you have posted so far is
>> technically correct... Can you also post for us the list of jars that
>> you have in /WEB-INF/lib ?
>>
>> Another thing I would try is to take the 'throws Exception' off of
>> your execute method declaration. I can't remember off the top of my
>> head, but I don't normally declare that and it makes me wonder if it's
>> taking your method out of the inheritance hierarchy... Also, can you
>> post your class declaration, are you extending ActionSupport or
>> implementing Action?
>>
>> -Wes
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to