You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xang-dev@xml.apache.org by "S. Mike Dierken" <md...@hotmail.com> on 2001/08/08 21:25:16 UTC

Update to xang.war for Tomcat

The version of Xang in the xang.war in my previous message is a not-yet-checked-in version.
It has a new mode that is a workaround to the inability of servlet engines to provide 'extra path info' to servlets that handle file extensions (like *.xap).
In the xang.cfg you can specify one .xap file as the 'app' file. This will let you use a URL that doesn't have a .xap extension in it & you can do sub-url addressing.

For example:
http://localhost:8080/xang/servlet/xang/base64/

Without this fix the url could be a nice and simple 
http://localhost:8080/xang/samples/hello/hello.xap/base64/  - but that would break.


mike
  ----- Original Message ----- 
  From: Mark Puckett 
  To: S. Mike Dierken 
  Sent: Wednesday, August 08, 2001 11:14 AM
  Subject: Re: How can I help!


  Hey Mike, 

  So I'm getting closer on getting the sample to run.  When I execute http://localhost/xang/hello.xap I just get the source of the page.  So it seems likely that I've still got a disconnect between tomcat/xang making it use the xang servlet to process the page.  Sound correct?

  I can't believe how long this has taken to fumble through this.  

  -Mark
    ----- Original Message ----- 
    From: S. Mike Dierken 
    To: xang-dev@xml.apache.org 
    Sent: Friday, August 03, 2001 10:19 PM
    Subject: Re: How can I help!


    I've found that the different versions of XML parsers between Tomcat and Xerces are causing problems.
    The Xang code extends the xml Document class & I think there is a problem doing that when the base class is loaded by the default classloader & the Xang code is loaded by the 'change-aware' Tomcat classloader.

    I was able to fix the problem by putting ALL Xang code in the classpath - in startup.bat or wherever. This includes the FESI JavaScript engine.

    For example:
    set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xerces.jar
    set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xalan.jar
    set CLASSPATH=%CLASSPATH%;C:\Jakarta\tomcat\webapps\xang\WEB-INF\classes
    set CLASSPATH=%CLASSPATH%;C:\projects\apache\modules\xml-xang\java\classpath\fesi.zip;

    Now, the next problem is my sample .xap files reference an out of date Xalan class.... onward and upward.

    mike
      ----- Original Message ----- 
      From: Jason Prescott Wohlford 
      To: Xang Dev 
      Sent: Tuesday, July 31, 2001 2:35 PM
      Subject: Re: How can I help!


      Mike,

      What version of Tomcat do you prefer? Tomcat 3.2? 3.3? or 4?

      Jason

      On Monday, July 30, 2001, at 04:53 PM, Mike Dierken wrote:


        Tomcat only really needs a Java VM, so I think you probably can get it to work for OS-X.
         
        mike

        -----Original Message-----
        From: Jason Prescott Wohlford [mailto:wohlford@pobox.com]
        Sent: Monday, July 30, 2001 2:38 PM
        To: mike@DataChannel.com
        Subject: Fwd: How can I help!

        Mike,


        I don't have a servlet engine installed. I'll try to see if Tomcat is available for my platform. I'll also try to install it. I'm not comfortable with Java at all.


        Below is information I sent to you earlier. It pretty much explains everything.


        Thanks for getting back to me so quickly this time. Greatly appreciated.


        Jason


        Begin forwarded message:


        From: Jason Prescott Wohlford <wo...@pobox.com>

        Date: Thu Jul 26, 2001 10:05:14 AM US/Central

        To: xang-dev@xml.apache.org

        Subject: Re: How can I help!


        Good gravy, you are exactly what I've been looking for...


        Wonderful!


        My AIM name is <JasonWohlford>. My ICQ number is <112823231>. Your welcome to chat with me on which ever. Right now, you'll find me on AIM more often.


        I'll be able to help with development best between the hours of 8:30-5:00 p.m. CST at work. I have great flexibility from my wonderful employer Brian Belsterling, President of The Copy Center. As long as I can show, if asked, that I am benefiting The Copy Center and get the rest of my work done it will be fine. Therefore, I'd eventually like to convert my client-side JavaScript site at <SylvanOrder.com> to Xang.


        I have a very strong understanding of JavaScript. I also understand XML to a reasonable degree. (Hey, what's really to understand.) I'm quite weak in XSL; and have almost no knowledge of Apache configuration. That being said, I love to code. I love to code to spec. I love XML, XSL, the DOM, and JavaScript and am passionate about them. They rock.


        I accept and agree with the Apache license and am very interested in contributing to open source. Although I like Linux, I'm not much for the GPL. I do like the FreeBSD license very much, although I've never run straight FreeBSD.


        This is my configuration is the tricky part. At work, I am running Mac OS X (based on many BSDs). It has Apache built in. According to Apple it also has a very strong Java2 environment. The Mac OS X box is what I'll be using most of the time. At home, I should have a Linux-Mandrake 8.0 box running this weekend. My replacement motherboard should be arriving today or tomorrow. It has telnet and maybe SSH access? How shall I proceed?


        Jason


        On Wednesday, July 25, 2001, at 09:40 PM, S. Mike Dierken wrote:


        Good gravy, you are exactly what I've been looking for...


        The installation instructions are a bit old & are on the apache site - I

        will help you get it installed on whatever servlet engine you currently

        have.

        Xang is a Java servlet, which requires a servlet engine. I wrote it with

        JServ, but have moved to Tomcat since then. There are a few

        incompatibilities between servlet engines & between versions of the Java

        servlet specification from Sun.


        While we get this thing configured for you machine, tell me a bit about your

        software environment & what you hope to do with Xang.

        If you have an instant messaging client, we can chat during your

        installation & I can work through any problems that might pop up.


        Mike


        Here are the instructions I wrote a long time ago:

        ===

        The Apache Xang engine is currently implemented as a Java Servlet. You must

        include xang.jar, xalan.jar, xerces.jar and fesi.zip in the Servlet class

        path. Consult your Servlet engine documentation for detailed instructions.


        The Xang servlet needs to be registered with your Servlet engine. The

        servlet class name is: org.apache.xang.net.http.object.impl.HTTPObjectServer


        The servlet initialization parameters are: config=full-path/to/your/xang.cfg


        For the Apache JServ servlet engine, this is the configuration information

        to place in zone.properties to register the Xang servlet:

        servlet.org.apache.xang.net.http.object.impl.HTTPObjectServer.initArgs=confi

        g=full-path/to/your/xang.cfg


        In addition, the Web server or Servlet engine needs to be configured to pass

        requests to files with a .XAP extension to the Xang servlet. Consult your

        Servlet engine documentation for detailed instructions.


        For the Apache JServ servlet engine, this is the configuration information

        to place in zone.properties to register the Xang servlet:

        servlet.org.apache.xang.net.http.object.impl.HTTPObjectServer.initArgs=confi

        g=D:\projects\apache\modules\xml-xang\java\src\org\apache\xang\xap\xang.cfg

        For the Apache JServ servlet engine, this is the configuration information

        to place in the jserv.conf for getting the Xang servlet to handle .xap

        files:

        ApJServAction .xap

        /servlets/org.apache.xang.net.http.object.impl.HTTPObjectServer


        To run XSLT extensions, include bsf.jar and bsfengines.jar. All these JAR

        files are distributed with Xalan. For extensions implemented in JavaScript

        or another scripting language, see the Xalan extensions language

        requirements to identify any additional JAR files you must place on the

        class path and where you can get them.

        ===





        ----- Original Message -----

        From: "Jason Prescott Wohlford" <wo...@pobox.com>

        To: <xa...@xml.apache.org>

        Sent: Wednesday, July 25, 2001 12:38 PM

        Subject: How can I help!



        Mike,


        I've had dreams wanting something like what Xang does. I scoured the web for

        months trying to find something that handles XML, XSL, and JavaScript. It

        has huge potential!


        I have some issues with the project. First, how in the heck do I install it?

        Where's all the documentation. It seem quite sparse and difficult to

        understand.


        I want to work on this project. I'm extremely passionate about Xang. How can

        I become involved!?


        Jason


        --

        Jason Prescott Wohlford

        <wo...@pobox.com>




        ---------------------------------------------------------------------

        To unsubscribe, e-mail: xang-dev-unsubscribe@xml.apache.org

        For additional commands, e-mail: xang-dev-help@xml.apache.org





        --

        Jason Prescott Wohlford

        <wo...@pobox.com>




      -- 
      Jason Prescott Wohlford
      <wo...@pobox.com>


Re: Update to xang.war for Tomcat

Posted by Mark Puckett <ma...@yahoo.com>.
Okay, I put the xang.war file in the tomcat/webapps
dir, but it didn't *appear* to have any affect.  

I was getting a class loader failure so I copied
xerces.jar and xalan.jar into the tomcat/lib dir and
rearranged my classpath as you suggested.  I am,
however, still referencing xang.jar adn fesi.zip from
my xang installation.

Here is what I'm getting now:
java.lang.NoSuchMethodError: org.w3c.dom.Document:
method
createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
not found
	at
org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java:1129)
	at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1197)
	at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
	at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1005)
	at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
	at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
	at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1076)
	at
