[JBoss Seam] - Re: pageflow and parameters transmition
by gazadonf
Hi, and happy new year to all of you.
No i don't.
I suppressed all of myPageNamepage.xml in the WebContent and in my pages.xml i only have reference to my pagefolws.
Here is my pages.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <pages xmlns="http://jboss.com/products/seam/pages"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
| login-view-id="/login.xhtml"
| no-conversation-view-id="/index.xhtml">
|
| <page view-id="/login.xhtml">
| <navigation from-action="#{identity.login}">
| <rule if="#{identity.loggedIn}">
| <redirect view-id="/Activity.xhtml"/>
| </rule>
| </navigation>
| </page>
| <page view-id="/Activity.xhtml" login-required="true">
| <begin-conversation join="true" pageflow="monPageflow"/>
| </page>
|
| <page view-id="*">
| <navigation from-action="#{identity.logout}">
| <end-conversation/>
| <redirect view-id="/login.xhtml"></redirect>
| </navigation>
| </page>
|
|
| <exception class="org.jboss.seam.framework.EntityNotFoundException">
| <redirect view-id="/error.xhtml">
| <message>Not found</message>
| </redirect>
| </exception>
|
| <exception class="javax.persistence.EntityNotFoundException">
| <redirect view-id="/error.xhtml">
| <message>Not found</message>
| </redirect>
| </exception>
|
| <exception class="javax.persistence.OptimisticLockException">
| <end-conversation/>
| <redirect view-id="/error.xhtml">
| <message>Another user changed the same data, please try again</message>
| </redirect>
| </exception>
|
| <exception class="org.jboss.seam.security.AuthorizationException">
| <redirect view-id="/error.xhtml">
| <message>You don't have permission to do this</message>
| </redirect>
| </exception>
|
| <exception class="org.jboss.seam.security.NotLoggedInException">
| <redirect view-id="/login.xhtml">
| <message>Please log in first</message>
| </redirect>
| </exception>
|
| <exception class="javax.faces.application.ViewExpiredException">
| <redirect view-id="/error.xhtml">
| <message>Your session has timed out, please try again</message>
| </redirect>
| </exception>
|
| <exception class="javax.faces.application.IllegalNavigationException">
| <redirect view-id="/error.xhtml">
| <message>Your session has timed out, please try again</message>
| </redirect>
| </exception>
|
| <exception>
| <redirect view-id="/error.xhtml">
| <message>Unexpected error, please try again</message>
| </redirect>
| </exception>
|
|
|
| </pages>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116359#4116359
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116359
18 years, 3 months
[EJB 3.0] - Uploading multiple files from Client to server
by kaviarasu
Hi
i want to upload all files from a folder in Client to Server
Im using jsf as a front ent
When if i test it in client side with Server in same machine and checks for the folder and upload all files it working
But when the server is in remote palce how to upload all files from client folder to the server
I pasted my sample coding . I browse one file from the folder and using that i find the path to the folder and upload all fles from the folder
File f=new File(vname1);
File f1=new File(f.getParent());
int i=0;
if(f1.isDirectory())
{
for(File a:f1.listFiles())
{
FileInputStream fr = new FileInputStream(a); FileOutputStream fw = new FileOutputStream(new File(location1,a.getName()));
while((i=fr.read())!=-1)
{
fw.write(i);
}
fw.close();
fr.close();
}
the above code works when the server is in same machine
when the server is in remote place it not working
Thanks in advance
happy new year
Regards
Kaviarasu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116355#4116355
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116355
18 years, 3 months
[Beginners Corner] - Migrating to JBoss 4.2.2.GA
by puzz
Hi,
Before migrating we had a lot of
WARN [TxConnectionManager] Prepare called on a local tx. Use of local transactions on
a jta transaction with more than one branch may result in inconsistent data in some cases of failure
in our jboss log files.
Since we migrated it seems this warning instead generates an error.
I've also seen in other discussions that this warning now (in JBoss 4.2) generates errors.
I'm not really sure why we're getting the WARN/error in the first place.
An example of when the WARN/error is thrown:
A stateless EJB 3 session bean, where I use two other stateless beans to retrieve data from db. I try to retrieve the data from both stateless beans in the same method. And, voila, I get an error in JBoss 4.2 when retrieving data from the second stateless bean. I remember that the above mentioned WARN was generated when the method was done when we used an earlier version of JBoss.
Anyone has an idea what I should do to correct this?
/Best regards, Håkan Jacobsson - System developer in Sweden
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116354#4116354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116354
18 years, 3 months
[JBoss Seam] - Richfaces with Maven and Tomcat 6
by rmcalderero
Hello,
Is there any working 'mavenized' seam application with richfaces as one of its dependencies?
I've tried different dependencies in the pom based on some non official blogs, but none worked. Maybe some can provide one.
Our app was based on the jboss-seam-jpa example and is deployed under tomcat6. The app runs ok when the jars are included manually.
pom.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <project xmlns="http://maven.apache.org/POM/4.0.0"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
| <modelVersion>4.0.0</modelVersion>
| <groupId>org.fundacionctic.seam</groupId>
| <artifactId>monitor</artifactId>
| <packaging>war</packaging>
| <name>monitor</name>
| <version>0.1</version>
| <url>http://fundacionctic.org</url>
|
| <!--
| <pluginRepositories>
| <pluginRepository>
| <id>apache.snapshots</id>
| <url>
| http://people.apache.org/repo/m2-snapshot-repository/
| </url>
| </pluginRepository>
| </pluginRepositories>
| -->
|
| <build>
| <finalName>monitor</finalName>
| <plugins>
| <plugin>
| <artifactId>maven-war-plugin</artifactId>
| <configuration>
| <warSourceDirectory>WebContent</warSourceDirectory>
| </configuration>
| </plugin>
|
| <plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-compiler-plugin</artifactId>
| <configuration>
| <source>1.5</source>
| <target>1.5</target>
| <encoding>utf8</encoding>
| </configuration>
| </plugin>
|
| </plugins>
| </build>
|
|
| <repositories>
| <repository>
| <id>jboss.org</id>
| <name>jboss.org</name>
| <url>http://repository.jboss.com/maven2</url>
| </repository>
| </repositories>
|
|
| <dependencies>
|
| <dependency>
| <groupId>junit</groupId>
| <artifactId>junit</artifactId>
| <version>3.8.1</version>
| <scope>test</scope>
| </dependency>
|
| <!-- TestNG -->
| <dependency>
| <groupId>org.testng</groupId>
| <artifactId>testng</artifactId>
| <version>5.0</version>
| <classifier>jdk15</classifier>
| <scope>test</scope>
| </dependency>
|
| <dependency>
| <groupId>javax.servlet</groupId>
| <artifactId>servlet-api</artifactId>
| <version>2.5</version>
| <scope>test</scope>
| </dependency>
|
| <dependency>
| <groupId>javax.el</groupId>
| <artifactId>el-api</artifactId>
| <version>1.0</version>
| <scope>test</scope>
| </dependency>
|
| <!-- Seam -->
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| <version>2.0.0.GA</version>
| <exclusions>
| <exclusion>
| <artifactId>el-api</artifactId>
| <groupId>javax.el</groupId>
| </exclusion>
| </exclusions>
| </dependency>
|
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam-ui</artifactId>
| <version>2.0.0.GA</version>
| <exclusions>
| <exclusion>
| <artifactId>el-api</artifactId>
| <groupId>javax.el</groupId>
| </exclusion>
| </exclusions>
| </dependency>
|
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam-debug</artifactId>
| <version>2.0.0.GA</version>
| <exclusions>
| <exclusion>
| <artifactId>servlet-api</artifactId>
| <groupId>javax.servlet</groupId>
| </exclusion>
| <exclusion>
| <artifactId>el-api</artifactId>
| <groupId>javax.el</groupId>
| </exclusion>
| </exclusions>
| </dependency>
|
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-el</artifactId>
| <version>2.0.0.GA</version>
| <exclusions>
| <exclusion>
| <artifactId>el-api</artifactId>
| <groupId>javax.el</groupId>
| </exclusion>
| </exclusions>
| </dependency>
|
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam-mail</artifactId>
| <version>2.0.0.GA</version>
| </dependency>
|
| <!-- hibernate -->
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-validator</artifactId>
| <version>3.0.0.ga</version>
| </dependency>
|
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-annotations</artifactId>
| <version>3.3.0.ga</version>
| </dependency>
|
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-entitymanager</artifactId>
| <version>3.3.1.ga</version>
| </dependency>
|
| <!-- spring ldap y ldap booster pack -->
| <dependency>
| <groupId>org.springframework.ldap</groupId>
| <artifactId>spring-ldap</artifactId>
| <version>1.2</version>
| </dependency>
|
| <dependency>
| <groupId>com.sun</groupId>
| <artifactId>ldapbp</artifactId>
| <version>1.0</version>
| </dependency>
|
| <!-- log4j -->
| <dependency>
| <groupId>log4j</groupId>
| <artifactId>log4j</artifactId>
| <version>1.2.14</version>
| </dependency>
|
| <!-- mysql -->
| <dependency>
| <groupId>mysql</groupId>
| <artifactId>mysql-connector-java</artifactId>
| <version>5.0.4</version>
| </dependency>
|
| <!-- mail -->
| <dependency>
| <groupId>javax.mail</groupId>
| <artifactId>mail</artifactId>
| <version>1.4</version>
| </dependency>
|
| <!-- faces -->
|
| <dependency>
| <groupId>com.sun.facelets</groupId>
| <artifactId>jsf-facelets</artifactId>
| <version>1.1.14</version>
| </dependency>
|
| <dependency>
| <groupId>javax.servlet</groupId>
| <artifactId>jstl</artifactId>
| <version>1.1.2</version>
| </dependency>
|
| <!-- MyFaces
| <dependency>
| <groupId>org.apache.myfaces.core</groupId>
| <artifactId>myfaces-api</artifactId>
| <version>1.2.0</version>
| </dependency>
|
| <dependency>
| <groupId>org.apache.myfaces.core</groupId>
| <artifactId>myfaces-impl</artifactId>
| <version>1.2.0</version>
| </dependency>
| -->
|
| <!-- RichFaces -->
| <dependency>
| <groupId>org.richfaces</groupId>
| <artifactId>richfaces</artifactId>
| <version>3.0.0</version>
| </dependency>
|
| <!--
| <dependency>
| <groupId>org.richfaces</groupId>
| <artifactId>framework</artifactId>
| <version>3.1.0</version>
| </dependency>
| -->
| <!--
| <dependency>
| <groupId>org.richfaces.framework</groupId>
| <artifactId>richfaces-api</artifactId>
| <version>3.1.3.GA</version>
| </dependency>
| <dependency>
| <groupId>org.richfaces.framework</groupId>
| <artifactId>richfaces-impl</artifactId>
| <version>3.1.3.GA</version>
| <exclusions>
| <exclusion>
| <groupId>javax.faces</groupId>
| <artifactId>jsf-api</artifactId>
| </exclusion>
| <exclusion>
| <groupId>javax.faces</groupId>
| <artifactId>jsf-impl</artifactId>
| </exclusion>
| </exclusions>
| </dependency>
| <dependency>
| <groupId>org.richfaces.ui</groupId>
| <artifactId>richfaces-ui</artifactId>
| <version>3.1.3.GA</version>
| <exclusions>
| <exclusion>
| <groupId>javax.faces</groupId>
| <artifactId>jsf-api</artifactId>
| </exclusion>
| <exclusion>
| <groupId>javax.faces</groupId>
| <artifactId>jsf-impl</artifactId>
| </exclusion>
| </exclusions>
| </dependency>
| -->
|
| <!-- Tomahawk -->
| <dependency>
| <groupId>org.apache.myfaces.tomahawk</groupId>
| <artifactId>tomahawk-sandbox</artifactId>
| <version>1.1.6</version>
| </dependency>
|
| <!-- tomahawk-facelets -->
| <dependency>
| <groupId>com.google.code.tomahawk</groupId>
| <artifactId>tomahawk-facelets</artifactId>
| <version>1.1.6</version>
| </dependency>
|
|
| <!-- JSF RI
| <dependency>
| <groupId>javax.faces</groupId>
| <artifactId>jsf-api</artifactId>
| <version>1.2_04-p02</version>
| </dependency>
|
|
| <dependency>
| <groupId>javax.faces</groupId>
| <artifactId>jsf-impl</artifactId>
| <version>1.2_04-p02</version>
| </dependency>
| -->
|
| <!-- RichFaces
| <dependency>
| <groupId>org.richfaces.framework</groupId>
| <artifactId>richfaces-impl</artifactId>
| <version>3.1.2.GA</version>
| </dependency>
|
| <dependency>
| <groupId>org.richfaces.framework</groupId>
| <artifactId>richfaces-api</artifactId>
| <version>3.1.2.GA</version>
| </dependency>
|
| <dependency>
| <groupId>org.richfaces.ui</groupId>
| <artifactId>richfaces-ui</artifactId>
| <version>3.1.2.GA</version>
| </dependency>
| -->
|
| </dependencies>
| </project>
|
exception in tomcat
| 02-ene-2008 11:58:41 org.apache.catalina.core.StandardContext listenerStart
| GRAVE: Error configurando escuchador de aplicación de clase com.sun.faces.config.ConfigureListener
| java.lang.NoClassDefFoundError: javax/faces/FacesException
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
| at java.lang.Class.getConstructor0(Unknown Source)
| at java.lang.Class.newInstance0(Unknown Source)
| at java.lang.Class.newInstance(Unknown Source)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3774)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
| at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
| at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
| at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
| at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
| at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
| at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
| at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
| at org.apache.catalina.core.StandardService.start(StandardService.java:516)
| at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
| at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
| at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
| 02-ene-2008 11:58:41 org.apache.catalina.core.StandardContext listenerStart
| GRAVE: Error configurando escuchador de aplicación de clase com.sun.faces.application.WebappLifecycleListener
| java.lang.NoClassDefFoundError: javax/faces/FacesException
| at com.sun.faces.application.WebappLifecycleListener.<clinit>(WebappLifecycleListener.java:67)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at java.lang.Class.newInstance0(Unknown Source)
| at java.lang.Class.newInstance(Unknown Source)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3774)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
| at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
| at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
| at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
| at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
| at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
| at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
| at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
| at org.apache.catalina.core.StandardService.start(StandardService.java:516)
| at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
| at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
| at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
| 02-ene-2008 11:58:41 org.apache.catalina.core.StandardContext listenerStart
| GRAVE: Se ha saltado la instalación de escuchadores de aplicación debido a error(es) previo(s)
| 02-ene-2008 11:59:08 org.apache.catalina.core.StandardContext listenerStart
| GRAVE: Excepción enviando evento inicializado de contexto a instancia de escuchador de clase com.sun.faces.config.ConfigureListener
| javax.faces.FacesException: java.lang.ClassNotFoundException: [Ljava.lang.String;
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:354)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
| at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
| at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
| at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
| at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
| at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
| at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
| at java.lang.Thread.run(Unknown Source)
| Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String;
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:635)
| at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:422)
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
| ... 16 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116353#4116353
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116353
18 years, 3 months