You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rusty Wright <ru...@gmail.com> on 2009/08/29 19:34:25 UTC

preferred way to jump start app into struts?

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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: preferred way to jump start app into struts?

Posted by Martin Gainty <mg...@hotmail.com>.
you'll need to identify navigation characteristics thru the controller 
in servlets context configuration file *servlet.xml

but that is off-topic for this list
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Sun, 30 Aug 2009 15:05:03 -0700
> From: rusty.wright@gmail.com
> To: user@struts.apache.org
> Subject: Re: preferred way to jump start app into struts?
> 
> Thanks, that works well.  I think I didn't try that because I couldn't get a similar setup to work with Spring MVC.
> 
> 
> Paweł Wielgus wrote:
> > 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 <pe...@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 <ma...@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 <ru...@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 <ru...@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-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
> >>>>
> >>>>
> >>>
> >>> --
> >>> Ing. Luis Martín Canaval Sánchez
> >>> Keep it small and simple.
> >>>
> >> ---------------------------------------------------------------------
> >> 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
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009

Re: preferred way to jump start app into struts?

Posted by Rusty Wright <ru...@gmail.com>.
Thanks, that works well.  I think I didn't try that because I couldn't get a similar setup to work with Spring MVC.


Paweł Wielgus wrote:
> 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 <pe...@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 <ma...@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 <ru...@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 <ru...@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-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
>>>>
>>>>
>>>
>>> --
>>> Ing. Luis Martín Canaval Sánchez
>>> Keep it small and simple.
>>>
>> ---------------------------------------------------------------------
>> 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
> 

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


Re: preferred way to jump start app into struts?

Posted by Paweł Wielgus <po...@gmail.com>.
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 <pe...@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 <ma...@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 <ru...@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 <ru...@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-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
>>>
>>>
>>
>>
>> --
>> Ing. Luis Martín Canaval Sánchez
>> Keep it small and simple.
>>
>
> ---------------------------------------------------------------------
> 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


Re: preferred way to jump start app into struts?

Posted by Rusty Wright <ru...@gmail.com>.
I didn't know about the empty file trick; thanks.

