I am writing a portlet, and try it with css. Following the reference guide, I created jboss-portlet.xml under WEB-INF with the content:
| <?xml version="1.0" encoding="UTF-8"?> | <!DOCTYPE portlet-app PUBLIC | "-//JBoss Portal//DTD JBoss Portlet 2.6//EN" | "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd"> | <portlet-app> | <portlet> | <portlet-name>InventoryPortlet</portlet-name> | <header-content> | <link rel="stylesheet" type="text/css" href="/style.css"/> | </header-content> | </portlet> | </portlet-app> | And I placed the style.css under .war with simple content just for test: | body { | background:rgb(100, 100, 0) | } | | table { | border:1px solid rgb(100, 100, 0); | height:600px | } | I got the follwing exception when I accessed the portlet: | 09:40:10,734 ERROR [STDERR] 2008-10-8 9:40:10 com.sun.facelets.FaceletViewHandle | r handleRenderException | 严é: Error Rendering View[/style.css] | com.sun.facelets.FaceletException: Error Parsing /style.css: Error Traced[line: | 1] Content is not allowed in prolog. | at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234) | | at com.sun.facelets.compiler.Compiler.compile(Compiler.java:105) | at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFace | letFactory.java:197) | at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFacelet | Factory.java:144) | at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFacelet | Factory.java:95) | at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java | :517) | at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.jav | a:567) | at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWra | pper.java:108) | at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.j | ava:189) | at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderRes | ponseExecutor.java:41) | at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java: | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180908#4180908 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180908 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
