This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I do this for the weclome-file. I have an index.jsp that has the following code:
So when the user goes to http://whatever/appname the get automatically redirected to my welcome page which is a faces page. Is that what you were looking for?
A little reasoning: JSF and the welcome-file part of web.xml don't work together. MyFaces has a welcome file filter that is supposed to make it work, but I have been unable to get it to work correctly.
I would like to (auto)forward in the first page of my app (without user influence). But I dont know how to activate an action with this "forward".
If I use <JSP:FORWARD ...> no action is being activated...
Has JSF something there? Or there is another way...
I faced this problem too, couldn't look into it but did managed to find a work around.
I created a page, with a button (I hided the button with DHTML). Now "onload" of that page, I "clicked" the button "programmatically", hence the action method of button was called and in the action method, I used NavigationHandler.handleNavigation to direct the request to the page I wanted. Thuogh it worked perfectly, I know it's probably ugly [ December 29, 2004: Message edited by: K Varun ]
Joined: Aug 15, 2003
Gregg: but you are not going through an action to that welcome page (or ...?). That is the functionality I am looking for.
Varun: is funny, I was also thinking in such a solution. And beside the style problem (as you said, not looking very well), I though the user will see a flicker (because of the page being loaded and immediately submited). Is that happening to you?
Joined: May 30, 2002
Originally posted by Javoso Torso:
I though the user will see a flicker (because of the page being loaded and immediately submited). Is that happening to you? Regards, Javo
We use a "please wait" kind of image, whenever user submits any request. I put that image in this page too, hence there wasn't any break.
But even if you use jsp:forward, that page will appear momentarily so instead of jsp:forward you can use this approach.
But again, it's dodgy. I have seen examples of jsp:include in sun specs. jsp:forward should also work.