Thread: [tcljava-user] problem using jacl/tcljava with tomcat (3.3.1)
Brought to you by:
mdejong
|
From: Horace A. V. Jr. <ha...@ha...> - 2003-04-14 11:17:08
Attachments:
smime.p7s
|
Hi folks -- I had this working but moved my server and, in rebuilding
I seem to have whacked something -- using tomcat 3.3.1 and Java HotSpot
Client VM Blackdown-1.3.1_02a-FCS)
have tried both the 1.2.6 and 1.3 builds of jacl
when I try calling tcl from a jsp I get an error like...
javax.servlet.ServletException: unexpected TclException:
tcl.lang.TclException: cannot read resource "/tcl/lang/library/init.tcl"
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
I have tried putting init.tcl all over the place and cannot seem
to let it be seen.
Does anyone have any ideas how I can make the init.tcl visible
to tomcat? (tomcat-3.3.1 btw)
little snipit example would be like...
<html><head> <title>Test eval of tcl code in .jsp</title>
<%@ page import="tcl.lang.*;" %>
</head><body bgcolor="#ffffff"><h1>Test eval of tcl code in .jsp</h1>
Let's try evaluating some tcl code from within a JSP ...
<p>
<%
Interp interp;
interp = new Interp();
interp.eval("package require java");
String result = "";
try {
String s1 = "set a [split {kicker} {}];";
out.println("<p>==================<p>Test #1: Simple split<p>");
out.println("<b>" + s1 + " ==></b><br>");
interp.eval(s1);
result = interp.getResult().toString();
out.println(result);
etc. etc. etc.
--
Horace ...once known as "Kicker" :-)
================================================================
...drop by and chat if I'm online http://www.hav.com/chat/
================================================================
Horace Vallas hav.Software http://www.hav.com/
P.O. Box 354 ha...@ha...
Richmond, Tx. 77406-0354 voice: 281-341-5035
USA fax: 281-341-5087
Thawte Web Of Trust Notary in SW Houston, Tx.
http://www.hav.com/?content=/thawteWOTnotary.htm
================================================================
What is a Vet? ... He is the barroom loudmouth, dumber than five
wooden planks, whose overgrown frat-boy behavior is outweighed a
hundred times in the cosmic scales by four hours of exquisite
bravery near the 38th parallel. ... - Unknown
================================================================
|
|
From: Mo D. <md...@un...> - 2003-04-14 20:42:48
|
On Mon, 14 Apr 2003 06:16:24 -0500 "Horace A. Vallas, Jr." <ha...@ha...> wrote: > Hi folks -- I had this working but moved my server and, in rebuilding > I seem to have whacked something -- using tomcat 3.3.1 and Java HotSpot > Client VM Blackdown-1.3.1_02a-FCS) > > have tried both the 1.2.6 and 1.3 builds of jacl > > when I try calling tcl from a jsp I get an error like... > > javax.servlet.ServletException: unexpected TclException: > tcl.lang.TclException: cannot read resource "/tcl/lang/library/init.tcl" Some folks have reported strange problems like this in the past, but a clear resolution to the problem is not available. Perhaps this post will help: http://sourceforge.net/mailarchive/message.php?msg_id=369779 Also, you might want to try a patch like the following. It is completely untested, but might provide better results in a JSP like env. Index: src/jacl/tcl/lang/Interp.java =================================================================== RCS file: /cvsroot/tcljava/tcljava/src/jacl/tcl/lang/Interp.java,v retrieving revision 1.43 diff -u -0 -r1.43 Interp.java --- src/jacl/tcl/lang/Interp.java 13 Mar 2003 22:28:10 -0000 1.43 +++ src/jacl/tcl/lang/Interp.java 14 Apr 2003 20:39:52 -0000 @@ -2622 +2622,3 @@ - stream = Interp.class.getResourceAsStream(resName); + //stream = Interp.class.getResourceAsStream(resName); + stream = Thread.currentThread(). + getContextClassLoader().getResourceAsStream(resName); cheers Mo DeJong |
|
From: Horace A. V. Jr. <ha...@ha...> - 2003-04-14 21:30:46
Attachments:
smime.p7s
|
ok - neeeeevermind - found the ref to placing the jar's in $JAVA_HOME/jre/lib/ext
and removing form the CP and tomcat containers -- works fine now (even with the
jars in local WEB-INF/lib)
Horace A. Vallas, Jr. wrote:
> Hi folks -- I had this working but moved my server and, in rebuilding
> I seem to have whacked something -- using tomcat 3.3.1 and Java HotSpot
> Client VM Blackdown-1.3.1_02a-FCS)
>
> have tried both the 1.2.6 and 1.3 builds of jacl
>
> when I try calling tcl from a jsp I get an error like...
>
> javax.servlet.ServletException: unexpected TclException:
> tcl.lang.TclException: cannot read resource
> "/tcl/lang/library/init.tcl"
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
>
>
> I have tried putting init.tcl all over the place and cannot seem
> to let it be seen.
>
> Does anyone have any ideas how I can make the init.tcl visible
> to tomcat? (tomcat-3.3.1 btw)
>
> little snipit example would be like...
>
> <html><head> <title>Test eval of tcl code in .jsp</title>
> <%@ page import="tcl.lang.*;" %>
> </head><body bgcolor="#ffffff"><h1>Test eval of tcl code in .jsp</h1>
> Let's try evaluating some tcl code from within a JSP ...
> <p>
> <%
> Interp interp;
> interp = new Interp();
> interp.eval("package require java");
> String result = "";
> try {
> String s1 = "set a [split {kicker} {}];";
> out.println("<p>==================<p>Test #1: Simple split<p>");
> out.println("<b>" + s1 + " ==></b><br>");
> interp.eval(s1);
> result = interp.getResult().toString();
> out.println(result);
>
> etc. etc. etc.
>
--
Horace ...once known as "Kicker" :-)
================================================================
...drop by and chat if I'm online http://www.hav.com/chat/
================================================================
Horace Vallas hav.Software http://www.hav.com/
P.O. Box 354 ha...@ha...
Richmond, Tx. 77406-0354 voice: 281-341-5035
USA fax: 281-341-5087
Thawte Web Of Trust Notary in SW Houston, Tx.
http://www.hav.com/?content=/thawteWOTnotary.htm
================================================================
What is a Vet? ... He is the barroom loudmouth, dumber than five
wooden planks, whose overgrown frat-boy behavior is outweighed a
hundred times in the cosmic scales by four hours of exquisite
bravery near the 38th parallel. ... - Unknown
================================================================
|
|
From: Mo D. <md...@un...> - 2003-04-14 23:37:20
|
On Mon, 14 Apr 2003 16:30:01 -0500 "Horace A. Vallas, Jr." <ha...@ha...> wrote: > ok - neeeeevermind - found the ref to placing the jar's in $JAVA_HOME/jre/lib/ext > and removing form the CP and tomcat containers -- works fine now (even with the > jars in local WEB-INF/lib) Could you try the prev config that was broken and see if the patch I posted fixes it? If you could also write up a little description of the problem and the solution, I could add it to the FAQ. cheers Mo |