Changeset 3663 in main for branches/2.1/src/main/webapps/ibisph-view/WEB-INF/config/spring/user.xml
- Timestamp:
- 03/27/12 09:00:40 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/src/main/webapps/ibisph-view/WEB-INF/config/spring/user.xml
r3654 r3663 33 33 </bean> 34 34 35 <!-- 35 36 <!-- MAIL NOTES: 37 http://wheelersoftware.com/articles/spring-javamail-2.html 38 http://static.springsource.org/spring/docs/3.1.x/reference/html/mail.html 39 http://forum.springsource.org/showthread.php?33167-How-to-use-Spring-Mail-to-send-mails-via-Gmail-s-SMTP-server 40 http://www.javacodegeeks.com/2010/07/java-mail-spring-gmail-smtp.html 41 42 if you're using JDK 1.5 or earlier, include the "activation.jar" file 43 that you obtained from downloading the JavaBeans Activation Framework, 44 in your CLASSPATH. 45 46 Sun SMTP properties: 47 http://javamail.kenai.com/nonav/javadocs/com/sun/mail/smtp/package-summary.html 48 49 GMAIL NOTES: 50 SSL (smtpS) 51 <property name="protocol" value="smtps"/> 52 <property name="port" value="465"/> or port 25 53 54 TLS: 55 <property name="protocol" value="smtp"/> 56 <property name="port" value="587"/> 57 <prop key="mail.smtp.starttls.enable">true</prop> 58 59 doesn't appear to matter: 60 <prop key="mail.smtp.auth">true</prop> 61 <prop key="mail.user">garth.braithwaite@stgutah.com</prop> 62 63 velocity template example: 64 http://www.javabeat.net/articles/83-email-integration-in-spring-framework-1.html 65 66 <bean id="User.MailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> 67 <description> 68 Local, internal webapp mail sender config that can be used for 69 testing without having to have the app server setup with a JNDI 70 mail session configuration. If the app server is NOT setup for 71 JNDI then this code and the refs within the web.xml (and any 72 enterprise app server config file refs) should be commented out as 73 leaving in will cause the app to not load/start. Note also that if 74 using this configuration the mail.jar and possibly the activation.jar 75 will need to be put into the app's lib folder. If/when the JNDI 76 is used it is important to remove those jars from the webapp's lib. 77 </description> 78 79 <property name="protocol" value="smtps"/> 80 <property name="host" value="smtp.gmail.com"/> 81 <property name="port" value="465"/> 82 <property name="username" value=""/> 83 <property name="password" value=""/> 84 <property name="javaMailProperties"> 85 <props> 86 <prop key="mail.smtp.connectiontimeout">200000</prop> 87 <prop key="mail.smtp.timeout">10000</prop> 88 <prop key="mail.debug">true</prop> 89 </props> 90 </property> 91 </bean> 92 --> 36 93 <bean id="User.MailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> 37 94 <description> … … 61 118 </property> 62 119 </bean> 63 -->64 65 <!-- MAIL NOTES:66 http://wheelersoftware.com/articles/spring-javamail-2.html67 http://static.springsource.org/spring/docs/3.1.x/reference/html/mail.html68 http://forum.springsource.org/showthread.php?33167-How-to-use-Spring-Mail-to-send-mails-via-Gmail-s-SMTP-server69 http://www.javacodegeeks.com/2010/07/java-mail-spring-gmail-smtp.html70 71 if you're using JDK 1.5 or earlier, include the "activation.jar" file72 that you obtained from downloading the JavaBeans Activation Framework,73 in your CLASSPATH.74 75 Sun SMTP properties:76 http://javamail.kenai.com/nonav/javadocs/com/sun/mail/smtp/package-summary.html77 78 GMAIL NOTES:79 SSL (smtpS)80 <property name="protocol" value="smtps"/>81 <property name="port" value="465"/> or port 2582 83 TLS:84 <property name="protocol" value="smtp"/>85 <property name="port" value="587"/>86 <prop key="mail.smtp.starttls.enable">true</prop>87 88 doesn't appear to matter:89 <prop key="mail.smtp.auth">true</prop>90 <prop key="mail.user">garth.braithwaite@stgutah.com</prop>91 92 velocity template example:93 http://www.javabeat.net/articles/83-email-integration-in-spring-framework-1.html94 -->95 96 <bean id="User.MailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">97 <description>98 Local, internal webapp mail sender config that can be used for99 testing without having to have the app server setup with a JNDI100 mail session configuration. If the app server is NOT setup for101 JNDI then this code and the refs within the web.xml (and any102 enterprise app server config file refs) should be commented out as103 leaving in will cause the app to not load/start. Note also that if104 using this configuration the mail.jar and possibly the activation.jar105 will need to be put into the app's lib folder. If/when the JNDI106 is used it is important to remove those jars from the webapp's lib.107 </description>108 109 <property name="protocol" value="smtps"/>110 <property name="host" value="smtp.gmail.com"/>111 <property name="port" value="465"/>112 <property name="username" value="garth.braithwaite@stgutah.com"/>113 <property name="password" value="karlyn.0"/>114 <property name="javaMailProperties">115 <props>116 <prop key="mail.smtp.connectiontimeout">200000</prop>117 <prop key="mail.smtp.timeout">10000</prop>118 <prop key="mail.debug">true</prop>119 </props>120 </property>121 </bean>122 120 123 121 <bean id="User.MailMessage" class="org.springframework.mail.SimpleMailMessage"> … … 137 135 <property name="documentDAO" ref="Common.XML.DAO"/> 138 136 </bean> 139 140 141 <!-- X M L M O D E L S -->142 <bean id="User.DefaultHTMLContent.ModelMap" class="org.ibisph.modelmap.DefaultModelIfNullModel" parent="Common.XMLModelMap.CommonProperties">143 </bean>144 <bean id="User.HTMLContent.ModelMap" class="org.ibisph.systemid.modelmap.SystemIDFromHTTPRequestEndOfPathInfo" parent="Common.XMLModelMap.CommonProperties">145 <property name="XMLPath" ref="User.HTMLContent.XML.Path"/>146 </bean>147 148 137 149 138 <bean id="User.UserProfileFromHTTPRequestParameters.Service" class="org.ibisph.web.HTTPRequestParametersToContainerElementService"> … … 164 153 </bean> 165 154 166 <bean id="User.SaveUserProfile.ModelMap" class="org.ibisph.user.service.SaveUserProfile"> 167 <property name="userProfileService" ref="User.XML.Service"/> 168 <property name="javaMailSender" ref="User.MailSender"/> 155 156 157 <!-- X M L M O D E L S --> 158 <bean id="User.DefaultHTMLContent.ModelMap" class="org.ibisph.modelmap.DefaultModelIfNullModel" parent="Common.XMLModelMap.CommonProperties"> 159 </bean> 160 <bean id="User.HTMLContent.ModelMap" class="org.ibisph.systemid.modelmap.SystemIDFromHTTPRequestEndOfPathInfo" parent="Common.XMLModelMap.CommonProperties"> 161 <property name="XMLPath" ref="User.HTMLContent.XML.Path"/> 162 </bean> 163 164 <bean id="User.SaveUserProfile.ModelMap" class="org.ibisph.user.service.SaveUserProfile"> 165 <property name="userProfileService" ref="User.XML.Service"/> 166 <property name="javaMailSender" ref="User.MailSender"/> 167 </bean> 168 169 <bean id="User.QueryDefinitionsXML.ModelMap" class="org.ibisph.querydefinition.modelmap.QueryDefinitionsFromHTTPRequest"> 170 <property name="modelMapKey" value="QueryDefinitions"/> 171 <property name="queryDefinitionsService" ref="QueryDefinition.XML.Service"/> 172 </bean> 173 <bean id="User.UserAuthoritiesXML.ModelMap" class="org.ibisph.user.springsecurity.UserAuthoritiesXMLModelMap"> 174 <property name="modelMapKey" value="UserAuthorities"/> 169 175 </bean> 170 176 … … 172 178 173 179 <!-- C O N T R O L L E R S --> 174 <bean id="User.Controller.CommonProperties" abstract="true"> 175 <property name="additionalModelMapList"> 176 <list> 177 <ref bean="Common.WebAppURLContextPrefixFromHTTPRequest.ModelMap"/> 178 <ref bean="Common.HTTPRequestParameters.ModelMap"/> 179 </list> 180 </property> 181 <property name="noCacheHTTPHeader" value="true"/> 182 </bean> 183 184 <bean id="User.HTMLContent.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> 185 <property name="additionalModelMapList"> 180 <bean id="User.HTMLContent.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController"> 181 <property name="modelMapList"> 186 182 <list> 187 183 <ref bean="User.HTMLContent.ModelMap"/> 188 184 <ref bean="User.DefaultHTMLContent.ModelMap"/> 185 <ref bean="Common.ModifiedDateFromFileSystemID.ModelMap"/> 186 <ref bean="Common.HTTPRequestParameters.ModelMap"/> 187 <ref bean="Common.WebAppURLContextPrefixFromHTTPRequest.ModelMap"/> 189 188 </list> 190 189 </property> … … 192 191 </bean> 193 192 194 <bean id="User.EmailPassword.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> 195 </bean> 196 197 <bean id="User.NewRegistration.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="Common.FileSystemID.Controller.CommonProperties"> 193 <bean id="User.EmailPassword.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController"> 194 <property name="additionalModelMapList"> 195 <ref bean="Common.FileSystemID.ModelMaps"/> 196 </property> 197 </bean> 198 199 <bean id="User.NewRegistration.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController"> 200 <property name="additionalModelMapList"> 201 <ref bean="Common.FileSystemID.ModelMaps"/> 202 </property> 198 203 </bean> 199 204 … … 203 208 Get the POSTED HTTP request params and create a new USER 204 209 </description> 205 <property name=" additionalModelMapList">210 <property name="modelMapList"> 206 211 <list> 207 212 <!-- … … 214 219 </bean> 215 220 216 <bean id="User.VerifyRegistration.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent=" Common.FileSystemID.Controller.CommonProperties">217 </bean> 218 219 <bean id="User.EditProfile.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent=" Common.FileSystemID.Controller.CommonProperties">220 </bean> 221 222 <bean id="User.SaveProfile.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent=" Common.FileSystemID.Controller.CommonProperties">221 <bean id="User.VerifyRegistration.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="User.Controller.CommonProperties"> 222 </bean> 223 224 <bean id="User.EditProfile.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="User.Controller.CommonProperties"> 225 </bean> 226 227 <bean id="User.SaveProfile.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="User.Controller.CommonProperties"> 223 228 </bean> 224 229 … … 236 241 237 242 238 <bean id="User.QueryDefinitionsXML.ParameterMap" class="org.ibisph.querydefinition.modelmap.QueryDefinitionsFromHTTPRequest"> 239 <property name="queryDefinitionsService" ref="QueryDefinition.XML.Service"/> 240 </bean> 241 <bean id="User.UserAuthoritiesXML.ParameterMap" class="org.ibisph.user.springsecurity.UserAuthoritiesXMLModelMap"/> 242 243 <!-- MY QUERIES --> 243 244 <bean id="User.QuerySelectionList.Controller" class="org.ibisph.web.springmvc.ModelMapListProcessingController" parent="QueryDefinition.Controller.CommonProperties"> 244 245 <description> </description> 245 <property name=" additionalModelMapList">246 <property name="modelMapList"> 246 247 <list> 247 248 <ref bean="Secure.DefaultSelection.ModelMap"/> 248 <ref bean="User.QueryDefinitionsXML.ParameterMap"/> 249 <ref bean="User.UserAuthoritiesXML.ParameterMap"/> 249 <ref bean="User.QueryDefinitionsXML.ModelMap"/> 250 <ref bean="User.UserAuthoritiesXML.ModelMap"/> 251 <ref bean="Common.HTTPRequestParameters.ModelMap"/> 252 <ref bean="Common.WebAppURLContextPrefixFromHTTPRequest.ModelMap"/> 250 253 </list> 251 254 </property>
Note: See TracChangeset
for help on using the changeset viewer.