Originally posted by Aditi khare:
Hi,
I am trying to test run a simple Servlet on Application Server 9.1 , I am getting Java.lang.Runtime exception and java.lang.reflect.InvocationTargetException
The log details are as follow, please help!
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:421)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:343)
... 48 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.tools.admingui.util.TargetUtil.getAssociatedVS(TargetUtil.java:109)
at com.sun.enterprise.tools.admingui.handlers.ApplicationHandlers.getApplicationInfo(ApplicationHandlers.java:173)
... 54 more
Originally posted by Piotr Cierny:
I have created a simple application that uses 2 languages - english and polish. I want to set locale with html link for myfaces and jstl tags.
The problem is that when i press the link, it only changes the messages outputed by jsf tags. The jstl messages remain unchanged.
The locale is changing (checked with c:out) but messages aren`t.
The funniest thing happends when i change language to english and check the chceckbox - All messages change to english and the jstl locale variable is emptied (c:out doesn`t write anything out).
This example worked with jsf1.1.5 but it doesn`t work with jsf 1.2.
Can any one tell me why??
I enclose the code of this example:
welcome.jsp
User.java
faces-config.xml
I`ve tried to download new jstl.jar and standard.jar, add tlds and declarations in web.xml but it didn`t help.
If anyone knows answer to this mystery please help.
Originally posted by pinky suresh:
Sorry for previous incomplete reply...
I have servlet-api.jar in commons/lib and still i am getting the NoClassDefFoundError for ServletRequest.
Please let me know what i am missing.
Originally posted by M Burke:
I am new to faces. I want to build a table from a collection of objects, and make a link for each to open that item on a different form.
In the past, I added request parameters to my links to know which one is clicked. Like this: a href='view.jsp?row=1&col=1' then do a request.getParameter('row') in my servlet.
How do I do this equivalant in JSF? I can't even find any examples of a faces action even accessing the request object.
Originally posted by Alex Horst:
Hi,
Is it possible to access the <body> element from a managed bean?
I want to add the "onLoad" attribute programmatically.
The statement above returns null. I guess this is because the ViewRoot contains JSF-Components only?
Thanks in advance.
Originally posted by Gaurav Ram:
Hi,
I want to use JSF 1.2 @PostConstruct annotation and for that i have downloaded latest version of JSF i.e. JSF 1.2 and also i configured Tomcat 6.x.x in my MyEclipse, but when i am using @PostConstruct in Bean it is giving compile time error,, it is not recognizing that package,,, can you please help me out...What i am missing???
Thanks,
Gaurav
Originally posted by Cameron Wallace McKenzie:
Indeed...I was looking at the phase listener.
I guess you could achieve something similar with a ServletListener configured on the FacesServlet.
Looks like we're not the only ones hitting this conundrum. Seems JSF 1.2 has a solution, developed by people better looking than you and me.
Post on Best Practices for JSF Backing Beans / Managed Beans
Unfortunately, I'm deploying to Rational Application Developer, and IBM has a policy of not supporting new standards until they are extremely old.
-Cameron McKenzie
Originally posted by Ketan Jambhekar:
Hi,
Refer to the discussion in the following link
f:verbatim
Ketan
Originally posted by Joseph Sweet:
In your scenario, what if I were in Page B prior to my visit in Page A? Then When I come back to Page B, this page has no state, because no state of no page is saved on the session (i.e., on the server).
But when I was in Page B on the 1st time, I did change its state to be different than its default state. So where was it saved in your algorithm?
Originally posted by Tim Holloway:
I don't think that these are part of JSF - they're part of the JSR-250 lifecycle spec.
Spring supports these annotations, I believe.
Originally posted by Tim Holloway:
It looks like your WAR is missing an XML DOM library used by the Sun JSF code.
Originally posted by Ravindranath Chowdary:
Hi Ranchers,
I am encountering the following error when I try to integrate Struts with JSF. I am using jdk1.5.0_10 and Tomcat 5.0 and Eclipse 3.1.
Error:
2007-12-06 16:11:25 StandardContext[/poeticWeb]Exception sending context initialized event to listener instance of class org.apache.struts.faces.taglib.LifecycleListener
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)
2007-12-06 16:11:25 StandardContext[/poeticWeb]Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
at com.sun.faces.config.processor.AbstractConfigProcessor.getNodeText(AbstractConfigProcessor.java:126)
at com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:148)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:125)
After I start the Tomcat I am getting the following error:
Dec 6, 2007 7:27:14 PM org.apache.struts.faces.taglib.LifecycleListener attributeAdded
INFO: attributeAdded(com.sun.faces.config.WebConfiguration,com.sun.faces.config.WebConfiguration@1de0c09)
Dec 6, 2007 7:27:14 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_07-b03-FCS) for context 'Poetic Web'
Dec 6, 2007 7:27:16 PM org.apache.struts.faces.taglib.LifecycleListener contextInitialized
INFO: contextInitialized()
Dec 6, 2007 7:27:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Dec 6, 2007 7:27:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Dec 6, 2007 7:27:16 PM org.apache.struts.faces.taglib.LifecycleListener conte..
Can you please help in this context.
Thanks,
Ravindra.