File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSF Newbie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Newbie" Watch "JSF Newbie" New topic
Author

JSF Newbie

Jotnarta Jot
Greenhorn

Joined: May 18, 2006
Posts: 24
Hi All
I am new on JSF and I am trying to develope a small page that displays a texbox from JSF library. I defined the ServletFaces class in the web.xml file as following:

I've created a jsp page called contribute.jsp that contains the following:


The last page is a HTML file that calls the above faces page like following:


But, when I run the application a download dialog appears that ask me to save the contribute.jsp page to disk. I am using Eclipse IDE and JBoss 5 AS, any help please??

jotnarta
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16140
    
  21

You'll get that message when your browser doesn't know what to do with the data that is being returned to it. Try contentType="text/html".

Also, lose the <META> tag. It's not only redundant (since you indicated contentType on the <%@ page directive), it's positively dangerous. I just spent 3 weeks going stark raving mad because forms being submitted weren't providing the control values. Some clown had coded a META tag that redefined the content type.

Plus, I don't even guarantee that META content type will work properly on all browsers or all versions of IE or even individual versions of IE with different DOCTYPES (which I like to call their "select-a-bug" feature).


Customer surveys are for companies who didn't pay proper attention to begin with.
Lars Vogel
Ranch Hand

Joined: Oct 10, 2007
Posts: 55
A detailed step-by-step description of creating a simple JSF application (including a textbox) can be found here: JavaServer Faces with Eclipse - Tutorial

Best regards, Lars


Tutorials about Java, Eclipse and Webprogramming http://www.vogella.de
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Newbie