[JBoss Seam] - Re: Themes question
by chris@dvdb.de
I installed a custom filter (@Filter(within = "org.jboss.seam.web.contextFilter")) and the filter is called as expected.
I can also get and access the ThemeSelector via
Context ctx = new SessionContext(new ServletRequestSessionMap(sreq));
ThemeSelector ts = (ThemeSelector) ctx.get(ThemeSelector.class);
Problem is that I get a NPE when setting a theme. selectTheme throws
| java.lang.NullPointerException
| at org.jboss.seam.theme.ThemeSelector.select(ThemeSelector.java:87)
|
The annotations in my custom filter class are:
@Startup
@Scope(ScopeType.APPLICATION)
@Name("de.dvdb.generic.seam.ThemeFilter")
@Intercept(InterceptionType.NEVER)
@Filter(within = "org.jboss.seam.web.contextFilter")
Is this ok?
- Chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080220#4080220
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080220
17 years, 4 months
[JBoss Seam] - Seam email problem
by martin.krajci
Hi all,
I'm trying to send an email using seam, but with exception.
Seam version: 1.2.1GA
Jboss AS version: 4.2.1.GA
JSF version 1.2 SUN RI
I have:
1) created mail-service.xml
<mbean code="org.jboss.mail.MailService"
| name="jboss:service=CechieMailservice">
| <attribute name="JNDIName">java:/CechieMailService</attribute>
| <attribute name="User">martin.krajci</attribute>
| <attribute name="Password">mypwd</attribute>
| <attribute name="Configuration">
| <configuration>
| <property name="mail.store.protocol" value="pop3"/>
| <property name="mail.transport.protocol" value="smtp"/>
| <property name="mail.user" value="martin.krajci"/>
| <property name="mail.pop3.host" value="pop.gmail.com"/>
| <property name="mail.smtp.host" value="smtp.gmail.com"/>
| <property name="mail.smtp.port" value="465"/>
| <property name="mail.from" value="martin.krajci(a)gmail.com"/>
| <property name="mail.smtps.auth" value="true"/>
| <property name="mail.smtps.quitwait" value="false"/>
| <property name="mail.debug" value="true"/>
| </configuration>
| </attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
2) edited components.xml
<mail:mail-session session-jndi-name="java:/CechieMailService"/>
or
<mail:mail-session host="localhost" port="2525" username="test" password="test" />
+ namespaces in tag are the same as in seam mail example
3) included jboss-seam-mail.jar in ear/war/WEB-INF/lib
4) used seam mail example in my project
But I got exception when sending email:
13:17:33,448 INFO [MailSession] Creating JavaMail Session (localhost:null)
13:17:33,458 INFO [MailSession] connected to mail server
13:17:34,510 ERROR [ReservationComponent] Error sending mail
javax.faces.FacesException: Exception reading response
at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:142)
at org.jboss.seam.ui.JSF.renderChild(JSF.java:180)
at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRend
erer.java:150)
at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.ja
va:112)
at cz.krajci.cechie.business.logic.ReservationComponent.finishBooking(Re
servationComponent.java:154)
The strange thing is the (localhost:null) host and port.
What else I'm missing?
Thanx for any reply.
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080215#4080215
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080215
17 years, 4 months