[JBoss Seam] - Problem with accented letters in jsf pages with seam 2.0.0GA
by brprog
Hello,
I have developped several applications with Seam 1.2.1 with Jboss 4.0.5 and recently tested Seam 2.0.0GA.
One change I've seen is that accented letters are translated into entity name, when in the older version they were translated into entity number. For instance a small i with acute accent is translated to & i acute; before it was translated to & #237;
The problem is that Mozilla Firefox can't display the page because the content-type sent is application/xhtml+xml and these entities are not defined. The display is correct in IE.
I've put a meta tag in the head:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
But it didn't change anything.
I thought it was related to facelets, I've switched back to the same version that comes with Seam 1.2.1 but it gave the same result
Is there a way to switch back to the old behavior or a workaround?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109083#4109083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109083
18 years, 4 months
[EJB 3.0] - @PreDestroy and injected JavaBeans
by beligum
Hi all,
I'm trying to do the following:
| @Stateful
| @Scope(SESSION)
| @Name("outboxManager")
| public class OutboxManagerImpl extends AbstractManagerImpl implements OutboxManager, Serializable
| {
| private Map<Principal, List<EmailMessage>> queuedMessages;
|
| @In(create=true)
| private EmailMessenger emailMessenger;
|
| [constructors, getters, setters, ...]
|
| @PreDestroy
| public void cleanup()
| {
| try {
| sendAllQueuedMessages();
| } catch (EmailException e) {
| e.printStackTrace();
| }
| }
| @Remove
| @Destroy
| public void destroy()
| {
| }
| }
|
Everything works fine, but when the @PreDestroy method is called, the injected JavaBean (POJO with @Name("emailMessenger")) has become null. I tried to re-inject it manually, but some other initialization-things (eg. the email renderer) go wrong then.
Am I missing the point here that the injected values are already irrevocably destroyed when @PreDestroy is reached/called, or is this expected behavior? If so, how do I send my queued mails when the session goes out of scope?
thanks a lot,
b.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109080#4109080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109080
18 years, 4 months
[JBossWS] - jbossws-native-2.0.2.GA doesn't deploy out of the box on jbo
by klease
I have a 4.2.1.GA with jbossws-2.0.1.GA installed.
I ran undeploy-jboss42 in the 2.0.1.GA installation directory.
Then I ran deploy-jboss421 in the jbossws-2.0.2.GA installation directory.
Tried to start jboss and got lots of ClassNotFound errors.
After hunting around a bit, I see that in macros-deploy-native.xml the macro-deploy-native421 definition contains this.
<copy todir="${jboss421.home}/server/${jboss.server.instance}/lib" overwrite="true">
| <fileset dir="@{thirdpartylibs}">
| <include name="jbossws-jboss421.jar"/>
| </fileset>
| </copy>
But there is no jbossws-jboss421.jar jar in the 2.0.2.GA installation zip.
I dropped in the jbossws-jboss42.jar from the 2.0.2.GA installation into server/default/lib and also client/lib. This deploys without errors and runs all the 2.0.2 test cases.
Are there any known incompatibilities with this jar and the new jbossws version?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109077#4109077
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109077
18 years, 4 months
[EJB/JBoss] - Re: obtain client ip address in ejb web service endpoint
by cripgrm
I finally figured out how to do this.
Environment is JBoss 4.2.0 GA and JBossws 1.2
Code:
import javax.servlet.http.HttpServletRequest;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.WebServiceContext;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxws.WebServiceContextEJB;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
@Resource
EJBContext ejbContext;
@Resource
WebServiceContext wsContext;
@WebMethod
public void someMethod()
{
if (wsContext == null)
{
log.debug("WebServiceContext not injected");
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
wsContext = new WebServiceContextEJB((SOAPMessageContextJAXWS)msgContext, ejbContext);
}
SOAPMessageContextJAXWS jaxwsContext = (SOAPMessageContextJAXWS)wsContext.getMessageContext();
HttpServletRequest hRequest = (HttpServletRequest)jaxwsContext.get(MessageContext.SERVLET_REQUEST);
log.debug("Client IP = " + hRequest.getRemoteAddr());
.....................
.........
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109074#4109074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109074
18 years, 4 months
[JBossCache] - Re: Problem with one-to-many assotiations in Hibernate with
by bstansberry@jboss.com
anonymous wrote : If take a look at log in JIRA, then JBoss cache FIX CACHE MISS!
Not sure what you mean here.
anonymous wrote :
| And Hibernate reassign FOREIGN KEY at Movie.
| But cache at Movie Category don't fresh ?!?!
JBoss Cache doesn't somehow automatically change what's cached when a Movie's foreign key changes -- it's up to Hibernate's 2nd level cache management code to tell it to do that. That's why I say you need to discuss this on the Hibernate forums -- the Hibernate developers are the ones who understand when they refresh the cache. JBC just stores what it is told to store.
Imagine Hibernate supported using a java.util.HashMap as a 2nd level cache. If you were having this problem, you wouldn't go to your JRE vendor to find out why the HashMap contents are not what you expect. You'd start by discussing the problem with the Hibernate folks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109068#4109068
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109068
18 years, 4 months