You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Kevin Brown <et...@google.com> on 2008/01/12 10:21:30 UTC

Solution for serving static content.

Hey everyone,

I just submitted a change to java/gadgets/pom.xml that will ensure that any
static file dependencies (html, css, etc.) get pulled in, though we may need
to refine the configuration a bit to make complete sense. Currently this
just ensures that everything in ../../javascript with an html, css, or js
extension is copied into the root of the project, which makes it available
by pointing at gadgets/<path/to/file.html>. The only downside is that it
doesn't actually copy the files into src/main/webapp, so the jetty:run goal
won't see the files, and instead you'll have to use jetty:run-war.

If anyone has a better solution (ideally one that would allow the jetty:run
goal to work and not require jetty:run-war), please chime in.

~Kevin

Re: Solution for serving static content.

Posted by Kevin Brown <et...@google.com>.
I'll take care of it right now.

~Kevin

On Jan 15, 2008 9:59 AM, Cassie <do...@google.com> wrote:

> Chak just submitted an issue that recognized that .xml files need to be
> copied over too. Can you patch his change in Kevin?
>
> - Cassie
>
>
> On Mon, Jan 14, 2008 at 11:54 PM, Kevin Brown <et...@google.com> wrote:
>
> > I'd love to see wiki pages (when we get it up...) on running shindig on
> a
> > variety of server platforms. I don't think we should make compatibility
> > with
> > as many platforms as possible a goal, but if there are easy solutions
> like
> > this to common platform problems that can be solved through
> documentation,
> > I'm all for it.
> >
> > On Jan 14, 2008 10:36 PM, Paul Lindner <li...@inuus.com> wrote:
> >
> > > On Mon, Jan 14, 2008 at 09:36:23PM -0800, John Hjelmstad wrote:
> > > > Do you think it's worth changing the .getTextContent() references to
> > > > something DOM2 (or DOM1) compliant?
> > >
> > > Nah..  Resin 2.1 is awfully old..
> > >
> > > When we have a shindig wiki I'll put info on overcoming any of these
> > > obstacles.
> > >
> > > --
> > > Paul Lindner        ||||| | | | |  |  |  |   |   |
> > > lindner@inuus.com
> > >
> >
>

Re: Solution for serving static content.

Posted by Cassie <do...@google.com>.
Chak just submitted an issue that recognized that .xml files need to be
copied over too. Can you patch his change in Kevin?

- Cassie


On Mon, Jan 14, 2008 at 11:54 PM, Kevin Brown <et...@google.com> wrote:

> I'd love to see wiki pages (when we get it up...) on running shindig on a
> variety of server platforms. I don't think we should make compatibility
> with
> as many platforms as possible a goal, but if there are easy solutions like
> this to common platform problems that can be solved through documentation,
> I'm all for it.
>
> On Jan 14, 2008 10:36 PM, Paul Lindner <li...@inuus.com> wrote:
>
> > On Mon, Jan 14, 2008 at 09:36:23PM -0800, John Hjelmstad wrote:
> > > Do you think it's worth changing the .getTextContent() references to
> > > something DOM2 (or DOM1) compliant?
> >
> > Nah..  Resin 2.1 is awfully old..
> >
> > When we have a shindig wiki I'll put info on overcoming any of these
> > obstacles.
> >
> > --
> > Paul Lindner        ||||| | | | |  |  |  |   |   |
> > lindner@inuus.com
> >
>

Re: Solution for serving static content.

Posted by Kevin Brown <et...@google.com>.
I'd love to see wiki pages (when we get it up...) on running shindig on a
variety of server platforms. I don't think we should make compatibility with
as many platforms as possible a goal, but if there are easy solutions like
this to common platform problems that can be solved through documentation,
I'm all for it.

On Jan 14, 2008 10:36 PM, Paul Lindner <li...@inuus.com> wrote:

> On Mon, Jan 14, 2008 at 09:36:23PM -0800, John Hjelmstad wrote:
> > Do you think it's worth changing the .getTextContent() references to
> > something DOM2 (or DOM1) compliant?
>
> Nah..  Resin 2.1 is awfully old..
>
> When we have a shindig wiki I'll put info on overcoming any of these
> obstacles.
>
> --
> Paul Lindner        ||||| | | | |  |  |  |   |   |
> lindner@inuus.com
>

