geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r586204 - in /geronimo/samples/trunk/samples/sendmail: ./ sendmail-ear/ sendmail-ear/src/ sendmail-ear/src/main/ sendmail-ear/src/main/resources/ sendmail-ear/src/main/resources/META-INF/ sendmail-war/ sendmail-war/src/ sendmail-war/src/mai...
Date Fri, 19 Oct 2007 01:22:49 GMT
Author: gawor
Date: Thu Oct 18 18:22:47 2007
New Revision: 586204

URL: http://svn.apache.org/viewvc?rev=586204&view=rev
Log:
import sendmail samples into svn

Added:
    geronimo/samples/trunk/samples/sendmail/
    geronimo/samples/trunk/samples/sendmail/pom.xml   (with props)
    geronimo/samples/trunk/samples/sendmail/sendmail-ear/
    geronimo/samples/trunk/samples/sendmail/sendmail-ear/pom.xml   (with props)
    geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/
    geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/
    geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/
    geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/META-INF/
    geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/META-INF/geronimo-application.xml
  (with props)
    geronimo/samples/trunk/samples/sendmail/sendmail-war/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/pom.xml   (with props)
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/java/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/java/org/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/java/org/apache/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/java/org/apache/geronimo/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/java/org/apache/geronimo/samples/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/geronimo-web.xml
  (with props)
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/web.xml 
 (with props)
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/header.html   (with
props)
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.html   (with
props)
    geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.jsp   (with
props)

Added: geronimo/samples/trunk/samples/sendmail/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/pom.xml?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/pom.xml (added)
+++ geronimo/samples/trunk/samples/sendmail/pom.xml Thu Oct 18 18:22:47 2007
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev: 550875 $ $Date: 2007-06-26 13:40:09 -0400 (Tue, 26 Jun 2007) $ -->
+
+<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>
+    
+    <parent>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>samples</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <artifactId>sendmail</artifactId>
+    <name>Geronimo Samples :: sendmail</name>
+    <packaging>pom</packaging>
+    
+    <description>
+        Geronimo sendmail sample created from an archetype.
+    </description>
+    
+   <modules>
+        <module>sendmail-war</module>
+        <module>sendmail-ear</module>
+    </modules>
+
+   <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-site-plugin</artifactId>
+                <inherited>false</inherited>
+                <configuration>
+                  <outputDirectory>${project.basedir}/docs</outputDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>apache-snapshots</id>
+            <name>Apache Snapshots Repository</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories> 
+
+</project>