It's annoying that this isn't defined in the servlet spec.  Each servlet container does it differently; with jetty you can have the welcome-file point to a servlet (although I must be doing something wrong since I couldn't get it to work).  My next experiment will be Resin.


Peter Phillips wrote:
> 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 <ma...@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 <ru...@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 <ru...@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-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
>>>
>>>
>>
>> --
>> Ing. Luis Martín Canaval Sánchez
>> Keep it small and simple.
>>
> 
> ---------------------------------------------------------------------
> 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


Re: preferred way to jump start app into struts?

Posted by Peter Phillips <pe...@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 <ma...@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 <ru...@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 <ru...@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-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
>>
>>
>
>
> --
> Ing. Luis Martín Canaval Sánchez
> Keep it small and simple.
>

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


Re: preferred way to jump start app into struts?

Posted by Luis Martín Canaval Sánchez <ma...@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 <ru...@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 <ru...@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-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
>
>


-- 
Ing. Luis Martín Canaval Sánchez
Keep it small and simple.

Re: preferred way to jump start app into struts?

Posted by Rusty Wright <ru...@gmail.com>.
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 <ru...@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-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


Re: preferred way to jump start app into struts?

Posted by Luis Martín Canaval Sánchez <ma...@gmail.com>.
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 <ru...@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Ing. Luis Martín Canaval Sánchez
Keep it small and simple.

Re: preferred way to jump start app into struts?

Posted by Rusty Wright <ru...@gmail.com>.
What do you mean by "Use a welcome page"?  As far as I can tell I can't have welcome-file specify a resource that's inside the app (i.e., maps to an Action), it has to be an actual, physical file.  In other words, the web.xml tag is welcome-file, not welcome-url or welcome-resource, so it has to be a file.

I'm ok with this if that's the way it has to be, but it seems a bit klunky and I was wondering if there was a better way.  And it seems to be a generic problem; I do the same redirect/forward thing with Spring MVC apps.


Dave Newton wrote:
> Rusty Wright 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.
> 
> Use a welcome page or just do what you're doing?
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> 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


Re: preferred way to jump start app into struts?

Posted by Dave Newton <ne...@yahoo.com>.
Rusty Wright 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.

Use a welcome page or just do what you're doing?

Dave


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


Re: preferred way to jump start app into struts?

Posted by Xyzr <xy...@gmail.com>.
I have not tried Struts 2.1.8 at all. I only read about this "FORWARD" bug.


Musachy Barroso wrote:
> 
> this bug was fixed, are you having this problem?
> 
> On Sat, Aug 29, 2009 at 12:22 PM, Xyzr<xy...@gmail.com> wrote:
>>
>> BTW Struts < 2.1.8 will fail into infinite loop on
>> "<dispatcher>FORWARD</dispatcher>".
>>
>>
>> Xyzr wrote:
>>>
>>> I use this:
>>>
>>> myapp/index.jsp
>>> (only 1 line of code)
>>> -----------------------------------
>>> <jsp:forward page="/start.action"/>
>>>
>>>
>>> myapp/WEB-INF/web.xml
>>> (notice "<dispatcher>FORWARD</dispatcher>"s)
>>> -----------------------------------
>>> <!-- ... -->
>>>       <filter-mapping>
>>>               <filter-name>StrutsPrepareFilter</filter-name>
>>>               <url-pattern>/*</url-pattern>
>>>               <dispatcher>REQUEST</dispatcher>
>>>               <dispatcher>FORWARD</dispatcher>
>>>       </filter-mapping>
>>>       <filter-mapping>
>>>               <filter-name>StrutsExecuteFilter</filter-name>
>>>               <url-pattern>/*</url-pattern>
>>>               <dispatcher>REQUEST</dispatcher>
>>>               <dispatcher>FORWARD</dispatcher>
>>>       </filter-mapping>
>>> <!-- ... -->
>>>
>>>
>>>
>>> Rusty Wright-2 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-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/preferred-way-to-jump-start-app-into-struts--tp25204817p25205646.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/preferred-way-to-jump-start-app-into-struts--tp25204817p25211259.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: preferred way to jump start app into struts?

Posted by Musachy Barroso <mu...@gmail.com>.
this bug was fixed, are you having this problem?

On Sat, Aug 29, 2009 at 12:22 PM, Xyzr<xy...@gmail.com> wrote:
>
> BTW Struts < 2.1.8 will fail into infinite loop on
> "<dispatcher>FORWARD</dispatcher>".
>
>
> Xyzr wrote:
>>
>> I use this:
>>
>> myapp/index.jsp
>> (only 1 line of code)
>> -----------------------------------
>> <jsp:forward page="/start.action"/>
>>
>>
>> myapp/WEB-INF/web.xml
>> (notice "<dispatcher>FORWARD</dispatcher>"s)
>> -----------------------------------
>> <!-- ... -->
>>       <filter-mapping>
>>               <filter-name>StrutsPrepareFilter</filter-name>
>>               <url-pattern>/*</url-pattern>
>>               <dispatcher>REQUEST</dispatcher>
>>               <dispatcher>FORWARD</dispatcher>
>>       </filter-mapping>
>>       <filter-mapping>
>>               <filter-name>StrutsExecuteFilter</filter-name>
>>               <url-pattern>/*</url-pattern>
>>               <dispatcher>REQUEST</dispatcher>
>>               <dispatcher>FORWARD</dispatcher>
>>       </filter-mapping>
>> <!-- ... -->
>>
>>
>>
>> Rusty Wright-2 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-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/preferred-way-to-jump-start-app-into-struts--tp25204817p25205646.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Re: preferred way to jump start app into struts?

Posted by Xyzr <xy...@gmail.com>.
BTW Struts < 2.1.8 will fail into infinite loop on
"<dispatcher>FORWARD</dispatcher>".


Xyzr wrote:
> 
> I use this:
> 
> myapp/index.jsp 
> (only 1 line of code)
> -----------------------------------
> <jsp:forward page="/start.action"/>
> 
> 
> myapp/WEB-INF/web.xml
> (notice "<dispatcher>FORWARD</dispatcher>"s)
> -----------------------------------
> <!-- ... -->
> 	<filter-mapping>
> 		<filter-name>StrutsPrepareFilter</filter-name>
> 		<url-pattern>/*</url-pattern>
> 		<dispatcher>REQUEST</dispatcher>
> 		<dispatcher>FORWARD</dispatcher>
> 	</filter-mapping>
> 	<filter-mapping>
> 		<filter-name>StrutsExecuteFilter</filter-name>
> 		<url-pattern>/*</url-pattern>
> 		<dispatcher>REQUEST</dispatcher>
> 		<dispatcher>FORWARD</dispatcher>
> 	</filter-mapping>
> <!-- ... -->
> 
> 
> 
> Rusty Wright-2 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-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/preferred-way-to-jump-start-app-into-struts--tp25204817p25205646.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: preferred way to jump start app into struts?

Posted by Xyzr <xy...@gmail.com>.
I use this:

myapp/index.jsp 
(only 1 line of code)
-----------------------------------
<jsp:forward page="/start.action"/>


myapp/WEB-INF/web.xml
(notice "<dispatcher>FORWARD</dispatcher>"s)
-----------------------------------
<!-- ... -->
	<filter-mapping>
		<filter-name>StrutsPrepareFilter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>StrutsExecuteFilter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>
<!-- ... -->



Rusty Wright-2 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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/preferred-way-to-jump-start-app-into-struts--tp25204817p25205541.html
Sent from the Struts - User mailing list archive at Nabble.com.


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