[Tomcat, HTTPD, Servlets & JSP] - Re: ${variable.member} does not work!
by c-e
Hi, I found the riddle's solution:
But could anybody tell how to access _jspService's objects via ${object.member}? Is it possible, at all? (Although, I don't think it's necessary.)
Thanks, Christian
<%! public class Test {
private int number;
public int getNumber() { return number; }
protected void setNumber(int number) { this.number = number; }
}
%>
<%
Test local = new Test();
local.setNumber(3);
pageContext.setAttribute("local", local);
application.setAttribute("global", local);
%>
${local.number}
${global.number}
Problem A)
- it seems, that ${object.member} can't access the objects in the _jspService() method
- but it searches the pageContext object
Problem B)
- class must be public
(the error message -- it just says "public", nothing specific)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975581#3975581
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975581
19 years, 7 months
[Tomcat, HTTPD, Servlets & JSP] - Re: Would I use mod_jk to do this...?
by possum.pie
"rcjboss" wrote : Yes, you can configure mod_jk to forward all the requests to JBoss.
| In order to achieve "www.domain.com" you would need to either
| 1. Document root/context root of your war to be the default.
| or
| 2. Deploy your war by renaming as root.war and renaming the JBoss' console war to something else. This would be located JBoss' Tomcat deployment.
Thank you rcjboss.
I'm using your first suggestion but I'm not really sure that I know what you mean. I think you mean that I should change where DocumentRoot points. When I point it at the root dir of my webapp, Apache displays a default index.html file found in the original DocumentRoot instead of the index.jsp found in the root of my webapp.
Setting documentRoot to the base dir of my webapp seems to be entirely outside of mod_jk. I'm not sure where to go next.
Here's the virtual host tag from httpd.conf:
<VirtualHost *:80>
| DocumentRoot /usr/local/jboss/server/default/deploy/webapp.war
| ServerName domain.com
| ServerAlias www.domain.com
| </VirtualHost>
Note: The .war file has been extracted
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975579#3975579
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975579
19 years, 7 months
[EJB 3.0] - Embedded EJB3 Proxy and EJB3-RC9 server
by dhartford
Hi all,
I'm trying to use the embedded EJB3 jars in an application that will require both local/embed server access as well as remote server access.
Using Embed RC9-Alpha and a 4.0.4.GA patched jbossas with EJB3-RC9 I keep getting the following error on the client side when trying to communicate with the server:
| javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.stateless.StatelessLocalProxy; local class incompatible: stream classdesc serialVersionUID = -3241008127518089831, local class serialVersionUID = -3824844512835539077]
|
Using the following contexts for testing:
| private static Hashtable getLocalContextProperties()
| {
| Hashtable props = new Hashtable();
| props.put("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
| props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
| return props;
| }
|
| private static Hashtable getRemoteContextProperties(){
| Hashtable env = new Hashtable();
| env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| env.put("java.naming.provider.url", "my.remote.server:1099");
| env.put("java.naming.factory.url.pkgs", "org.jnp.interfaces");
| return env;
|
| }
|
If I use embed, is there something special I need to do to also use remote ejb3?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975578#3975578
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975578
19 years, 7 months
[JBossWS] - HELP HELP.. Error in using @Resource WebServiceContext in a
by sursha
Hi,
I am using @Resource WebServiceContext in annotated web service and got the error
11:53:11,847 WARN [ServiceController] Problem starting service jboss.j2ee:jar=thesearchagencyservices.jar,name=ReportService,service=EJB3
java.lang.RuntimeException: You did not specify a @Resource.mappedName() on javax.xml.ws.WebServiceContext com.tsa.facade.ReportService.wsContext and there is no binding for that enc name in XML
at org.jboss.ejb3.injection.ResourceHandler.loadFieldInjectors(ResourceHandler.java:362)
at org.jboss.ejb3.injection.ResourceHandler.loadInjectors(ResourceHandler.java:401)
at org.jboss.ejb3.injection.ResourceHandler.loadInjectors(ResourceHandler.java:381)
at org.jboss.ejb3.EJBContainer.resolveInjectors(EJBContainer.java:640)
at org.jboss.ejb3.EJBContainer.initializePool(EJBContainer.java:576)
at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:507)
Looks like the @Resource injection is not working. I saw a post saying it is fixed in
JBOSS WS 2.0 Beta. Where can i download it?
I was getting the WebServiceContext to get the SOAPHeader from it.
If it is not immediately available, what is the alternative way to get SOAPHeader in a annotated ejb 3.0 web service?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975577#3975577
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975577
19 years, 7 months
[JBoss Seam] - Re: Problem with injection in an jsf action listener
by petemuir
"cristi.ciuc" wrote : Thank you for the replies.
|
| So, I understand that when
|
| <f:actionListener type="com.nortel.emp.listener.AddRoleListener" />
|
| is called, a new instance of the listener gets created, that is not intercepted by Seam. Is that correct?
Yes, from org.apache.myfaces.taglib.core.ActionListener
ActionListener al = (ActionListener)ClassUtils.newInstance(className);
and ClassUtils.newInstance is basically a wrapper for Class clazz.newInstance();
anonymous wrote : If so, my question still stands: how can I use seam injection in a JSF ActionListener? How can I tell Seam via the <f:actionListener /> tag to use an existing instance of my listener, (annotated as a seam component ) and not create a new one?
|
Well AFAICS you can't with f:actionListener as it stands - you have to use the actionListener attribute on the tag.
You could of course extend/create your own my:actionListener with, say, a value attribute, which would would then instantiate a Seam component (either via EL using the SeamVariableResolver or as Gavin mentioned above).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975574#3975574
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975574
19 years, 7 months