Dear All,

I've tried the Hello World example with CSS, it is even more strange; not only Asset, but also inline <style> with HTML. With this example, I can see /Tapestry/css/helloCSS.css in the browser, but the background color was not applied. I'm confused now, shall I even bind something to <body> ? Actually I even put a non-sense <body jwcid="@Body"> there.

Home.html:

<!-- <html jwcid="@Shell" title="Tutorial: HelloWorld" stylesheet="asset:helloCSS"> -->
<html>
 <head>
   <style type="text/css">
       body { background-color: "green"; }
   </style>
   <title>Tutorial: HelloWorld</title>
 </head>
 <body jwcid="@Body">
   <h1>HelloWorld Tutorial</h1>
<p>
 The current data and time is:
<strong><span jwcid="@Insert" value="ognl:new java.util.Date()">June 26 2005</span></strong> </p> </body>
</html>

css/helloCSS.css:
<style type="text/css">
   body { background-color: "green"; }
</style>

Home.page
<?xml version="1.0"?>
<!DOCTYPE page-specification PUBLIC
 "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
 "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
<page-specification>
   <!-- <asset name="helloCSS" path="context:/css/helloCSS.css"/> -->
</page-specification>

web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
   xmlns:xsi="http://www.w3.org/TR/xmlschema-1/";
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
   version="2.4">

 <display-name>Tutorial: HelloWorld</display-name>
 <servlet>
   <servlet-name>app</servlet-name>
   <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
   <load-on-startup>0</load-on-startup>
 </servlet>
 <servlet-mapping>
   <servlet-name>app</servlet-name>
   <url-pattern>/app</url-pattern>
 </servlet-mapping>
</web-app>


   Thank you for your precious time.

   Best Regards,
Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • Re: Asset, CSS, and Fri... Tian-Jian \"Barabbas\" [EMAIL PROTECTED]

Reply via email to