it works after removing slash. Thanks!
David Chandler <[EMAIL PROTECTED]> wrote:
  Try dropping the leading slash (/) in /index.jsf.

/dmc

On 12/8/06, Dave wrote:
> I followed the instructions, added
> index.jsf (empty)
> index.jsp (code)
>
> and defined the welcome-file-list in web.xml.
> 
> /index.jsf
> 
>
> the first(welcome) page loading was successful. but when I clicked any
> commandLink in the page, I got
> The page cannot be displayed
> and the IE browser address became:
> http://index.jsf
>
> the host and port number is missing from the URL. it should be the same,
> http://localhost:8080/ , or http://localhost:8080/index.jsf
>
> Thanks for help.
>
> Dave
>
> Andrew Robinson wrote:
> Maybe a little more clear:
>
> index.jsf (empty)
> index.jsp (code)
>
> Or with facelets:
> index.jsf (empty)
> index.xhtml (code)
>
> Of course if you use path mapping like "/faces/*" instead of extension
> mapping (*.jsf) you don't need to do any of this.
>
> -Andrew
>
>
>
> On 12/7/06, Nebinger, David wrote:
> >
> >
> > No, create an index.jsf as an empty file in the root of the war. Then set
> > the welcome file entry to index.jsf in the web.xml file.
> >
> > If you're using '.faces' as your standard extension, replace the '.jsf'
> > above with '.faces'.
> >
> > Basically the welcome file entry will tell the servlet that if no file is
> > specified, then use the one specified. However, the one specified must be
> a
> > real file from the root of the web app, so the index.jsf file must exist
> > (although it can be empty).
> >
> > Once the servlet determines that it should load index.jsf (or
> index.faces),
> > when it routes through the dispatcher the faces servlet will intercept and
> > treat it as a faces request, ignoring the empty index.jsf file that you
> > created.
> >
> >
> > -----Original Message-----
> > From: Dave [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 07, 2006 11:42 PM
> > To: MyFaces Discussion
> > Subject: Re: URL for home page(index.jsp) without redirect
> >
> >
> > two index.jsf (s)?
> > I tried one index.jsf(home page) and empty index.jsp. It did not work.
> >
> > Andrew Robinson wrote:
> > put "index.jsf" as your welcome page, then create an empty index.jsf
> > file in that directory (it just needs to exist for the container to
> > find it)
> >
> > On 12/6/06, Dave wrote:
> > > Hello, home page URL
> > >
> > > http://www.youdomain.com/
> > >
> > > the URL first access index.jsp(JSP page) which then redirect to a JSF
> > page.
> > >
> > > Any better way to avoid a redirect? Thanks!
> > >
> > >
> > > ________________________________
> > > Access over 1 million songs - Yahoo! Music Unlimited.
> > >
> > >
> >
> >
> >
> > ________________________________
> > Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and
> > get things done faster.
> >
> >
>
>
>
> ________________________________
> Everyone is raving about the all-new Yahoo! Mail beta.
>
>


-- 
David Chandler
Development Coach
learnjsf.com


 
---------------------------------
Have a burning question? Go to Yahoo! Answers and get answers from real people 
who know.

Reply via email to