Runtime error when integrating Struts2-Jquery Plugin Datepicker with Netbeans 7.1

235 views
Skip to first unread message

David VP

unread,
Apr 19, 2012, 11:34:13 AM4/19/12
to struts2...@googlegroups.com

I use Netbeans IDE v7.1 + Struts 2/XWork plugin with Struts 2.2.3 Libraries and Glassfish Server v3http://plugins.netbeans.org/plugin/39218

I have also integrated Struts2-Jquery plugin from here: Plugin Page at Google Code

The file I downloaded is: struts2-jquery-plugin-3.3.0.jar

First of all, I added it to the project as JAR/Folder Library.

Next, I copied the example code in a JSP page, with the following structure:

            <%-- 
               
Document   : calendarDemo
               
Created on : 18-abr-2012, 17:48:08
               
Author     : David32
           
--%>

           
<%@ taglib prefix="s" uri="/struts-tags"%>
           
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
           
<html>
             
<head>
               
<sj:head locale="es" jquerytheme="lightness"/>
               
<title>Datepicker Demo</title>
             
</head>
             
<body>
               
<s:form id="form" theme="xhtml">
                 
<sj:datepicker id="date0" name="date0" label="With Button Panel" showButtonPanel="true"/>
                 
<sj:datepicker id="date1" name="date1" label="Change Month and Year" changeMonth="true" changeYear="true"/>
                 
<sj:datepicker id="date2" name="date2" label="Custom Button Text" showOn="both" buttonText="Select a Date"/>
                 
<sj:datepicker id="date3" name="date3" label="Show only on Button Click" showOn="button"/>
                 
<sj:datepicker id="date4" name="date4" label="Text after selection" appendText=" (dd.MM.yy)" displayFormat="dd.MM.yy"/>
                 
<sj:datepicker id="date5" name="date5" label="With fast slideDown Animation" showAnim="slideDown" duration="fast"/>
                 
<sj:datepicker id="date6" name="date6" label="With slow fadeIn Animation" showAnim="fadeIn" showOptions="{direction: 'up' }" duration="slow" />
                 
<sj:datepicker id="date7" name="date7" label="Show 3 Months" numberOfMonths="3"/>
                 
<sj:datepicker id="date8" name="date8" label="Show Month Array" numberOfMonths="[2,3]"/>
                 
<sj:datepicker id="date9" name="date9" label="Show Years only from 2008 until 2012" yearRange="2008:2012" changeYear="true"/>
                 
<sj:datepicker id="date10" name="date10" label="Button Only" buttonImageOnly="true"/>
                 
<sj:datepicker id="date11" name="date11" label="Without Button" showOn="focus"/>
                 
<sj:datepicker id="date12" name="date12" label="With Close Event" onClose="onClose"/>
               
</s:form>
             
</body>
           
</html>

The start page as configured in web.xml is of course [b]calendars/calendarDemo.jsp[/b]

Netbeans doesn't detect any errors, as the Datepicker tag is correctly detected and checked. On the other hand, after getting deployed it gives only an Error 500 Page with the following notice:

            org.apache.jasper.JasperException: The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]

Does anybody know if there is anything I am missing to configure this plugin? ANY HELP WILL BE MUCH APPRECIATED !

I suspect maybe there is a <taglib> thing I am missing in web.xml

I could gladly paste the whole exception log in another post, because this current post is already too long.

Any help is much appreciated !

David VP

unread,
Apr 20, 2012, 9:39:08 AM4/20/12
to struts2...@googlegroups.com
After looking at the error log, the problem is the same as in this issue:


A workaround is to downgrade to version 3.2.1 and it worked.

jogep

unread,
Apr 27, 2012, 12:42:54 PM4/27/12
to struts2-jquery
Mayby this is related to this Issue:

http://code.google.com/p/struts2-jquery/issues/detail?id=800

Can you please try an current SNAPSHOT?

Johannes
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep



On Apr 20, 3:39 pm, David VP <ing.j...@gmail.com> wrote:
> After looking at the error log, the problem is the same as in this issue:
>
> http://code.google.com/p/struts2-jquery/issues/detail?id=238
>
> A workaround is to downgrade to version 3.2.1 and it worked.
>
> El jueves, 19 de abril de 2012 10:34:13 UTC-5, David VP escribió:
>
>
>
>
>
>
>
>
>
> > I use Netbeans IDE v7.1 + Struts 2/XWork plugin with Struts 2.2.3
> > Libraries and Glassfish Server v3http://plugins.netbeans.org/plugin/39218
>
> > I have also integrated Struts2-Jquery plugin from here: Plugin Page at
> > Google Code <http://code.google.com/p/struts2-jquery/wiki/DatePickerTag>
Reply all
Reply to author
Forward
0 new messages