Re: Solution for serving static content.

Posted by Paul Lindner <li...@inuus.com>.
On Mon, Jan 14, 2008 at 09:36:23PM -0800, John Hjelmstad wrote:
> Do you think it's worth changing the .getTextContent() references to
> something DOM2 (or DOM1) compliant?

Nah..  Resin 2.1 is awfully old..

When we have a shindig wiki I'll put info on overcoming any of these
obstacles.

-- 
Paul Lindner        ||||| | | | |  |  |  |   |   |
lindner@inuus.com

Re: Solution for serving static content.

Posted by John Hjelmstad <fa...@google.com>.
Do you think it's worth changing the .getTextContent() references to
something DOM2 (or DOM1) compliant?

--John

On Mon, Jan 14, 2008 at 5:39 PM, Paul Lindner <pl...@hi5.com> wrote:

> On Sat, Jan 12, 2008 at 01:21:30AM -0800, Kevin Brown wrote:
> > Hey everyone,
> >
> > I just submitted a change to java/gadgets/pom.xml that will ensure that
> any
> > static file dependencies (html, css, etc.) get pulled in, though we may
> need
> > to refine the configuration a bit to make complete sense. Currently this
> > just ensures that everything in ../../javascript with an html, css, or
> js
> > extension is copied into the root of the project, which makes it
> available
> > by pointing at gadgets/<path/to/file.html>. The only downside is that it
> > doesn't actually copy the files into src/main/webapp, so the jetty:run
> goal
> > won't see the files, and instead you'll have to use jetty:run-war.
> >
> > If anyone has a better solution (ideally one that would allow the
> jetty:run
> > goal to work and not require jetty:run-war), please chime in.
>
> Thanks for this, the generated war file is working in my tomcat 6.0.14
> container.
>
> Deploying gadgets.war to our old version of Resin required that I add
> the following lines to resin.conf:
>
>  <system-property javax.xml.parsers.DocumentBuilderFactory="
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
>  <system-property javax.xml.parsers.SAXParserFactory="
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
>
> Without this Resin uses a DOM Level 2 parser.  This causes problems
> with calls to getTextContent() which results in lines like this in the
> error log:
>
> java.lang.UnsupportedOperationException at
> com.caucho.xml.QAbstractNode.getTextContent(QAbstractNode.java:301)
>
>
> --
> Paul Lindner
> hi5 Architect
> plindner@hi5.com
>

Re: Solution for serving static content.

Posted by Paul Lindner <pl...@hi5.com>.
On Sat, Jan 12, 2008 at 01:21:30AM -0800, Kevin Brown wrote:
> Hey everyone,
> 
> I just submitted a change to java/gadgets/pom.xml that will ensure that any
> static file dependencies (html, css, etc.) get pulled in, though we may need
> to refine the configuration a bit to make complete sense. Currently this
> just ensures that everything in ../../javascript with an html, css, or js
> extension is copied into the root of the project, which makes it available
> by pointing at gadgets/<path/to/file.html>. The only downside is that it
> doesn't actually copy the files into src/main/webapp, so the jetty:run goal
> won't see the files, and instead you'll have to use jetty:run-war.
> 
> If anyone has a better solution (ideally one that would allow the jetty:run
> goal to work and not require jetty:run-war), please chime in.

Thanks for this, the generated war file is working in my tomcat 6.0.14
container.

Deploying gadgets.war to our old version of Resin required that I add
the following lines to resin.conf:

  <system-property javax.xml.parsers.DocumentBuilderFactory="com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
  <system-property javax.xml.parsers.SAXParserFactory="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>

Without this Resin uses a DOM Level 2 parser.  This causes problems
with calls to getTextContent() which results in lines like this in the
error log:

java.lang.UnsupportedOperationException at
com.caucho.xml.QAbstractNode.getTextContent(QAbstractNode.java:301)
 

-- 
Paul Lindner
hi5 Architect
plindner@hi5.com