jakarta-bsf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nils Lastein" <...@bioteknologisk.dk>
Subject Running BSF with jython in Tomcat
Date Fri, 10 Oct 2003 14:16:40 GMT

I'm aiming at running the JSP-aplications embedded with jython using BSF 
(Bean Scripting Framework) Jakarta Tomcat server with 

- Installed Sun Java SDK 
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

- Installled a precompiled version of Jakarta Tomcat 5.0.12

- Installed jython 2.1 and placed jython.jar in 
${CATALINA_HOME}/webapps/jython/WEB-INF/lib/ and modified web.xml 

Now I'm able to execute jython (*.py-files) inside the Jakarta Tomcat 
server nicely. But in order to make web development easier it would be 
nice to execute Jython-code server-side embedded - and this is where BSF 
becomes handy.

So I:
- fetched BSF from: http://cvs.apache.org/dist/jakarta/bsf/v2.3.0rc1/bin/bsf-bin-2.3.0.tar.gz
and placed the bsf.jar in WEB-INF/lib
- fetched BSF Jakarta Taglibs from http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/bsf/jakarta-taglibs-bsf-20031010.tar.gz
and copied the taglibs-bsf.jar to 
${CATALINA_HOME}/webapps/jython/WEB-INF/lib and the taglibs-bsf.tld to 

My web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"

My foo.jsp-file:
<%@ page language="jython" %>
<% out.print("Hello from Jython")%>

which responds: 
org.apache.jasper.JasperException: /foo.jsp(1,1) Page directive: invalid 
language attribute

and my bar.jsp:
<%@ taglib uri="/WEB-INF/taglibs-bsf.tld" prefix="bsf" %>
<bsf.scriptlet language="jython">
        out.print("hello from jython")

which doesn't becomes parsed and this prints the source code:
<bsf.scriptlet language="jython">
                 out.print("hello from jython")

Jakarta Tomcats starts up with any errors (from catalina.out) and 
processes the jar-files:
*sys-package-mgr*: processing new jar, 
*sys-package-mgr*: processing new jar, 
*sys-package-mgr*: processing new jar, 
*sys-package-mgr*: processing new jar, 
*sys-package-mgr*: processing new jar, 
*sys-package-mgr*: processing new jar, 

What prevents my from success?


To unsubscribe, e-mail: bsf-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-user-help@jakarta.apache.org

View raw message