Results 1 to 3 of 3
  1. #1
    braindump is offline Member
    Join Date
    Aug 2013
    Rep Power

    Default Problem with Webproject


    I used the maven archetype (webapp-javaee7 (codehaus mojo)):
    Problem with Webproject-unbenannt.png
    When go into the browser and use this link: 4) http://localhost:8080/testwebapp/HelloWorld.html everything is fine and looks good
    Java Code:
    <!DOCTYPE html>
    <html xmlns=""
            <title>Start Page</title>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <h1>Hello World! Ist das geil</h1>  
            <h1>Bean Test</h1>
        	<h:outputText value="HelloBean says: #{helloWorldBean.greeting}" />
    . Now I want to work with JSF so I created the following files:
    1) xhtml-template: default.xhtml
    2) css-file: default.css
    3) index.xhtml
    ... now I published my Glassfish and open the link http://localhost:8080/testwebapp/index.jsf and get
    Java Code:
    HTTP Status 404 - Not Found
    or when i tried open http://localhost:8080/testwebapp/index.xhtml I get
    Java Code:
    XML-Verarbeitungsfehler: Kein Element gefunden
    Adresse: http://localhost:8080/testwebapp/index.xhtml
    Zeile Nr. 1, Spalte 1:
    Java Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ui:composition xmlns="" xmlns:ui="" template="webapp/templates/default.xhtml">
    	<ui:define name="content">
    		<h1>Willkommen auf der Homepage!</h1>
    		<h1>Bean Test</h1>
        	<h:outputText value="HelloBean says: #{helloWorldBean.greeting}" />
    Java Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "">
    <html xmlns="" xmlns="" xmlns="">
    		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    		<h:outputStylesheet name="css/default.css" />
    		<div id="container">
    			<div id="header">
    			<div id="content">
    				<ui:insert name="content">
    					<!-- [Template content will be inserted here] -->
    			<div id="header">
    				<p> (C) 2013 </p>
    Java Code:
    body {
    	margin: 0;
    	padding: 0; 
    	background-color: #EAECEE;
    	font-family: Verdana, sans-serif;
    	font-size: 0.9em;
    #container {
    	margin: 0 auto;
    	padding: 0 20px 10px 20px;
    	border: 1px solid #666666;
    	width: 865px;
    	padding-top: 10px;
    	font-size: 1.3em;
    	border: 1px solid #666666;
    	background: #EAECEE;
    	padding: 0 15px 5px 15px;
    	margin-bottom: 50px;
    	clear: both;
    	text-align: center;
    	color: #666666;
    	font-size: 0.85em;
    	padding: 3em 0 0 0;
    h2 {
    	font-size: 1.2em;
    What ist the problem? Why I get this errors?

    Best regards
    Last edited by braindump; 09-11-2013 at 01:33 PM.

  2. #2
    braindump is offline Member
    Join Date
    Aug 2013
    Rep Power

    Default Re: Problem with Webproject

    No ideas? Someone need mor informations?

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Rep Power

    Default Re: Problem with Webproject

    Probably because the jsf servlet is not mapped to *.jsf but to *.xhtml. That's what I would do at least. The truth is in the web.xml file. And in a decent book on JSF.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 0
    Last Post: 11-07-2012, 01:44 PM
  2. Small problem with problem with Java, C++ parse program.
    By dragstang86 in forum New To Java
    Replies: 4
    Last Post: 10-30-2011, 04:43 AM
  3. Replies: 9
    Last Post: 09-21-2010, 05:15 PM
  4. MyEclipse can not create webproject
    By Burglar_Cat in forum Eclipse
    Replies: 0
    Last Post: 05-27-2010, 04:27 AM
  5. simple line problem / for loop problem
    By helpisontheway in forum New To Java
    Replies: 1
    Last Post: 11-17-2009, 07:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts