You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sharath Reddy <sh...@yahoo.com> on 2004/04/14 14:43:01 UTC
how to use JSF tree control in a Struts application?
hello,
i have an existing struts application, and i need to
add a tree control. i thought i would take a look at
JSF. however, the only concrete example i found for
integrating struts and JSF:
http://www-106.ibm.com/developerworks/library/j-integrate/
deals only with a simple form. is it possible to use
the tree control? how do i distinguish between the
different kinds of clicks (node expanded vs. leaf
selected) in my struts action class?
thanks!
sharath
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to use JSF tree control in a Struts application?
Posted by snpe <sn...@snpe.co.yu>.
On Thursday 15 April 2004 04:43 pm, Craig McClanahan wrote:
> >
> >
> OK. So, what happens if you do *not* make the validation.xml change
> above? (Trying to narrow down the possibilities here).
>
> FWIW, I've been testing struts-faces against the Struts 1.1 release, not
> the HEAD of CVS, since that is what most people will be using it with.
> Yes, I do indeed need to test against the latest code too, but you could
> be encountering issues because of things that have changed since 1.1.
>
> Craig
>
I start from begining -
- download struts-faces-20040407.tar.gz
- add jsf libraries in WEB-INF/lib and jsf tlds WEB-INF
all libraries are from struts-faces and JSF 1.0 final - I add only log4j-1.2.8.jar
(I have one applications from dbforms distribution - bookstore.war and after deploy this application
I have to have commons-loggings and log4j libs in all applications - I don't know why)
tomcat 5.0.19 start struts-faces fine
- call localhost:8080/struts-faces and this work
- register users work fine (I try empty filed and get errors fine)
- I register user abcd (4 char) and it work fine)
- log off
- log on with abcd (password abcd) work fine
- log off
- log on and click button 'Log on' with empty username and password and this is error :
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
root cause
java.lang.NullPointerException
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:676)
javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:323)
javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:574)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:461)
org.apache.jsp.logon_jsp._jspx_meth_s_errors_0(logon_jsp.java:131)
org.apache.jsp.logon_jsp._jspService(logon_jsp.java:104)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0 logs.
Apache Tomcat/5.0
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to use JSF tree control in a Struts application?
Posted by Craig McClanahan <cr...@apache.org>.
snpe wrote:
>On Thursday 15 April 2004 01:04 am, Craig McClanahan wrote:
>
>
>>snpe wrote:
>>
>>
>>
>>>I compile struts-faces2 from cvs and i get next error when I try log in
>>>(I register, log off and try log in) :
>>>
>>>
>>>
>>>
>>>
>>You would get an exception like this if the custom renderers in
>>struts-faces.jar were not registered with JSF, which might in turn
>>happen if you didn't include all the JARs, or you're running on a broken
>>servlet container that doesn't recognize TLDs inside JAR files. Could
>>you double check that you've included struts-faces.jar, jsf-api.jar, and
>>jsf-impl.jar inside /WEB-INF/lib? What container (and version) are you
>>running on? Finally, were there any logged errors when the app was
>>initially deployed?
>>
>>If that all looks right, could you please give me a precise script to
>>reproduce the problem? When I try what you describe above, it works
>>fine for me.
>>
>>Craig
>>
>>
>>
>
>I user tomcat 5.0.19, struts from cvs and struts-faces2 from cvs on linux
>struts-faces.jar, jsf-api.jar and jsf-impl.jar are in WEB-INF/lib and all tlds in WEB_INF (jsf 1.0 final)
>It haven't error on startup, but I change validation.xml and validator-rules.xml (add <?xml and DOCTYPE declaration
>on the beginning) like this :
><?xml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE form-validation PUBLIC
> "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN"
> "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
>
>validator is last from cvs
>I can log on when I type login with 3 or more characters (validator), but If I
>type nothing or 2 character I get this error
>
>
>
OK. So, what happens if you do *not* make the validation.xml change
above? (Trying to narrow down the possibilities here).
FWIW, I've been testing struts-faces against the Struts 1.1 release, not
the HEAD of CVS, since that is what most people will be using it with.
Yes, I do indeed need to test against the latest code too, but you could
be encountering issues because of things that have changed since 1.1.
Craig
>regards
>Haris Peco
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to use JSF tree control in a Struts application?
Posted by snpe <sn...@snpe.co.yu>.
On Thursday 15 April 2004 01:04 am, Craig McClanahan wrote:
> snpe wrote:
>
> >I compile struts-faces2 from cvs and i get next error when I try log in
> >(I register, log off and try log in) :
> >
> >
> >
> You would get an exception like this if the custom renderers in
> struts-faces.jar were not registered with JSF, which might in turn
> happen if you didn't include all the JARs, or you're running on a broken
> servlet container that doesn't recognize TLDs inside JAR files. Could
> you double check that you've included struts-faces.jar, jsf-api.jar, and
> jsf-impl.jar inside /WEB-INF/lib? What container (and version) are you
> running on? Finally, were there any logged errors when the app was
> initially deployed?
>
> If that all looks right, could you please give me a precise script to
> reproduce the problem? When I try what you describe above, it works
> fine for me.
>
> Craig
>
I user tomcat 5.0.19, struts from cvs and struts-faces2 from cvs on linux
struts-faces.jar, jsf-api.jar and jsf-impl.jar are in WEB-INF/lib and all tlds in WEB_INF (jsf 1.0 final)
It haven't error on startup, but I change validation.xml and validator-rules.xml (add <?xml and DOCTYPE declaration
on the beginning) like this :
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
validator is last from cvs
I can log on when I type login with 3 or more characters (validator), but If I
type nothing or 2 character I get this error
regards
Haris Peco
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to use JSF tree control in a Struts application?
Posted by Craig McClanahan <cr...@apache.org>.
snpe wrote:
>I compile struts-faces2 from cvs and i get next error when I try log in
>(I register, log off and try log in) :
>
>
>
You would get an exception like this if the custom renderers in
struts-faces.jar were not registered with JSF, which might in turn
happen if you didn't include all the JARs, or you're running on a broken
servlet container that doesn't recognize TLDs inside JAR files. Could
you double check that you've included struts-faces.jar, jsf-api.jar, and
jsf-impl.jar inside /WEB-INF/lib? What container (and version) are you
running on? Finally, were there any logged errors when the app was
initially deployed?
If that all looks right, could you please give me a precise script to
reproduce the problem? When I try what you describe above, it works
fine for me.
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to use JSF tree control in a Struts application?
Posted by snpe <sn...@snpe.co.yu>.
I compile struts-faces2 from cvs and i get next error when I try log in
(I register, log off and try log in) :
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
root cause
java.lang.NullPointerException
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:676)
javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:323)
javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:574)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:461)
org.apache.jsp.logon_jsp._jspx_meth_s_errors_0(logon_jsp.java:131)
org.apache.jsp.logon_jsp._jspService(logon_jsp.java:104)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0 logs
On Wednesday 14 April 2004 04:07 pm, Matthias Wessendorf wrote:
> Hi,
>
> did you look into struts-faces
> there are two examples(one with tiles)
>
> the jsps are all with JSF-"Tags"
>
> and there is a <h:commandLink action="#{backingBean.method}"
> ...>-Componentent,
> the
> public String method(){
>
> }
> call a struts-action (on ExternalContext.dispatch)
>
> i hope/guess you mean that.
>
> cheers,
>
> Matthias
>
> PS: three backingBeans are included in example2...
>
>
> > -----Original Message-----
> > From: Sharath Reddy [mailto:sharathlists@yahoo.com]
> > Sent: Wednesday, April 14, 2004 2:43 PM
> > To: user@struts.apache.org
> > Subject: how to use JSF tree control in a Struts application?
> >
> >
> > hello,
> >
> > i have an existing struts application, and i need to
> > add a tree control. i thought i would take a look at
> > JSF. however, the only concrete example i found for
> > integrating struts and JSF:
> >
> http://www-106.ibm.com/developerworks/library/j-integrate/
>
> deals only with a simple form. is it possible to use
> the tree control? how do i distinguish between the
> different kinds of clicks (node expanded vs. leaf
> selected) in my struts action class?
>
> thanks!
>
> sharath
>
>
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: how to use JSF tree control in a Struts application?
Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Hi,
did you look into struts-faces
there are two examples(one with tiles)
the jsps are all with JSF-"Tags"
and there is a <h:commandLink action="#{backingBean.method}"
...>-Componentent,
the
public String method(){
}
call a struts-action (on ExternalContext.dispatch)
i hope/guess you mean that.
cheers,
Matthias
PS: three backingBeans are included in example2...
> -----Original Message-----
> From: Sharath Reddy [mailto:sharathlists@yahoo.com]
> Sent: Wednesday, April 14, 2004 2:43 PM
> To: user@struts.apache.org
> Subject: how to use JSF tree control in a Struts application?
>
>
> hello,
>
> i have an existing struts application, and i need to
> add a tree control. i thought i would take a look at
> JSF. however, the only concrete example i found for
> integrating struts and JSF:
>
http://www-106.ibm.com/developerworks/library/j-integrate/
deals only with a simple form. is it possible to use
the tree control? how do i distinguish between the
different kinds of clicks (node expanded vs. leaf
selected) in my struts action class?
thanks!
sharath
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org