This is weird, i´m getting the same errors in Firefox 2.0, but in IE works
fine, don´t know why.

2007/4/12, Nathan Anderson <[EMAIL PROTECTED]>:

For some reason I'm not getting this... I added <s:head theme="ajax" />
to my page [I'd move it to "header.jsp" or something if I get this
working].  StaticFilter is configured to include "/struts/dojo/*" [was
"/scripts/dojo/*" but I changed it after finding that is not where
Struts 2 is loading them from].

But instead of getting the datetimepicker, I'm getting javascript errors
like this:

   GET http://localhost:8080/struts/dojo__package__.js404 (31ms)

So that is telling me that jetty is returning a 404 when the request of
"http://localhost:8080/struts/dojo__package__.js"; is made.  Which makes
sense because it should be like this
"http://localhost:8080/struts/dojo/__package__.js";.  Does this mean this
is a bug in Struts?  And if so how did other folks get this to work?
I'm using AppFuse_2.0-M4, but looking at the release notes of M5 I don't
see much that could make a difference.  Any suggestions?

Thanks,
Nathan Anderson

Matt Raible wrote:
> You're right, it does include it, but when doing performance
> tuning,they recommend you copy static resources to your webapp.
>> From http://struts.apache.org/2.x/docs/performance-tuning.html:
> <quote>Copy the static content from the Struts 2 jar when using the
> Ajaxtheme (Dojo) or the Calendar tag.
> Struts 2 uses some external javascript libraries and
> cascadingstylesheets for certain themes and tags. These by default are
> locatedinside the Struts 2 jar, and a special filter returns them
> whenrequesting a special path (/struts). Although Struts 2 can
> handlethese requests, an application/servlet container is not
> optimized forthese kind of requests. Consider moving these .js and
> .css files to aseperated server (Lighttpd, Apache HTTPD, ..).</quote>
> Matt
> On 4/12/07, Aridany Ramirez <[EMAIL PROTECTED]> wrote:> I
> think struts2-core.jar includes dojo, so it´s unnecessary copy dojo
> again,> only is needed the path where is deployed dojo.js and make the
> link.>> But your way works fine. I only had to remove <s:head
> theme="ajax">, but> nothing else.>> Thanks!!!!!> Muchas Gracias!!!!>
> Ari Ramirez.>>>>> 2007/4/12, J. David Mendoza <[EMAIL PROTECTED]>:>
> > This is what I did...> >> > - I downloaded the dojo-widget.tar.gz
> from http://dojotoolkit.org/.> > - Added the dojo.js to the
> src/main/webapp/scripts folder> > - Added the src directory to
> src/main/webapp/src folder> > - Then I added the dojo.js script link
> to the page I'm using it...> >> > (Without removing anything)> >> >
> David M.> >> > Aridany Ramirez wrote:> > > Hello again:> > >> > > I
> made a new project like you said, using 2.0-m5-SNAPSHOT and removed> >
> > all scriptaculous, prototype includes and code. Also adjusted the
> path> > > for StaticFilter to /struts/dojo, but still I have errors
> with dojo.> > > Any other ideas???> > >> > > Thanks!> > > Ari
> Ramirez.> > >> > >> > > 2007/4/12, Matt Raible
> <[EMAIL PROTECTED]> > > <mailto:[EMAIL PROTECTED] >>:> > >>
> > >     You could try removing scriptaculous and see if that helps.
> To do> > >     this, run "mvn package" and copy default.jsp from> >
> >     target/yourproject/decorators into your project.> > >> > >
> If that doesn't work, try creating a project using 2.0-m5-SNAPSHOT>
> and> > >     adjust the path for StaticFilter to point to Dojos path.
> However, I> > >     don't know if this will work b/c StaticFilter
> currently does not do> > >     anything to try and serve up Dojo files
> from struts.jar .> > >> > >     Matt> > >> > >     On 4/12/07, Aridany
> Ramirez <[EMAIL PROTECTED]> > >
> <mailto:[EMAIL PROTECTED]>> wrote:> > >     > Hello:> > >
> >> > >     > I follow the QuickStart Guide and created a new project
> (Struts> > >     2 Basic).> > >     >> > >     > I modified
> userForm.jsp to insert a s:datetimepicker so I> included:> > >     >>
> > >     > <s:head theme="ajax"/> in <head> section> > >     >> > >
> > <s:datetimepicker id="date" label=" label.date">
> format="dd/MM/yyyy">> > >     >> > >     > But the widget is not
> working. Firebug is showing errors with> > >     dojo (dojo is> >
> >     > not defined, dojoRequire.js , Line 1). I don´t know if dojo
> and> > >     > scriptaculous doesn´t fit well together or is related
> to other> > >     issue.> > >     >> > >     > Any ideas?> > >     >>
> > >     >> > >     > Thanks!> > >     > Ari Ramirez.> > >     >> > >>
> > >> > >     --> > >     http://raibledesigns.com> > >> > >> >> >>
> --------------------------------------------------------------------->
> > To unsubscribe, e-mail:> [EMAIL PROTECTED]> >
> For additional commands, e-mail: [EMAIL PROTECTED]> >> >>>
>
> -- http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to