Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 68506 invoked from network); 5 Dec 2008 10:54:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2008 10:54:17 -0000 Received: (qmail 74456 invoked by uid 500); 5 Dec 2008 10:54:18 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 74383 invoked by uid 500); 5 Dec 2008 10:54:18 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 74351 invoked by uid 99); 5 Dec 2008 10:54:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 02:54:17 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of antongavazuk@gmail.com designates 74.125.78.150 as permitted sender) Received: from [74.125.78.150] (HELO ey-out-1920.google.com) (74.125.78.150) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 10:52:45 +0000 Received: by ey-out-1920.google.com with SMTP id 4so2078613eyg.24 for ; Fri, 05 Dec 2008 02:53:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=BVZrL8lkUa+ei5LaU5k5fT99CY6vfm/gQzgzzQvYfS4=; b=MZ9AqX7UD6x3/o5cdUJGs10Bq37QHDjELuZ4iHnxirh9zA553jqFBnrXmRKq9xUptv vnpVY179DrN1mac8l3ZvLUFHucVXycRjPcUpqjOeooYdrHd0IgzcDCcB6hqodzewUaKx HYKUmZTQ0lvp/oaOeIFCKmzrXZX9dd7DqxDyk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=A6yIbOAL17WrQnLpbH404q7S0cOWCz52w5McfKp1iXiYW7SH5mWNHEDWoyIacfko+J 8WfHQKjs1S0yn9sOTcHtMtCUaZcXG9o/VDcvrA5kh8J7FabeHrV8MJdDx9shL7ziEeP3 yvM+SYdlYo2RriAAu44VnhhQCu33nXe1GpmFQ= Received: by 10.210.87.14 with SMTP id k14mr17203058ebb.159.1228474402418; Fri, 05 Dec 2008 02:53:22 -0800 (PST) Received: by 10.210.23.14 with HTTP; Fri, 5 Dec 2008 02:53:22 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2008 12:53:22 +0200 From: "Anton Gavazuk" To: "MyFaces Discussion" Subject: Re: How to redirect page in JSF In-Reply-To: <2332f63b0812050237j2f75c890o6652e99b37295a0d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <444067.28134.qm@web95415.mail.in2.yahoo.com> <428350.61634.qm@web95406.mail.in2.yahoo.com> <2332f63b0812050237j2f75c890o6652e99b37295a0d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hmm, cool requirement :) ok - on first thoughts - you can handle somehow "not found event" (for example by overriding default ErrorHandler in MyFaces config) and do with NavigationHandler needed forward/redirect for example - in Errorhandler you have access to FacesContext class YOurErrorHandler{ //determine to which view you should go when requested file/view not found //get navigationHandler navigationHandler.handleNavigation(context, null, nameOfneededRootView); } and put for every such case in faces config such thing nameOfneededRootView blablabla.jsp Hope it will help 2008/12/5 Gerhard Petracek : > hello, > > with jsp: > > web.xml > > index.jsp > > > then you can place an index.jsp file in the target folder > sample content: > <%@ page session="false"%> > <% > response.sendRedirect("directory_default_page.jsf"); > %> > > or with html: > > web.xml > > index.html > > > then you can place an index.html file in the target folder > sample content: > > > > > > > as anton mentioned: > please don't use it instead of navigation rules. > > regards, > gerhard > > > > 2008/12/5 VIJAY SONAWANE >> >> Thanks for reply Anton, >> >> >> >> what I am trying to do is when user only enters url upto the >> folder name where the actual page to be displayed is present >> Example: I have folder User in my project structure. >> So now if the user wants to access the page which is in this folder but >> by mistake if the user doesn't provide the page name in the URL,but provides >> till the folder where the page is included in ( i.e .http://myserver/users/ >> ) >> then it should show page http://myserver/users/userhome.html. >> >> >> >> ________________________________ >> From: Anton Gavazuk >> To: MyFaces Discussion >> Sent: Friday, 5 December, 2008 3:22:16 PM >> Subject: Re: How to redirect page in JSF >> >> Hi >> I dont understand you problem, >> >> what are you expecting? >> >> redirect in jSF could be done for example in navigation rules in faces >> config file. >> >> 2008/12/5 VIJAY SONAWANE : >> > Hi all, >> > >> > I am new to JSF. >> > I am facing one problem of url redirecting. >> > i.e. if user enters url like this >> > http://myserver/project1/viewers/ >> > then he/she redirected to default page >> > http://myserver/project1/viewers/viewersHome.html page. >> > >> > note : all my pages are in xhtml >> > >> > thanks in advance >> > >> > Vj++ >> > >> > >> > >> > ________________________________ >> > Add more friends to your messenger and enjoy! Invite them now. >> >> ________________________________ >> Be the first one to try the new Messenger 9 Beta! Click here. > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces >