-
1. Web application project file structure.
nickarls Feb 19, 2011 3:03 PM (in response to samwun9988)WEB-INF isn't usually for pages.
-
2. Web application project file structure.
samwun9988 Feb 19, 2011 5:45 PM (in response to nickarls)Hello, thank you for your response.
I have moved the "resources" and "templates" folders to under "web" like this:
web
-- WEB-INF
-- templates
|-- layout_with_right_left.xhtml
-- resources
|-- css
|-- images
|-- scripts
-- index.xhtml
Now I changed my xhtml like this:
[b]layout_with_right_left.xhtml:[/b]
[code=java]<?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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/resources/css/style.css" rel="stylesheet" type="text/css" />
<title>Facelets Template</title>
</h:head>[/code]
[b]index.xhtml:[/b]
[code=java]
<?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:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:composition template="/templates/layout_with_right_left.xhtml">
<ui:define name="login_register">
<p class="topnav">Login | Register</p>
</ui:define>[/code]
After deployed the file, browsed to the index.xhtml page, I still can't see the styles applied to the xhtml page.
I have verified that the xhtml files are updated in the jboss server tmp directory.
Thanks
Sam
-
3. Web application project file structure.
samwun9988 Feb 19, 2011 7:31 PM (in response to samwun9988)Alright, after further investigation, I found that the web.xml is missing from the WEB-INF/ folder.
Now is excuting the page and its css styles... and now further into another problem. I will open another thread for that.
Thanks
Sam