You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joakim Olsson <ar...@lingonpaj.com> on 2007/08/11 20:49:20 UTC

Problem with optiontransferselect when loaded via an AJAX

Hi,

I have a page with an optiontransferselect which works ok if called
directly via the action in the browser. If I load the page from within
another page via an AJAX <s:a> I get the following in the AJAX debug:
FATAL exception raised: bad srcObj for srcFunc: onsubmit

What have I done wrong?

I have a small test-project with my classes and jsp's etc. at:
http://lingonpaj.com/Struts2Test.tar.bz2

Regards,
Joakim



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with optiontransferselect when loaded via an AJAX

Posted by Joakim Olsson <ar...@lingonpaj.com>.
Hi,

But I don't get any null pointer exceptions (or are they hidden somewhere
inside the framework?).

Regards,
Joakim


> Joakkim take a look at this-
>
> Hi,
> There seems to be a bug in the struts 2 taglib, in the last release
> (Struts
> 2.0.6).
> If the jsp don't come from a struts 2 interceptor stack (from an action,
> for
> exemple), you get a null pointer exception when you hit the first struts
> tag
> ("<s:xxx...>").
> I hope it will be corrected soon. I will look to bug report to see if it
> has
> been reported; I think so.
> http://www.mail-archive.com/user@struts.apache.org/msg57582.html
> Cheers,
> Cyril
>
> /*I got as far as index.jsp producing NPE at line 10*/
> Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Exception in JSP: /index.jsp:10
>
> 7: <html xmlns="http://www.w3.org/1999/xhtml">
> 8: <head>
> 9: <title>Struts2Test</title>
> 10: <s:head debug="true" />
> 11: </head>
> 12: <body>
> 13: <s:div id="nonfooter">
>
>
> Stacktrace:
> 	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
> 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
> 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> root cause
>
> java.lang.NullPointerException
> 	org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
> /*The workaround is to have your action class actually create the jsp and
> then forward to it..
> i think this is a genuine bug..
> I dont know if there is jira or bugzilla available on struts206 but I
> would
> grep thru these entries..
>
> FWIW/
> M--
> */
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message -----
> From: "Joakim Olsson" <ar...@lingonpaj.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Saturday, August 11, 2007 2:49 PM
> Subject: Problem with optiontransferselect when loaded via an AJAX <s:a>
>
>
>> Hi,
>>
>> I have a page with an optiontransferselect which works ok if called
>> directly via the action in the browser. If I load the page from within
>> another page via an AJAX <s:a> I get the following in the AJAX debug:
>> FATAL exception raised: bad srcObj for srcFunc: onsubmit
>>
>> What have I done wrong?
>>
>> I have a small test-project with my classes and jsp's etc. at:
>> http://lingonpaj.com/Struts2Test.tar.bz2
>>
>> Regards,
>> Joakim
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: Problem with optiontransferselect when loaded via an AJAX

Posted by Musachy Barroso <mu...@gmail.com>.
This is a java JSP/Servlet thing more than struts itself. The JSP is
evaluated by the container so it needs to exists somewhere on the file
system(not inside a jar) before dispatching to it.

musachy

On 8/11/07, Martin Gainty <mg...@hotmail.com> wrote:
> Joakkim take a look at this-
>
> Hi,
> There seems to be a bug in the struts 2 taglib, in the last release (Struts
> 2.0.6).
> If the jsp don't come from a struts 2 interceptor stack (from an action, for
> exemple), you get a null pointer exception when you hit the first struts tag
> ("<s:xxx...>").
> I hope it will be corrected soon. I will look to bug report to see if it has
> been reported; I think so.
> http://www.mail-archive.com/user@struts.apache.org/msg57582.html
> Cheers,
> Cyril
>
> /*I got as far as index.jsp producing NPE at line 10*/
> Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Exception in JSP: /index.jsp:10
>
> 7: <html xmlns="http://www.w3.org/1999/xhtml">
> 8: <head>
> 9: <title>Struts2Test</title>
> 10: <s:head debug="true" />
> 11: </head>
> 12: <body>
> 13: <s:div id="nonfooter">
>
>
> Stacktrace:
>         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
>         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
>         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> root cause
>
> java.lang.NullPointerException
>         org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
> /*The workaround is to have your action class actually create the jsp and
> then forward to it..
> i think this is a genuine bug..
> I dont know if there is jira or bugzilla available on struts206 but I would
> grep thru these entries..
>
> FWIW/
> M--
> */
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message -----
> From: "Joakim Olsson" <ar...@lingonpaj.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Saturday, August 11, 2007 2:49 PM
> Subject: Problem with optiontransferselect when loaded via an AJAX <s:a>
>
>
> > Hi,
> >
> > I have a page with an optiontransferselect which works ok if called
> > directly via the action in the browser. If I load the page from within
> > another page via an AJAX <s:a> I get the following in the AJAX debug:
> > FATAL exception raised: bad srcObj for srcFunc: onsubmit
> >
> > What have I done wrong?
> >
> > I have a small test-project with my classes and jsp's etc. at:
> > http://lingonpaj.com/Struts2Test.tar.bz2
> >
> > Regards,
> > Joakim
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with optiontransferselect when loaded via an AJAX

