Using Rhino Javascript within BSF for JSP pages

P

Phil Powell

I have a page I am trying to develop using BSF within JSP (site:
http://www.mycgiserver.com/~ppowell/tcltest.jsp) where I am learning BSF for
the first time and, so far, not producing any favorable results.

I have it so the page does not throw errors, unfortunately, it does nothing
else as well. I am having to do this remotely I'm afraid as well.

Here is the JSP code:

<%@ taglib uri="http://jakarta.apache.org/taglibs/bsf-2.0" prefix="bsf" %>

<html>
<head>
<title>Tcl Test</title>
</head>
<body>

x
<bsf:scriptlet language="tcl">
$out println {Hello World}
puts $out "Time in TCL: [clock format [clock scan now] -format "%A
%b/%d/%Y"]"
</bsf:scriptlet>
y

<table border=0>
<bsf:scriptlet language="javascript">
out.println("<tr><td colspan=2>JAVASCRIPT - VARF" +
String.fromCharCode(246).toUpperCase() +

"RS?</td></tr>");
for (i=60; i<=100; i+=10) {
out.println ("<tr ALIGN=RIGHT BGCOLOR=\"#CCCCCC\">")
out.println ("<td>" + i + "</td>")
out.println ("<td>" + Math.round((i - 32)*5/9) + "</td>")
out.println ("</tr>")
}
</bsf:scriptlet>
</table>
<bsf:expression language="javascript"> new java.util.Date()
</bsf:expression>
<p><p>

Time in TCL:&nbsp;
<bsf:expression language="tcl">
[clock format [clock scan now] -format "%A %b/%d/%Y"]
</bsf:expression>
<p>

</body>
</html>

And the bsf.tld XML-based tag library descriptor is housed in the same
directory as the JSP script. The bsf.jar file is housed outside of my
directory toward the root and I have no direct access to it.

I would love for someone with some experience in this to help me out as I
just can't get the danged thing to work to save my life!

Thanx
Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top