org.apache.xang.xap.xml.DynamicDocument.doLoad(DynamicDocument.java:401)
	at
org.apache.xang.xap.xml.DynamicDocument.load(DynamicDocument.java:149)
	at
org.apache.xang.xap.XapSystem.getDoc(XapSystem.java:113)
	at
org.apache.xang.xap.XapSystem.getChild(XapSystem.java:188)
	at
org.apache.xang.net.http.object.impl.HTTPRequestHandler.service(HTTPRequestHandler.java:289)
	at
org.apache.xang.net.http.object.impl.HTTPRequestHandler.service(HTTPRequestHandler.java:242)
	at
org.apache.xang.net.http.object.impl.HTTPObjectServer.service(HTTPObjectServer.java:144)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at
org.apache.tomcat.core.Handler.service(Handler.java:287)
	at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
	at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
	at java.lang.Thread.run(Thread.java:479)

By the way, perhaps I missed this somewhere along the
way, but trying to execute on port 8080 yields this
error, whereas port 80 still just shows me the .xap
source.  Can I assume that I still have a diconnect
between apache and tomcat?  Or do I always have to use
8080?

-Mark  

--- "S. Mike Dierken" <md...@hotmail.com> wrote:
> The version of Xang in the xang.war in my previous
> message is a not-yet-checked-in version.
> It has a new mode that is a workaround to the
> inability of servlet engines to provide 'extra path
> info' to servlets that handle file extensions (like
> *.xap).
> In the xang.cfg you can specify one .xap file as the
> 'app' file. This will let you use a URL that doesn't
> have a .xap extension in it & you can do sub-url
> addressing.
> 
> For example:
> http://localhost:8080/xang/servlet/xang/base64/
> 
> Without this fix the url could be a nice and simple 
>
http://localhost:8080/xang/samples/hello/hello.xap/base64/
>  - but that would break.
> 
> 
> mike
>   ----- Original Message ----- 
>   From: Mark Puckett 
>   To: S. Mike Dierken 
>   Sent: Wednesday, August 08, 2001 11:14 AM
>   Subject: Re: How can I help!
> 
> 
>   Hey Mike, 
> 
>   So I'm getting closer on getting the sample to
> run.  When I execute http://localhost/xang/hello.xap
> I just get the source of the page.  So it seems
> likely that I've still got a disconnect between
> tomcat/xang making it use the xang servlet to
> process the page.  Sound correct?
> 
>   I can't believe how long this has taken to fumble
> through this.  
> 
>   -Mark
>     ----- Original Message ----- 
>     From: S. Mike Dierken 
>     To: xang-dev@xml.apache.org 
>     Sent: Friday, August 03, 2001 10:19 PM
>     Subject: Re: How can I help!
> 
> 
>     I've found that the different versions of XML
> parsers between Tomcat and Xerces are causing
> problems.
>     The Xang code extends the xml Document class & I
> think there is a problem doing that when the base
> class is loaded by the default classloader & the
> Xang code is loaded by the 'change-aware' Tomcat
> classloader.
> 
>     I was able to fix the problem by putting ALL
> Xang code in the classpath - in startup.bat or
> wherever. This includes the FESI JavaScript engine.
> 
>     For example:
>     set
> CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xerces.jar
>     set
> CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xalan.jar
>     set
>
CLASSPATH=%CLASSPATH%;C:\Jakarta\tomcat\webapps\xang\WEB-INF\classes
>     set
>
CLASSPATH=%CLASSPATH%;C:\projects\apache\modules\xml-xang\java\classpath\fesi.zip;
> 
>     Now, the next problem is my sample .xap files
> reference an out of date Xalan class.... onward and
> upward.
> 
>     mike
>       ----- Original Message ----- 
>       From: Jason Prescott Wohlford 
>       To: Xang Dev 
>       Sent: Tuesday, July 31, 2001 2:35 PM
>       Subject: Re: How can I help!
> 
> 
>       Mike,
> 
>       What version of Tomcat do you prefer? Tomcat
> 3.2? 3.3? or 4?
> 
>       Jason
> 
>       On Monday, July 30, 2001, at 04:53 PM, Mike
> Dierken wrote:
> 
> 
>         Tomcat only really needs a Java VM, so I
> think you probably can get it to work for OS-X.
>          
>         mike
> 
>         -----Original Message-----
>         From: Jason Prescott Wohlford
> [mailto:wohlford@pobox.com]
>         Sent: Monday, July 30, 2001 2:38 PM
>         To: mike@DataChannel.com
>         Subject: Fwd: How can I help!
> 
>         Mike,
> 
> 
>         I don't have a servlet engine installed.
> I'll try to see if Tomcat is available for my
> platform. I'll also try to install it. I'm not
> comfortable with Java at all.
> 
> 
>         Below is information I sent to you earlier.
> It pretty much explains everything.
> 
> 
>         Thanks for getting back to me so quickly
> this time. Greatly appreciated.
> 
> 
>         Jason
> 
> 
>         Begin forwarded message:
> 
> 
>         From: Jason Prescott Wohlford
> <wo...@pobox.com>
> 
>         Date: Thu Jul 26, 2001 10:05:14 AM
> US/Central
> 
>         To: xang-dev@xml.apache.org
> 
>         Subject: Re: How can I help!
> 
> 
>         Good gravy, you are exactly what I've been
> looking for...
> 
> 
>         Wonderful!
> 
> 
>         My AIM name is <JasonWohlford>. My ICQ
> number is <112823231>. Your welcome to chat with me
> on which ever. Right now, you'll find me on AIM more
> often.
> 
> 
>         I'll be able to help with development best
> between the hours of 8:30-5:00 p.m. CST at work. I
> have great flexibility from my wonderful employer
> Brian Belsterling, President of The Copy Center. As
> long as I can show, if asked, that I am benefiting
> The Copy Center and get the rest of my work done it
> will be fine. Therefore, I'd eventually like to
> convert my client-side JavaScript site at
> <SylvanOrder.com> to Xang.
> 
> 
>         I have a very strong understanding of
> JavaScript. I also understand XML to a reasonable
> degree. (Hey, what's really to understand.) I'm
> quite weak in XSL; and have almost no knowledge of
> Apache configuration. That being said, I love to
> code. I love to code to spec. I love XML, XSL, the
> DOM, and JavaScript and am passionate about them.
> They rock.
> 
> 
>         I accept and agree with the Apache license
> and am very interested in contributing to open
> source. Although I like Linux, I'm not much for the
> GPL. I do like the FreeBSD license very much,
> although I've never run straight FreeBSD.
> 
> 
>         This is my configuration is the tricky part.
> At work, I am running Mac OS X (based on many BSDs).
> It has Apache built in. According to Apple it also
> has a very strong Java2 environment. The Mac OS X
> box is what I'll be using most of the time. At home,
> I should have a Linux-Mandrake 8.0 box running this
> weekend. My replacement motherboard should be
> arriving today or tomorrow. It has telnet and maybe
> SSH access? How shall I proceed?
> 
> 
>         Jason
> 
> 
>         On Wednesday, July 25, 2001, at 09:40 PM, S.
> Mike Dierken wrote:
> 
> 
>         Good gravy, you are exactly what I've been
> looking for...
> 
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: xang-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xang-dev-help@xml.apache.org