Hi all,
Musachy and Dave are wright,
you only need this:
        <default-action-ref name="index"></default-action-ref>
in your struts.xml
no file in tomcat is needed,
i use it in my www.isiak.pl app so you can check it out, it's on tomcat.

Also one can do any redirect or anything else in this default action,
because it's a real action, for example i do:
@Result(name="success", location="kolczyki", type="redirectAction",
params={"namespace", "/", "link", "szmaragdowe-krople"})

Best greetings,
Paweł Wielgus.


2009/8/30 Peter Phillips <petergphill...@googlemail.com>:
> Luis- there's nothing wrong with your code, but Rusty is also right.
> The trick is to create an empty file called the same name as your
> action (e.g. start.action) at the root of your web app.  Tomcat will
> see the empty file and then call your action directly.
>
>
> 2009/8/30 Luis Martín Canaval Sánchez <martin.cana...@gmail.com>:
>> My bad, I´m really sorry the code I posted is totally wrong. please ignore
>> it. I usually start with a index.jsp or html as a welcome page.
>>
>> On Sat, Aug 29, 2009 at 18:37, Rusty Wright <rusty.wri...@gmail.com> wrote:
>>
>>> Luis, are you using tomcat?  I've tried that but it only works for me when
>>> the welcome-file is a actual, physical file in the ~tomcat/webapps/myapp
>>> directory.
>>>
>>>
>>> Luis Martín Canaval Sánchez wrote:
>>>
>>>> This is my preffered choice, just a welcome page defined in the web.xml
>>>> file
>>>>    <welcome-file-list>
>>>>        <welcome-file>start.action</welcome-file>
>>>>        </welcome-file-list>
>>>>    </web-app>
>>>>
>>>> No redirects just straight to the action.
>>>>
>>>> On Sat, Aug 29, 2009 at 17:34, Rusty Wright <rusty.wri...@gmail.com>
>>>> wrote:
>>>>
>>>>  Is there a preferred way to "jump start" a web app when the user starts
>>>>> at
>>>>> the top; e.g., they use the url
>>>>>
>>>>>  http://somehost.com/myapp/
>>>>>
>>>>> What I'm doing now is putting a redirect in index.jsp, as follows.  Is
>>>>> there a better way?
>>>>>
>>>>>  <?xml version="1.0" encoding="ISO-8859-1" ?>
>>>>>
>>>>>  <%@ page contentType="text/html; charset=UTF-8" %>
>>>>>
>>>>>  <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
>>>>>
>>>>>  <c:redirect
>>>>>      url="/start.action"
>>>>>  />
>>>>>
>>>>> I want the naked, top url to have an action.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>> --
>> Ing. Luis Martín Canaval Sánchez
>> Keep it small and simple.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to