Posted by Martin Gainty <mg...@hotmail.com>.
Joakkim take a look at this-

Hi,
There seems to be a bug in the struts 2 taglib, in the last release (Struts 
2.0.6).
If the jsp don't come from a struts 2 interceptor stack (from an action, for 
exemple), you get a null pointer exception when you hit the first struts tag 
("<s:xxx...>").
I hope it will be corrected soon. I will look to bug report to see if it has 
been reported; I think so.
http://www.mail-archive.com/user@struts.apache.org/msg57582.html
Cheers,
Cyril

/*I got as far as index.jsp producing NPE at line 10*/
Exception report

message

description The server encountered an internal error () that prevented it 
from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /index.jsp:10

7: <html xmlns="http://www.w3.org/1999/xhtml">
8: <head>
9: <title>Struts2Test</title>
10: <s:head debug="true" />
11: </head>
12: <body>
13: <s:div id="nonfooter">


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.NullPointerException
	org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
/*The workaround is to have your action class actually create the jsp and 
then forward to it..
i think this is a genuine bug..
I dont know if there is jira or bugzilla available on struts206 but I would 
grep thru these entries..

FWIW/
M--
*/
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Joakim Olsson" <ar...@lingonpaj.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Saturday, August 11, 2007 2:49 PM
Subject: Problem with optiontransferselect when loaded via an AJAX <s:a>


> Hi,
>
> I have a page with an optiontransferselect which works ok if called
> directly via the action in the browser. If I load the page from within
> another page via an AJAX <s:a> I get the following in the AJAX debug:
> FATAL exception raised: bad srcObj for srcFunc: onsubmit
>
> What have I done wrong?
>
> I have a small test-project with my classes and jsp's etc. at:
> http://lingonpaj.com/Struts2Test.tar.bz2
>
> Regards,
> Joakim
>
>
>
> ---------------------------------------------------------------------
> 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: Problem with optiontransferselect when loaded via an AJAX

Posted by Joakim Olsson <ar...@lingonpaj.com>.
Hi Martin,

Thanks for looking into my problem.

There is now a gzip:ed tar-archive at
http://lingonpaj.com/Struts2Test.tar.gz

Regards,
Joakim


On lör, 2007-08-11 at 17:25 -0400, Martin Gainty wrote:
> Joakim-
> 
> I am unable to decompress te supplied file
> can you use a compression utility like tar or zip and re-transmit
> 
> Tak/Tak
> Martin
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> ----- Original Message ----- 
> From: "Joakim Olsson" <ar...@lingonpaj.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Saturday, August 11, 2007 2:49 PM
> Subject: Problem with optiontransferselect when loaded via an AJAX <s:a>
> 
> 
> > Hi,
> > 
> > I have a page with an optiontransferselect which works ok if called
> > directly via the action in the browser. If I load the page from within
> > another page via an AJAX <s:a> I get the following in the AJAX debug:
> > FATAL exception raised: bad srcObj for srcFunc: onsubmit
> > 
> > What have I done wrong?
> > 
> > I have a small test-project with my classes and jsp's etc. at:
> > http://lingonpaj.com/Struts2Test.tar.bz2
> > 
> > Regards,
> > Joakim
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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