• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

JSF Newbie

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 26290
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic