• Post Reply Bookmark Topic Watch Topic
  • New Topic

hello world application not running  RSS feed

gargi joshi
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone please help.....its urgent................
my files are as follows

package hello;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
public class Hello {
final String world="Helllo World !";
public String getworld() {
return world;

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<servlet-name>Faces Servlet</servlet-name>
<servlet-name>Faces Servlet</servlet-name>


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">
<title>My Facelets Page</title>




<?xml version="1.0" encoding="UTF-8"?>

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"

Tim Holloway
Posts: 18715
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Joshi!

We have a series of FAQs that can help you use the Ranch more effectively (https://www.coderanch.com/how-to/java/HowToAskQuestionsOnJavaRanch). One of them concerns the futility of asking "urgent" questions. We're not paid to be here 24x7 (or at all, for that matter) so it can take quite a while for someone to show up and answer. This one is also worth noting:

One thing that probably we don't have in a FAQ is that our "Code" button in the message editor is very useful for taking preformatted code (and XML) and displaying it in a more readable way.

You didn't provide any details, but I think probably your error is that you don't have the JSF "f:view" elements defined for your View Template.

Aakash Saxena
Posts: 13
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just in case, your code still ain't running , try following in your front end file :

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!