Seam SVN: r11249 - in branches/community/Seam_2_2: doc/Seam_Reference_Guide/en-US and 1 other directory.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2009-07-07 11:51:11 -0400 (Tue, 07 Jul 2009)
New Revision: 11249
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Text.xml
branches/community/Seam_2_2/seam-text.g
Log:
JBSEAM-4221, documented SeamTextParser and XSS sanitizer
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Text.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Text.xml 2009-07-07 13:27:47 UTC (rev 11248)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Text.xml 2009-07-07 15:51:11 UTC (rev 11249)
@@ -226,4 +226,72 @@
</section>
-</chapter>
\ No newline at end of file
+ <section>
+ <title>Using the SeamTextParser</title>
+
+ <para>
+ The <literal><s:formattedText/></literal> JSF component internally uses the
+ <literal>org.jboss.seam.text.SeamTextParser</literal>. You can use that class directly and implement
+ your own text parsing, rendering, or HTML sanitation procedure. This is especially useful if you have
+ a custom frontend for entering rich text, such as a Javascript-based HTML editor, and you want to validate
+ user input to protect your website against Cross-Site Scripting (XSS) attacks. Another usecase
+ are custom wiki text parsing and rendering engines.
+ </para>
+
+ <para>
+ The following example defines a custom text parser that overrides the default HTML sanitizer:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[public class MyTextParser extends SeamTextParser {
+
+ public MyTextParser(String myText) {
+ super(new SeamTextLexer(new StringReader(myText)));
+
+ setSanitizer(
+ new DefaultSanitizer() {
+ @Override
+ public void validateHtmlElement(Token element) throws SemanticException {
+ // TODO: I want to validate HTML elements myself!
+ }
+ }
+ );
+ }
+
+ // Customizes rendering of Seam text links such as [Some Text=>http://example.com]
+ @Override
+ protected String linkTag(String descriptionText, String linkText) {
+ return "<a href=\"" + linkText + "\">My Custom Link: " + descriptionText + "</a>";
+ }
+
+ // Renders a <p> or equivalent tag
+ @Override
+ protected String paragraphOpenTag() {
+ return "<p class=\"myCustomStyle\">";
+ }
+
+ public void parse() throws ANTLRException {
+ startRule();
+ }
+
+}]]></programlisting>
+
+ <para>
+ The <literal>linkTag()</literal> and <literal>paragraphOpenTag()</literal> methods are just some of many
+ you can override to customize rendered output. These methods generally return <literal>String</literal>.
+ See the Javadoc for more details.
+ </para>
+
+ <para>
+ Also consult the Javadoc of <literal>org.jboss.seam.text.SeamTextParser.DefaultSanitizer</literal> for
+ more information on what HTML elements, attributes, and attribute values or filtered by default.
+ </para>
+
+ </section>
+
+</chapter>
+
+
+<!--
+ <programlisting role="JAVA"><![CDATA[
+]]></programlisting>
+-->
\ No newline at end of file
Modified: branches/community/Seam_2_2/seam-text.g
===================================================================
--- branches/community/Seam_2_2/seam-text.g 2009-07-07 13:27:47 UTC (rev 11248)
+++ branches/community/Seam_2_2/seam-text.g 2009-07-07 15:51:11 UTC (rev 11249)
@@ -91,6 +91,7 @@
/**
* Implementation of the rules in http://wiki.whatwg.org/wiki/Sanitization_rules
*
+ * <pre>
* Changes and additions:
*
* 1. Expanded all -* wildcard values to their full CSS property name (e.g. border-*).
@@ -107,10 +108,10 @@
*
* 7. Not implemented filtering of CSS url() - it's an invalid value always.
*
- * 8. Removed all <form>, <input> and other form tags. Attackers might use them compromise "outer" forms when entering
- * markup in a textarea.
+ * 8. Removed all <form>, <input> and other form tags. Attackers might use them to compromise
+ * "outer" forms when entering such markup in a textarea.
+ * </pre>
*
- *
*/
public static class DefaultSanitizer implements SeamTextParser.Sanitizer {
15 years, 5 months
Seam SVN: r11248 - in branches/enterprise/JBPAPP_4_3_FP01/seam-gen: icefaces/build-scripts and 1 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-07 09:27:47 -0400 (Tue, 07 Jul 2009)
New Revision: 11248
Modified:
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build-scripts/.classpath
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/build-scripts/.classpath
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/nbproject/project.xml
Log:
removed jstl.jar from project classpaths
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build-scripts/.classpath
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build-scripts/.classpath 2009-07-07 12:34:47 UTC (rev 11247)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build-scripts/.classpath 2009-07-07 13:27:47 UTC (rev 11248)
@@ -16,8 +16,7 @@
<classpathentry kind="lib" path="lib/jbpm-jpdl.jar"/>
<classpathentry kind="lib" path="lib/antlr.jar"/>
<classpathentry kind="lib" path="lib/jgroups.jar"/>
- <classpathentry kind="lib" path="lib/jsf-facelets.jar"/>
- <classpathentry kind="lib" path="lib/jstl.jar"/>
+ <classpathentry kind="lib" path="lib/jsf-facelets.jar"/>
<classpathentry kind="lib" path="lib/jsf-api.jar"/>
<classpathentry kind="lib" path="lib/servlet-api.jar"/>
<classpathentry kind="lib" path="lib/testng.jar"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/build-scripts/.classpath
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/build-scripts/.classpath 2009-07-07 12:34:47 UTC (rev 11247)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/build-scripts/.classpath 2009-07-07 13:27:47 UTC (rev 11248)
@@ -17,7 +17,6 @@
<classpathentry kind="lib" path="lib/antlr.jar"/>
<classpathentry kind="lib" path="lib/jgroups.jar"/>
<classpathentry kind="lib" path="lib/commons-logging.jar"/>
- <classpathentry kind="lib" path="lib/jstl.jar"/>
<classpathentry kind="lib" path="lib/jsf-api.jar"/>
<classpathentry kind="lib" path="lib/servlet-api.jar"/>
<classpathentry kind="lib" path="lib/testng.jar"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/nbproject/project.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/nbproject/project.xml 2009-07-07 12:34:47 UTC (rev 11247)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/nbproject/project.xml 2009-07-07 13:27:47 UTC (rev 11248)
@@ -96,18 +96,18 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
<compilation-unit>
<package-root>src/model</package-root>
- <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate3.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
+ <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate3.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
<source-level>1.5</source-level>
</compilation-unit>
<compilation-unit>
<package-root>src/action</package-root>
- <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate3.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
+ <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate3.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
<source-level>1.5</source-level>
</compilation-unit>
<compilation-unit>
<package-root>src/test</package-root>
<unit-tests/>
- <classpath mode="compile">bootstrap:lib/hibernate-validator.jar:lib/hibernate3.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/testng.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
+ <classpath mode="compile">bootstrap:lib/hibernate-validator.jar:lib/hibernate3.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/testng.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
<source-level>1.5</source-level>
</compilation-unit>
</java-data>
15 years, 5 months
Seam SVN: r11247 - in branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources: META-INF and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-07 08:34:47 -0400 (Tue, 07 Jul 2009)
New Revision: 11247
Modified:
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev-war.xml
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev.xml
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod-war.xml
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod.xml
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/datasource-ds.xml
Log:
JBPAPP-2223
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev-war.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev-war.xml 2009-07-07 09:02:33 UTC (rev 11246)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev-war.xml 2009-07-07 12:34:47 UTC (rev 11247)
@@ -7,7 +7,7 @@
<persistence-unit name="@projectName@" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>@projectName@Datasource</jta-data-source>
+ <jta-data-source>java:/@projectName@Datasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="@hibernate.dialect@"/>
<property name="hibernate.hbm2ddl.auto" value="@hbm2ddl@"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev.xml 2009-07-07 09:02:33 UTC (rev 11246)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-dev.xml 2009-07-07 12:34:47 UTC (rev 11247)
@@ -7,7 +7,7 @@
<persistence-unit name="@projectName@">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>@projectName@Datasource</jta-data-source>
+ <jta-data-source>java:/@projectName@Datasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="@hibernate.dialect@"/>
<property name="hibernate.hbm2ddl.auto" value="@hbm2ddl@"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod-war.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod-war.xml 2009-07-07 09:02:33 UTC (rev 11246)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod-war.xml 2009-07-07 12:34:47 UTC (rev 11247)
@@ -7,7 +7,7 @@
<persistence-unit name="@projectName@" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>@projectName@Datasource</jta-data-source>
+ <jta-data-source>java:/@projectName@Datasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="@hibernate.dialect@"/>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod.xml 2009-07-07 09:02:33 UTC (rev 11246)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/META-INF/persistence-prod.xml 2009-07-07 12:34:47 UTC (rev 11247)
@@ -7,7 +7,7 @@
<persistence-unit name="@projectName@">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>@projectName@Datasource</jta-data-source>
+ <jta-data-source>java:/@projectName@Datasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="@hibernate.dialect@"/>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/datasource-ds.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/datasource-ds.xml 2009-07-07 09:02:33 UTC (rev 11246)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/datasource-ds.xml 2009-07-07 12:34:47 UTC (rev 11247)
@@ -6,7 +6,6 @@
<local-tx-datasource>
<jndi-name>@projectName@Datasource</jndi-name>
- <use-java-context>false</use-java-context>
<connection-url>@jdbcUrl@</connection-url>
<driver-class>@driverClass@</driver-class>
<user-name>@username@</user-name>
15 years, 5 months
Seam SVN: r11246 - in branches/community/Seam_2_2/src/main/org/jboss/seam: servlet and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-07 05:02:33 -0400 (Tue, 07 Jul 2009)
New Revision: 11246
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/Lifecycle.java
branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java
branches/community/Seam_2_2/src/main/org/jboss/seam/servlet/SeamListener.java
Log:
JBSEAM-2255
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/Lifecycle.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/Lifecycle.java 2009-07-06 20:16:17 UTC (rev 11245)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/Lifecycle.java 2009-07-07 09:02:33 UTC (rev 11246)
@@ -49,9 +49,14 @@
public static void endApplication()
{
+ endApplication(application);
+ }
+
+ public static void endApplication(Map<String,Object> app)
+ {
log.debug("Shutting down application and destroying contexts");
- Context tempApplicationContext = new ApplicationContext( getApplication() );
+ Context tempApplicationContext = new ApplicationContext( app );
Contexts.applicationContext.set(tempApplicationContext);
Contexts.destroy(tempApplicationContext);
Contexts.applicationContext.set(null);
@@ -244,9 +249,13 @@
}
}
-
public static void endSession(Map<String, Object> session)
{
+ endSession(session, application);
+ }
+
+ public static void endSession(Map<String, Object> session, Map<String,Object> app)
+ {
log.debug("End of session, destroying contexts");
//This code assumes that sessions are only destroyed at the very end of a
@@ -258,7 +267,7 @@
throw new IllegalStateException("Please end the HttpSession via org.jboss.seam.web.Session.instance().invalidate()");
}
- Context tempApplicationContext = new ApplicationContext( getApplication() );
+ Context tempApplicationContext = new ApplicationContext( app );
Contexts.applicationContext.set(tempApplicationContext);
//this is used just as a place to stick the ConversationManager
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2009-07-06 20:16:17 UTC (rev 11245)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2009-07-07 09:02:33 UTC (rev 11246)
@@ -141,7 +141,12 @@
public static void endApplication()
{
- Lifecycle.endApplication();
+ endApplication(servletContext);
+ }
+
+ public static void endApplication(ServletContext context)
+ {
+ Lifecycle.endApplication(new ServletApplicationMap( context));
servletContext=null;
}
@@ -152,7 +157,7 @@
public static void endSession(HttpSession session)
{
- Lifecycle.endSession( new ServletSessionMap(session) );
+ Lifecycle.endSession( new ServletSessionMap(session) , new ServletApplicationMap(session.getServletContext()));
}
public static void resumeConversation(HttpServletRequest request)
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/servlet/SeamListener.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/servlet/SeamListener.java 2009-07-06 20:16:17 UTC (rev 11245)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/servlet/SeamListener.java 2009-07-07 09:02:33 UTC (rev 11246)
@@ -38,7 +38,7 @@
public void contextDestroyed(ServletContextEvent event)
{
- ServletLifecycle.endApplication();
+ ServletLifecycle.endApplication(event.getServletContext());
}
public void sessionCreated(HttpSessionEvent event)
15 years, 5 months
Seam SVN: r11245 - branches/community/Seam_2_2/examples/blog/src/actions.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-07-06 16:16:17 -0400 (Mon, 06 Jul 2009)
New Revision: 11245
Modified:
branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java
Log:
JBSEAM-4257
Modified: branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java
===================================================================
--- branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java 2009-07-05 11:54:30 UTC (rev 11244)
+++ branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java 2009-07-06 20:16:17 UTC (rev 11245)
@@ -13,6 +13,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.Transactional;
import domain.BlogEntry;
/**
@@ -29,13 +30,13 @@
private FullTextEntityManager entityManager;
@Create
+ @Transactional
public void index() {
entityManager.purgeAll( BlogEntry.class );
List blogEntries = entityManager.createQuery("select be from BlogEntry be").getResultList();
for (Object be : blogEntries) {
entityManager.index(be);
}
- entityManager.flushToIndexes();
}
@Remove
15 years, 5 months
Seam SVN: r11244 - branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-05 07:54:30 -0400 (Sun, 05 Jul 2009)
New Revision: 11244
Modified:
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/components-war.xml
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/pages.xml
Log:
JBPAPP-2220
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/components-war.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/components-war.xml 2009-07-05 11:30:06 UTC (rev 11243)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/components-war.xml 2009-07-05 11:54:30 UTC (rev 11244)
@@ -25,9 +25,6 @@
conversation-id-parameter="cid"
parent-conversation-id-parameter="pid"/>
- <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
- <web:hot-deploy-filter url-pattern="*.seam"/>
-
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
entity-manager-factory="#{@projectName@EntityManagerFactory}"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/pages.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/pages.xml 2009-07-05 11:30:06 UTC (rev 11243)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/resources/WEB-INF/pages.xml 2009-07-05 11:54:30 UTC (rev 11244)
@@ -57,7 +57,7 @@
</redirect>
</exception>
- <exception class="org.jboss.seam.ConcurrentRequestTimeoutException" log-level="trace">
+ <exception class="org.jboss.seam.ConcurrentRequestTimeoutException">
<http-error error-code="503" />
</exception>
15 years, 5 months
Seam SVN: r11243 - branches/enterprise/JBPAPP_4_3_FP01/seam-gen.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-05 07:30:06 -0400 (Sun, 05 Jul 2009)
New Revision: 11243
Modified:
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build.xml
Log:
JBPAPP-2219
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build.xml 2009-07-05 11:18:59 UTC (rev 11242)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/build.xml 2009-07-05 11:30:06 UTC (rev 11243)
@@ -298,6 +298,10 @@
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
+ <condition property="driver.jar.default" value="${old.driver.jar}">
+ <equals arg1="${old.database.type}" arg2="${database.type.new}"/>
+ </condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:h2:.">
<equals arg1="${database.type.new}" arg2="h2"/>
</condition>
15 years, 5 months
Seam SVN: r11242 - branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-05 07:18:59 -0400 (Sun, 05 Jul 2009)
New Revision: 11242
Modified:
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml
Log:
JBPAPP-1928 - fixed back port
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml 2009-07-05 11:13:49 UTC (rev 11241)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml 2009-07-05 11:18:59 UTC (rev 11242)
@@ -46,25 +46,25 @@
<s:validateAll>
<p>
<b>seamBay User ID</b><br/>
- <h:inputText id="username" value="#{newuser.username}"/>
+ <h:inputText id="username" value="#{newuser.username}" required="true"/>
<div class="validationError"><h:message id="usernameMessage" for="username"/></div>
</p>
<p>
<b>Password</b><br/>
- <h:inputSecret id="password" value="#{newuser.password}"/>
+ <h:inputSecret id="password" value="#{newuser.password}" required="true"/>
<div class="validationError"><h:message id="passwordMessage" for="password"/></div>
</p>
<p>
<b>Confirm Password</b><br/>
- <h:inputSecret id="confirm" value="#{registerAction.confirm}"/>
+ <h:inputSecret id="confirm" value="#{registerAction.confirm}" required="true"/>
<div class="validationError"><h:message id="confirmMessage" for="confirm"/></div>
</p>
<p>
<b>Location</b><br/>
- <h:inputText id="location" class="location" value="#{newuser.account.location}"/>
+ <h:inputText id="location" class="location" value="#{newuser.account.location}" required="true"/>
<div class="validationError"><h:message id="locationMessage" for="location"/></div>
</p>
15 years, 5 months
Seam SVN: r11241 - branches/enterprise/JBPAPP_4_3_FP01/examples.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-05 07:13:49 -0400 (Sun, 05 Jul 2009)
New Revision: 11241
Modified:
branches/enterprise/JBPAPP_4_3_FP01/examples/build.xml
Log:
JBPAPP-1913 - fixed usage of property example.ds
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/build.xml 2009-07-03 23:48:35 UTC (rev 11240)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/build.xml 2009-07-05 11:13:49 UTC (rev 11241)
@@ -748,7 +748,7 @@
<exclude name="**/*.jar" />
</fileset>
</delete>
- <delete file="${deploy.dir}/${example.ds}.xml" failonerror="no" />
+ <delete file="${deploy.dir}/${example.ds}" failonerror="no" />
<delete dir="${ear.deploy.dir}" failonerror="no" />
<!-- <delete failonerror="no">
<fileset dir="${deploy.dir}">
@@ -939,7 +939,7 @@
<target name="jbosswar.unexplode" description="Undeploy the example from JBoss">
<delete dir="${deploy.dir}/${example.name}.war" />
- <delete file="${deploy.dir}/${example.ds}.xml" failonerror="no" />
+ <delete file="${deploy.dir}/${example.ds}" failonerror="no" />
</target>
<!-- #################### TEST TARGETS (JBOSS AS) ##################### -->
15 years, 5 months
Seam SVN: r11240 - in branches/community/Seam_2_2/examples/hibernate: resources-tomcat/WEB-INF/classes and 1 other directory.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-07-03 19:48:35 -0400 (Fri, 03 Jul 2009)
New Revision: 11240
Modified:
branches/community/Seam_2_2/examples/hibernate/build-glassfish.xml
branches/community/Seam_2_2/examples/hibernate/build-tomcat55.xml
branches/community/Seam_2_2/examples/hibernate/build-tomcat6.xml
branches/community/Seam_2_2/examples/hibernate/build-weblogic92.xml
branches/community/Seam_2_2/examples/hibernate/build-websphere61.xml
branches/community/Seam_2_2/examples/hibernate/resources-tomcat/WEB-INF/classes/log4j.xml
Log:
JBSEAM-4274
Modified: branches/community/Seam_2_2/examples/hibernate/build-glassfish.xml
===================================================================
--- branches/community/Seam_2_2/examples/hibernate/build-glassfish.xml 2009-07-03 22:29:39 UTC (rev 11239)
+++ branches/community/Seam_2_2/examples/hibernate/build-glassfish.xml 2009-07-03 23:48:35 UTC (rev 11240)
@@ -26,12 +26,14 @@
<include name="lib/dom4j.jar" />
<!-- Hibernate and deps -->
- <include name="lib/hibernate.jar"/>
+ <include name="lib/hibernate-core.jar"/>
<include name="lib/hibernate-commons-annotations.jar"/>
<include name="lib/hibernate-annotations.jar"/>
<include name="lib/hibernate-entitymanager.jar"/>
<include name="lib/hibernate-validator.jar"/>
-
+
+ <include name="lib/slf4j-api.jar"/>
+ <include name="lib/slf4j-log4j12.jar"/>
<include name="lib/asm.jar" />
<include name="lib/cglib.jar"/>
<include name="lib/antlr.jar" />
Modified: branches/community/Seam_2_2/examples/hibernate/build-tomcat55.xml
===================================================================
--- branches/community/Seam_2_2/examples/hibernate/build-tomcat55.xml 2009-07-03 22:29:39 UTC (rev 11239)
+++ branches/community/Seam_2_2/examples/hibernate/build-tomcat55.xml 2009-07-03 23:48:35 UTC (rev 11240)
@@ -8,8 +8,8 @@
<!-- resources -->
<property name="resources.dir" value="resources-tomcat" />
- <property name="dist.dir" value="dist-tomcat55" />
- <property name="exploded-archives.dir" value="exploded-archives-tomcat55" />
+ <property name="dist.dir" value="dist-tomcat55" />
+ <property name="exploded-archives.dir" value="exploded-archives-tomcat55" />
<!-- Libraries to include -->
<property name="seam.ui.lib" value="true"/>
@@ -26,16 +26,19 @@
<include name="lib/commons-digester.jar"/>
<include name="lib/commons-lang.jar"/>
<include name="lib/commons-logging.jar"/>
+ <include name="lib/log4j.jar" />
<include name="lib/jsf-api.jar"/>
<include name="lib/jsf-impl.jar"/>
<include name="lib/jstl.jar"/>
<include name="lib/dom4j.jar" />
- <include name="lib/hibernate.jar"/>
+ <include name="lib/hibernate-core.jar"/>
<include name="lib/hibernate-commons-annotations.jar"/>
<include name="lib/hibernate-annotations.jar"/>
<include name="lib/hibernate-entitymanager.jar"/>
<include name="lib/hibernate-validator.jar"/>
<include name="lib/javassist.jar"/>
+ <include name="lib/slf4j-api.jar"/>
+ <include name="lib/slf4j-log4j12.jar"/>
<include name="lib/persistence-api.jar" />
<include name="lib/el-api.jar" />
<include name="lib/cglib.jar"/>
Modified: branches/community/Seam_2_2/examples/hibernate/build-tomcat6.xml
===================================================================
--- branches/community/Seam_2_2/examples/hibernate/build-tomcat6.xml 2009-07-03 22:29:39 UTC (rev 11239)
+++ branches/community/Seam_2_2/examples/hibernate/build-tomcat6.xml 2009-07-03 23:48:35 UTC (rev 11240)
@@ -21,20 +21,23 @@
<fileset id="noejb.war.lib.extras" dir="${seam.dir}">
<include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-collections.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-lang.jar"/>
- <include name="lib/commons-logging.jar"/>
+ <include name="lib/commons-collections.jar"/>
+ <include name="lib/commons-digester.jar"/>
+ <include name="lib/commons-lang.jar"/>
+ <include name="lib/commons-logging.jar"/>
+ <include name="lib/log4j.jar"/>
<include name="lib/jsf-api.jar" />
<include name="lib/jsf-impl.jar" />
<include name="lib/jstl.jar" />
<include name="lib/dom4j.jar" />
- <include name="lib/hibernate.jar" />
+ <include name="lib/hibernate-core.jar" />
<include name="lib/hibernate-commons-annotations.jar" />
<include name="lib/hibernate-annotations.jar" />
<include name="lib/hibernate-entitymanager.jar" />
<include name="lib/hibernate-validator.jar" />
- <include name="lib/asm.jar" />
+ <include name="lib/slf4j-api.jar" />
+ <include name="lib/slf4j-log4j12.jar" />
+ <include name="lib/asm.jar" />
<include name="lib/javassist.jar" />
<include name="lib/persistence-api.jar" />
<include name="lib/cglib.jar" />
Modified: branches/community/Seam_2_2/examples/hibernate/build-weblogic92.xml
===================================================================
--- branches/community/Seam_2_2/examples/hibernate/build-weblogic92.xml 2009-07-03 22:29:39 UTC (rev 11239)
+++ branches/community/Seam_2_2/examples/hibernate/build-weblogic92.xml 2009-07-03 23:48:35 UTC (rev 11240)
@@ -32,6 +32,7 @@
<include name="lib/commons-digester.jar" />
<include name="lib/commons-collections.jar" />
<include name="lib/commons-logging.jar" />
+
<!-- JSF (and related) implementation -->
<include name="lib/jsf-api.jar" />
<include name="lib/jsf-impl.jar" />
@@ -39,7 +40,7 @@
<include name="lib/el-api.jar" />
<!-- Hibernate and deps -->
- <include name="lib/hibernate.jar" />
+ <include name="lib/hibernate-core.jar" />
<include name="lib/hibernate-commons-annotations.jar" />
<include name="lib/hibernate-annotations.jar" />
<include name="lib/hibernate-entitymanager.jar" />
@@ -47,6 +48,8 @@
<include name="lib/persistence-api.jar" />
<include name="lib/cglib.jar" />
<include name="lib/antlr.jar" />
+ <include name="lib/slf4j-api.jar"/>
+ <include name="lib/slf4j-log4j12.jar"/>
</fileset>
<fileset id="noejb.war.extras" dir="${resources.dir}">
Modified: branches/community/Seam_2_2/examples/hibernate/build-websphere61.xml
===================================================================
--- branches/community/Seam_2_2/examples/hibernate/build-websphere61.xml 2009-07-03 22:29:39 UTC (rev 11239)
+++ branches/community/Seam_2_2/examples/hibernate/build-websphere61.xml 2009-07-03 23:48:35 UTC (rev 11240)
@@ -21,7 +21,7 @@
<import file="../build.xml" />
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
+ <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
<!-- Seam deps -->
<include name="lib/dom4j.jar" />
<include name="lib/javassist.jar"/>
@@ -29,7 +29,8 @@
<!-- Misc -->
<include name="lib/commons-beanutils.jar"/>
<include name="lib/commons-digester.jar"/>
- <include name="lib/commons-collections.jar"/>
+ <include name="lib/commons-collections.jar"/>
+
<!-- JSF (and related) implementation -->
<include name="lib/jsf-api.jar"/>
<include name="lib/jsf-impl.jar"/>
@@ -37,12 +38,14 @@
<include name="lib/el-api.jar" />
<!-- Hibernate and deps -->
- <include name="lib/hibernate.jar"/>
+ <include name="lib/hibernate-core.jar"/>
<include name="lib/hibernate-commons-annotations.jar"/>
<include name="lib/hibernate-annotations.jar"/>
<include name="lib/hibernate-entitymanager.jar"/>
<include name="lib/hibernate-validator.jar"/>
<include name="lib/persistence-api.jar" />
+ <include name="lib/slf4j-api.jar"/>
+ <include name="lib/slf4j-log4j12.jar"/>
<include name="lib/cglib.jar"/>
<include name="lib/antlr.jar" />
</fileset>
Modified: branches/community/Seam_2_2/examples/hibernate/resources-tomcat/WEB-INF/classes/log4j.xml
===================================================================
--- branches/community/Seam_2_2/examples/hibernate/resources-tomcat/WEB-INF/classes/log4j.xml 2009-07-03 22:29:39 UTC (rev 11239)
+++ branches/community/Seam_2_2/examples/hibernate/resources-tomcat/WEB-INF/classes/log4j.xml 2009-07-03 23:48:35 UTC (rev 11240)
@@ -17,7 +17,7 @@
<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"/>
+ <!-- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> -->
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
15 years, 6 months