Propchange: geronimo/samples/trunk/samples/sendmail/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-ear/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-ear/pom.xml?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-ear/pom.xml (added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-ear/pom.xml Thu Oct 18 18:22:47 2007
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev: 550875 $ $Date: 2007-06-26 13:40:09 -0400 (Tue, 26 Jun 2007) $ -->
+
+<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>
+
+    <parent>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>sendmail</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>sendmail-ear</artifactId>
+    <name>Geronimo Samples :: sendmail :: EAR</name>
+    <packaging>ear</packaging>
+
+    <description>Geronimo Samples. EAR Module</description>
+
+    <dependencies>
+      <dependency>
+            <groupId>org.apache.geronimo.samples</groupId>
+            <artifactId>sendmail-war</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <type>war</type>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-ear-plugin</artifactId>
+                <configuration>
+                    <displayName>Geronimo Sample EAR for sendmail</displayName>
+                    <description>Geronimo Sample EAR for sendmail</description>
+                    <version>5</version>
+                    <modules>
+                        <webModule>
+                            <groupId>org.apache.geronimo.samples</groupId>
+                            <artifactId>sendmail-war</artifactId>
+                            <contextRoot>/sendmail</contextRoot>
+                            <bundleFileName>sendmail-war-2.0-SNAPSHOT.war</bundleFileName>
+                        </webModule>
+                    </modules>
+                </configuration>
+            </plugin>
+
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>install</phase>
+                        <id>copy-parent-target</id>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <echo>Copying ${pom.build.finalName}.ear file to parent</echo>
+                                <copy file ="${project.build.directory}/${pom.artifactId}-${pom.version}.ear"
todir="${pom.basedir}/.." failonerror="false" overwrite="true" />
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-ear/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/META-INF/geronimo-application.xml?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/META-INF/geronimo-application.xml
(added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/META-INF/geronimo-application.xml
Thu Oct 18 18:22:47 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev: 497879 $ $Date: 2007-01-19 12:11:01 -0500 (Fri, 19 Jan 2007) $ -->
+
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
+
+    <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+        <moduleId>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>${pom.artifactId}</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <type>ear</type>
+        </moduleId>
+    </environment>
+
+</application>

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-ear/src/main/resources/META-INF/geronimo-application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-war/pom.xml?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-war/pom.xml (added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-war/pom.xml Thu Oct 18 18:22:47 2007
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev: 550875 $ $Date: 2007-06-26 13:40:09 -0400 (Tue, 26 Jun 2007) $ -->
+
+<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>
+
+    <parent>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>sendmail</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>sendmail-war</artifactId>
+    <name>Geronimo Samples :: sendmail :: WAR</name>
+    <packaging>war</packaging>
+
+    <description>Geronimo Samples. WEB Module</description>
+
+    <dependencies>
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>process-resources</phase>
+                        <id>copy-parent-site</id>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                              <echo>Copying site directory from parent</echo>
+                                <copy todir="${project.build.directory}/${pom.artifactId}-2.0-SNAPSHOT"
failonerror="false" overwrite="true">
+                                    <fileset dir="${pom.basedir}/../docs"/>
+                                </copy>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-war/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/geronimo-web.xml?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/geronimo-web.xml
(added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/geronimo-web.xml
Thu Oct 18 18:22:47 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
+    <environment>
+        <moduleId>
+            <groupId>test</groupId>
+            <artifactId>sendmail</artifactId>
+            <version>1.0</version>
+            <type>car</type>
+        </moduleId>   
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.geronimo.configs</groupId>
+                <artifactId>javamail</artifactId>
+                <type>car</type>
+            </dependency>
+        </dependencies>
+    </environment>
+    <context-root>/sendmail</context-root>
+    <resource-ref>
+        <!-- Used is web.xml -->
+        <ref-name>mail/testMailSession</ref-name>
+        <!-- Default Geronimo mail session -->
+        <resource-link>mail/MailSession</resource-link>
+    </resource-ref>
+</web-app>
+

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/web.xml?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/web.xml (added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/web.xml Thu
Oct 18 18:22:47 2007
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+        version="2.4">
+    <display-name>Send Mail Webapp</display-name>
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+    <resource-ref>
+        <!-- Used in index.jsp -->
+        <res-ref-name>mail/testMailSession</res-ref-name>
+        <res-type>javax.mail.Session</res-type>
+        <res-auth>Container</res-auth>
+        <res-sharing-scope>Shareable</res-sharing-scope>
+    </resource-ref>
+</web-app>
+

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/header.html
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/header.html?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/header.html (added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/header.html Thu Oct
18 18:22:47 2007
@@ -0,0 +1,55 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<html>
+    <head>
+        <link type="text/css" rel="stylesheet" href="http://geronimo.apache.org/style/default.css">
+        <link rel="SHORTCUT ICON" href="http://geronimo.apache.org/images/favicon.ico">
  
+        <script src="http://geronimo.apache.org/functions.js" type="text/javascript"></script><title>Apache
Geronimo Sample Applications</title>
+        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    </head>
+    
+    <body onload="init()">
+        
+        <table valign="top" background="http://geronimo.apache.org/images/header_bg_1x86.gif"
border="0" cellpadding="0" cellspacing="0" width="100%">
+            <tbody>
+                <tr>
+                    <td valing="top" align="left">
+                        <a href="http://geronimo.apache.org/"><img src="http://geronimo.apache.org/images/topleft_logo_437x64.gif"
border="0"></a>
+                    </td>
+                    <td width="100%">
+                        &nbsp;
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+        
+        <table border="0" cellpadding="2" cellspacing="0" width="100%">
+            <tbody>
+                <tr class="topBar">
+                    <td class="topBarDiv" align="left" nowrap="true" valign="middle" width="100%">
+                        &nbsp;<a href="http://geronimo.apache.org/" title="Apache
Geronimo Home" target="_blank">Apache Geronimo Home</a> | <a href="http://cwiki.apache.org/geronimo/"
title="Geronimo Documentation"target="_blank">Documentation</a> | <a href="http://cwiki.apache.org/GMOxSAMPLES/"
title="Sample Applications"target="_blank">Sample Applications</a>
+                    </td>
+                    <td class="topBarDiv" align="left" nowrap="true" valign="middle">
+                        <a href="xref/index.html" target="source_window">Source Code</a>
| <a href="apidocs/index.html" target="source_window">Java Docs</a>&nbsp;&nbsp;
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+
+    </body>
+</html>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/header.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.html?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.html (added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.html Thu Oct
18 18:22:47 2007
@@ -0,0 +1,29 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
class="cell"">
+<html>
+<head>
+  <title>Apache Geronimo Sample Application</title>
+  <meta content="text/html; CHARSET=iso-8859-1" http-equiv="Content-Type">
+</head>
+
+<FRAMESET rows="86px,*" frameborder="0">
+    <FRAME src="./header.html" name="headerFrame" title="Header" frameborder="0" marginheight="0"
marginwidth="0" noresize scrolling="no">
+    <FRAME src="./index.jsp" name="sampleDocumentFrame" title="Sample Document Description"
frameborder="0" marginheight="0" marginwidth="0" noresize scrolling="no">
+</FRAMESET>
+  
+</html>

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.jsp?rev=586204&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.jsp (added)
+++ geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.jsp Thu Oct
18 18:22:47 2007
@@ -0,0 +1,82 @@
+<%@page import="java.util.Date,
+                javax.mail.Message,
+                javax.mail.Session,
+                javax.mail.Transport,
+                javax.mail.internet.InternetAddress,
+                javax.mail.internet.MimeMessage,
+                javax.naming.InitialContext" %>
+
+<%
+    String resultMsg = "";
+    String action = request.getParameter("action");
+    if ("Send".equals(action)) {
+        String from = request.getParameter("from");
+        String to = request.getParameter("to");
+        String subject = request.getParameter("subject");
+        String content = request.getParameter("message");
+
+        // Get mail session and transport
+        InitialContext context = new InitialContext();
+        // Mail session from web.xml's resource reference
+        Session mailSession = (Session) context.lookup("java:comp/env/mail/testMailSession");
+        Transport transport = mailSession.getTransport("smtp");
+    
+        // Setup message
+        MimeMessage message = new MimeMessage(mailSession);
+        // From address
+        message.setFrom(new InternetAddress(from));
+        // To address
+        message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
+        // Subject
+        message.setSubject(subject);
+        // Content
+        message.setText(content);
+    
+        // Send message
+        transport.connect();
+        transport.send(message);
+        
+        // Build result message
+        resultMsg = "<b>Result:</b>";
+        resultMsg += "<br>Message sent: " + new Date();
+        resultMsg += "<br>To: " + to;
+        resultMsg += "<br>From: " + from;
+    }
+%>
+
+<html>
+    <head>
+        <title>Send Mail</title>
+    </head>
+    <body>
+        <form>
+            <table>
+                <tr>
+                    <td align="center" colspan="2"><b>Send Mail</b></td>
+                </tr>
+                <tr>
+                    <td align="right">From:</td>
+                    <td><input type="text" name="from"></td>
+                </tr>
+                <tr>
+                    <td align="right">To:</td>
+                    <td><input type="text" name="to"></td>
+                </tr>
+                <tr>
+                    <td align="right">Subject:</td>
+                    <td><input type="text" name="subject"></td>
+                </tr>
+                <tr>
+                    <td align="right">Message:</td>
+                    <td><textarea rows="5" cols="20" name="message"></textarea></td>
+                </tr>
+                <tr>
+                    <td align="right" colspan="2">
+                        <input type="submit" name="action" value="Send">&nbsp;<input
type="reset"></td>
+                    </td>
+                </tr>
+            </table>
+        </form>
+        <%= resultMsg %>
+    </body>
+</html>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/sendmail/sendmail-war/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message