[JBoss Seam] - Re: Using facelets in .xml files
by utiba_davidr
The following defines what file extension to look up:
<context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
And the following defined what extension to provide in the URL to match the .xhtml file:
<filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
Based on this, it would appear that you can have multiple definitions for the URL extension to map as it's a filter. But you can only map these to one extension to look up - unless you do some fancy stuff like overload the ViewHandler (http://www.nabble.com/mixing-clay-full-html-and-full-xml-views-t2070241.html).
So, to make it prettier; Define two entry point extension to provide in the URL to match the .xhtml file:
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <url-pattern>*.xml</url-pattern>
| </filter-mapping>
|
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
Then make a request to http://localhost:8080/context/goals.xml which will render a file named "goals.xhtml".
Cheers,
David
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057922#4057922
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057922
18Â years, 10Â months
[JBoss Seam] - log4j error in Tomcat 6
by tptackab
I'm seeing this NullPointer error when I shutdown Tomcat 6.0.13:
INFO: Stopping service Catalina
| Jun 26, 2007 4:49:57 PM org.apache.catalina.core.ApplicationContext log
| INFO: SessionListener: contextDestroyed()
| Jun 26, 2007 4:49:57 PM org.apache.catalina.core.ApplicationContext log
| INFO: ContextListener: contextDestroyed()
| ContextListener: attributeRemoved('com.sun.faces.config.WebConfiguration', 'com.sun.faces.config.WebConfiguration@1aadcc6')
| 16:49:57,541 INFO [SessionFactoryImpl] closing
| Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@c9d448
| Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@ba3671
| Jun 26, 2007 4:49:57 PM org.apache.coyote.http11.Http11Protocol destroy
| INFO: Stopping Coyote HTTP/1.1 on http-8080
| Exception in thread "Thread-2" java.lang.NullPointerException
| at org.apache.log4j.helpers.PatternConverter.spacePad(PatternConverter.java:98)
| at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:71)
| at org.apache.log4j.PatternLayout.format(PatternLayout.java:495)
| at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
| at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
| at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
| at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
| at org.apache.log4j.Category.callAppenders(Category.java:187)
| at org.apache.log4j.Category.forcedLog(Category.java:372)
| at org.apache.log4j.Category.log(Category.java:864)
| at org.jboss.logging.Log4jLoggerPlugin.info(Log4jLoggerPlugin.java:160)
| at org.jboss.logging.Logger.info(Logger.java:187)
| at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap$Shutdown.run(StandaloneBootstrap.java:123)
I'm using the following log4j config file just as I found it in the JPA (tomcat pojo) example in Seam 1.3.0 ALPHA:
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- Log4j Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <!-- $Id: log4j.xml,v 1.1 2006/11/08 09:38:58 myuan Exp $ -->
|
| <!--
| | For more configuration infromation and examples see the Jakarta Log4j
| | owebsite: http://jakarta.apache.org/log4j
| -->
|
| <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
|
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Target" value="System.out"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>
| </layout>
| </appender>
|
| <!--
| <category name="org.hibernate">
| <priority value="DEBUG"/>
| </category>
| -->
|
| <!--
| <category name="org.jboss.seam">
| <priority value="DEBUG"/>
| </category>
| -->
|
| <!--
| <category name="org.jboss.kernel">
| <priority value="DEBUG"/>
| </category>
| -->
|
| <root>
| <priority value="INFO"/>
| <appender-ref ref="CONSOLE"/>
| </root>
|
| </log4j:configuration>
|
I'm using the exact same library set from the JPA example except the two el-*.jar libs (wouldn't run with those in place).
The application seems to work fine, it's just the exception on shutdown makes me nervous.
Is this an indication of trouble elsewhere? Any suggestions on how to make it go away would be very much appreciated.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057920#4057920
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057920
18Â years, 10Â months
[Remoting] - Re: Un/Marshaller not found
by hurzeler
Please help I am really stuck.
I use JBoss 4.0.5GA with Jboss remoting 1.4.0. The question is how do I get the socket server configured so that it accepts simple text. I have created three extra classes SimpleInputStreamWrapper which just returns the input and outputstreams and the two marshallers like:
| package com.test.socket.V75SocketServer;
|
| import java.io.BufferedReader;
| import java.io.IOException;
| import java.io.InputStream;
| import java.io.InputStreamReader;
| import java.io.Reader;
| import java.util.Map;
|
| import org.jboss.remoting.marshal.serializable.SerializableUnMarshaller;
|
| /**
| * @author hurzeler
| *
| */
| public class TextUnMarshaller extends SerializableUnMarshaller
| {
|
| /**
| *
| */
| private static final long serialVersionUID = -5026128440188409051L;
|
| /**
| *
| */
|
| public TextUnMarshaller(){}
|
| @Override
| public Object read(InputStream is, Map map) throws IOException, ClassNotFoundException
| {
| StringBuffer buffer = new StringBuffer();
| try {
| InputStreamReader isr = new InputStreamReader(is, "UTF8");
| Reader in = new BufferedReader(isr);
| int ch;
| while ((ch = in.read()) > -1) {
| buffer.append((char)ch);
| }
| in.close();
| return buffer.toString();
| } catch (IOException e) {
| e.printStackTrace();
| return null;
| }
|
| }
|
| }
However the un/marshaller gets never called.
Please help!!!
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057919#4057919
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057919
18Â years, 10Â months
[Installation, Configuration & Deployment] - Log4JLogger' cannot be found or is not useable
by woohoo
hi all,
I have a completely new installation of jboss-4.2.0.GA.
when starting it for the first time, I got the following exception (more than once):
"org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable."
when googling for this phrase I get between 7 and 50 (!) hits (read: as good as nothing...so it doesn't seem to be a common problem), depending on whether I search for the exact phrase or not - and none of these proved helpful.
well, one seemed promising: it's from the jakarta-commons wiki (http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions, the last one at the bottom).
following this, I verified that the Log4J.class in commons-logging.jar has an overloaded constructor with a String argument (not only the default one, which apparently yields problems). and yes, it does. I mean, no wonder, I did not change *anything*, the install is completely fresh.... any ideas?
BTW, I do NOT receive this exception with an older jboss-4.0.4.CR2 installation....
OS is Debian Linux (kubuntu).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057917#4057917
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057917
18Â years, 10Â months