跳至主要内容

博文

目前显示的是 十月, 2012的博文

Generate reports with Seam 3 Reports and Apache Velocity

Seam 3 provides a collection of standard CDI extensions. Seam3 report module bridges CDI and several report engines, such as JasperReports Pentaho XDocReport Basic Configuration Assume you have already created a Maven based Java EE 6 application. If not, you can create one using JBoss Forge. Add Seam 3 reports related dependencies into your pom.xml . <dependency> <groupId>org.jboss.seam.reports</groupId> <artifactId>seam-reports-api</artifactId> <version>${seam-reports-version}</version> </dependency> <!-- If you are using Jasper Reports, add the following dependency --> <dependency> <groupId>org.jboss.seam.reports</groupId> <artifactId>seam-reports-jasper</artifactId> <version>${seam-reports-version}</version> </dependency> Generally, in order to generate a JasperReports based report in a Seam 3/Java EE6 project, y

Send email with Seam 3 Mail and JMS

Seam 3 Mail module provides simple API to use Java Mail API to send email message. Basic Configuration Assume you have already created a Maven based Java EE 6 application. Add seam mail dependency to your pom.xml file. <dependency> <groupId>org.jboss.seam.mail</groupId> <artifactId>seam-mail-api</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jboss.seam.mail</groupId> <artifactId>seam-mail</artifactId> <scope>compile</scope> </dependency> Add basic mail configuration in your META-INF/seam-beans.xml . <mail:MailConfig serverHost="smtp.gmail.com" serverPort="587" auth="true" enableTls="true" username="<your gmail account>" password="<your password>"> <ee:modifies /> </mail:MailConfig> In your Java codes, inject