Registering BSF... Should be easy...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Registering BSF... Should be easy...

Furash Gary
I'm running the latest tomcat (5.5 something).  So, I drop the latest bsf and beanshell jars in tomcats lib directory, restart, and put up a simple page like
 
<% page language="beanshell">
 
...
 
It instantly dies with:
 
"org.apache.jasper.JasperException: /bsf.jsp(1,1) Page directive: invalid language attribute"
 
 
 
Gary Furash, MBA, PMP, Applications Manager
Maricopa County Attorney's Office
 
Reply | Threaded
Open this post in threaded view
|

Re: Registering BSF... Should be easy...

patniemeyer

On Mar 24, 2006, at 10:53 AM, Furash Gary wrote:

I'm running the latest tomcat (5.5 something).  So, I drop the latest bsf and beanshell jars in tomcats lib directory, restart, and put up a simple page like
 
<% page language="beanshell">
 
...
 
It instantly dies with:
 
"org.apache.jasper.JasperException: /bsf.jsp(1,1) Page directive: invalid language attribute"

Does the bsh jar include the correct BSF adapter?

Does tomcat allow you to include any BSF language in a JSP? 


Pat
Reply | Threaded
Open this post in threaded view
|

Re: Registering BSF... Should be easy...

Wade Chandler-6
--- Patrick Niemeyer <[hidden email]> wrote:

>
> On Mar 24, 2006, at 10:53 AM, Furash Gary wrote:
>
> > I'm running the latest tomcat (5.5 something).
> So, I drop the  
> > latest bsf and beanshell jars in tomcats lib
> directory, restart,  
> > and put up a simple page like
> >
> > <% page language="beanshell">
> >
> > ...
> >
> > It instantly dies with:
> >
> > "org.apache.jasper.JasperException: /bsf.jsp(1,1)
> Page directive:  
> > invalid language attribute"
>
> Does the bsh jar include the correct BSF adapter?
>
> Does tomcat allow you to include any BSF language in
> a JSP?
>
>
> Pat

Gary,

Please see this page:
http://jakarta.apache.org/bsf/manual.html

Have you downloaded the BSF patch for the Tomcat
source code and built your own Tomcat?

Directly from the page(Installation):
"BSF can be used standalone, as a class library, or as
part of an application server. In order to be used as
a class library or as a standalone system, you simply
download a copy of the bsf.jar file from the BSF web
site and include it in your classpath, along with any
required classes or jar files for desired languages.

In order to use BSF as part of the Tomcat servlet
engine, you must currently download patches from the
BSF web site that permit Jasper to call BSF.
Instructions for this will be posted on the website,
and will soon be accompanied by prebuilt binaries. We
hope that these changes will be merged into Tomcat in
the near future."

Wade


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

RE: Registering BSF... Should be easy...

Furash Gary
In reply to this post by Furash Gary
Thanks pat.  I don't know if the BSH jar includes the right adapter - it looks like it included an Engine, so I assumed that was right.
 
Re tomcat, I'm guessing that's it - I tried rhino's jar and got the same problem - I was never able to find the patch, and the post was so old I had just assumed it had been resolved years later in the current Tomcat - I'm guessing no.
 
I notice that Groovy and Judo both get around this by providing a servlet/jsp architecture where the've got a canned generic servlet, which you then map in the web-xml.file to ".*sp" (e.g., "gsp" for groovy).  Then they handle the interpeting.  I wonder if it's because BSF is such a pain with things like tomcat.


From: Patrick Niemeyer [mailto:[hidden email]]
Sent: Saturday, March 25, 2006 6:29 PM
To: Furash Gary
Cc: [hidden email]
Subject: Re: [Beanshell-users] Registering BSF... Should be easy...
Importance: High


On Mar 24, 2006, at 10:53 AM, Furash Gary wrote:

I'm running the latest tomcat (5.5 something).  So, I drop the latest bsf and beanshell jars in tomcats lib directory, restart, and put up a simple page like
 
<% page language="beanshell">
 
...
 
It instantly dies with:
 
"org.apache.jasper.JasperException: /bsf.jsp(1,1) Page directive: invalid language attribute"

Does the bsh jar include the correct BSF adapter?

Does tomcat allow you to include any BSF language in a JSP? 


Pat