This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
2 patches
- From: Marco Vezzoli <marco dot vezzoli at st dot com>
- To: kawa <kawa at sources dot redhat dot com>
- Date: Fri, 09 Aug 2002 09:15:32 +0200
- Subject: 2 patches
In a previous mail I said I couldn't find
gnu.kawa.xml.MakeResponseHeader; it was a mistake, the code is there.
1st patch: build.xml
I tried to modify build.xml in order to compile HTTP.scm and have
(require 'http) working but there are some bad dependancies to be fixed
(HTTP.scm needs xml-classes and servlet-classes to be compiled BEFORE)
and problems with ant tasks (see comments) so this patch is more a
suggestion than a fix.
2nd patch: HTTP.scm
I added two methods I use very frequently in jsp/servlets.
--
(--cafe babe--)
Marco Vezzoli marco.vezzoli@st.com
CR&D Intranet Developement STMicroelectronics
tel. +39 039 603 6852 fax. +39 039 603 5055
*** build.xml Fri Aug 9 08:58:33 2002
--- build.xml.sav Thu Aug 8 14:10:34 2002
***************
*** 11,21 ****
<property name="debug" value="true" />
<property name="deprecation" value="false" />
<property name="optimize" value="true" />
! <!-- I added this property in order to compile the scheme servlet code
! otherwise the kawa -C command fails to find the jar. MV
! -->
! <property name="jsdk.class.path" value="/HTTP-Server/jakarta-tomcat-4.0.1-src/build/common/lib/servlet.jar"/>
!
<!--
There was some discussion of using user.dir as a default here.
The most promising use being for dist.dir (and maybe build.dir).
--- 11,17 ----
<property name="debug" value="true" />
<property name="deprecation" value="false" />
<property name="optimize" value="true" />
!
<!--
There was some discussion of using user.dir as a default here.
The most promising use being for dist.dir (and maybe build.dir).
***************
*** 74,80 ****
<include name="gnu/**/*.class"/>
<include name="kawa/**/*.class"/>
</fileset>
-
<!--
These are the files that are preprocessed before compiling.
--- 70,75 ----
***************
*** 96,123 ****
<include name="gnu/kawa/xml/Focus.java"/>
<include name="kawa/Version.java"/>
</fileset>
-
- <!-- this is the classpath used by kawa run tasks
- add here jar (with location attribute) and directories (path att.) MV
- -->
- <path id="kawa.class.path">
- <pathelement path="${build.classes}"/>
- <pathelement location="${jsdk.class.path}"/>
- </path>
- <!-- the 'java' ant task does not support nested filesets and
- the 'arg' element does not support pathref attribute; modifying
- these objects could be easy but I do not have enough time so
- I simply added the jsdk jar path to the kawa compilation tasks
- -->
-
<target name="run" depends="classes">
! <java taskname="kawa" classname="kawa.repl" classpathref="kawa.class.path" />
</target>
<target name="runw" depends="classes">
<java taskname="kawa" fork="true"
! classname="kawa.repl" classpathref="kawa.class.path">
<arg value="-w"/>
</java>
</target>
--- 91,104 ----
<include name="gnu/kawa/xml/Focus.java"/>
<include name="kawa/Version.java"/>
</fileset>
<target name="run" depends="classes">
! <java taskname="kawa" classname="kawa.repl" classpath="${build.classes}" />
</target>
<target name="runw" depends="classes">
<java taskname="kawa" fork="true"
! classname="kawa.repl" classpath="${build.classes}">
<arg value="-w"/>
</java>
</target>
***************
*** 201,207 ****
enable-jemacs=${enable-jemacs}
enable-xml=${enable-xml}
enable-servlet=${enable-servlet}
- jsdk.class.path=${jsdk.class.path}
</echo>
<!--
--- 182,187 ----
***************
*** 498,510 ****
<srcfiles refid="lib-scm-2nd"/>
</uptodate>
</target>
!
<target name="lib-scm-classes"
depends="java-classes, check-lib-scm-classes"
unless="lib-scm-classes-uptodate">
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}:${jsdk.class.path}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P kawa.lib. --module-static -C"/>
--- 478,490 ----
<srcfiles refid="lib-scm-2nd"/>
</uptodate>
</target>
!
<target name="lib-scm-classes"
depends="java-classes, check-lib-scm-classes"
unless="lib-scm-classes-uptodate">
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P kawa.lib. --module-static -C"/>
***************
*** 544,550 ****
<include name="ppfile.scm"/>
<include name="printf.scm"/>
<include name="readtable.scm"/>
- <include name="HTTP.scm"/>
</fileset>
<target name="check-slib-scm-classes">
--- 524,529 ----
***************
*** 554,568 ****
</uptodate>
</target>
- <!-- FIXME I added xml and servlet classes dependencies for HTTP support
- it should be added in a more conditional way.
- -->
<target name="slib-scm-classes"
! depends="java-classes, xml-classes, servlet-classes, check-slib-scm-classes"
unless="slib-scm-classes-uptodate">
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}:${jsdk.class.path}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.kawa.slib. --module-static -C"/>
--- 533,544 ----
</uptodate>
</target>
<target name="slib-scm-classes"
! depends="java-classes, check-slib-scm-classes"
unless="slib-scm-classes-uptodate">
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.kawa.slib. --module-static -C"/>
***************
*** 662,668 ****
unless="jemacs-lisp-classes-uptodate">
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}:${jsdk.class.path}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.jemacs.lang. --module-static -C"/>
--- 638,644 ----
unless="jemacs-lisp-classes-uptodate">
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.jemacs.lang. --module-static -C"/>
***************
*** 671,677 ****
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}:${jsdk.class.path}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.jemacs.buffer. --module-static -C"/>
--- 647,653 ----
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
! <arg value="-classpath"/> <arg path="${build.classes}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.jemacs.buffer. --module-static -C"/>
*** HTTP.scm Fri Aug 9 09:02:44 2002
--- HTTP.scm.sav Thu Aug 8 13:43:26 2002
***************
*** 26,37 ****
(define (request-servlet-path) :: <String>
(invoke (get-request) 'getServletPath))
- (define (request-parameter (name :: <String>)) :: <String>
- (invoke (get-request) 'getParameter name))
-
- (define (request-parameters (name :: <String>)) :: <java.util.Vector>
- (invoke (get-request) 'getParameterValues name))
-
(define (request-query-string)
(let ((query (invoke (get-request) 'getQueryString)))
(if (eq? query #!null) #f query)))
--- 26,31 ----