Ted/Drew,
In working with the same file I've narrowed it down to the jrun:sql tag.

If I just run this... I still get an error 500.

<%@ page import="allaire.taglib.*" %>
<%@ taglib uri="WEB-INF/lib/jruntags.jar" prefix="jrun" %>
<%-- Get movie list from database --%>
<jrun:sql id="movies" datasrc="ows">
SELECT MovieTitle
FROM Films 
ORDER BY MovieTitle
</jrun:sql>

<%-- Create HTML page --%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Orange Whip Studios - Movie List</TITLE>
</HEAD>

<BODY>
This is a test

</BODY>
</HTML>

Any other insights?

Thanks,
Michael


-----Original Message-----
From: Theodore Zimmerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 11:33 AM
To: JRun-Talk
Subject: RE: jruntags in 4.0


Michael,
This looks like it should work.  A couple of things that look like they
could be causing a problem are your end comment tags.    They should be -->
instead of --%>.

The other thing you can try is just the tag code by itself before adding in
the html code just to make sure your not getting a problem from that.
Something like adding just the initial page directive tags and just the sql
tag and make sure you're getting by that correctly.  If that's ok then add
in the foreach tag.

Ted Zimmerman

-----Original Message-----
From: Michael Greenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 11:19 AM
To: JRun-Talk
Subject: RE: jruntags in 4.0


Ted,
I just tried testing with one of the files in Drew's book called
movies1.jsp. And I changed the path of the taglib uri and I am getting the
same results.

Here is the code... I am still getting the same error.

Michael


<%@ page import="allaire.taglib.*" %>
<%@ taglib uri="WEB-INF/lib/jruntags.jar" prefix="jrun" %>
<%-- Get movie list from database --%>
<jrun:sql id="movies" datasrc="ows">
SELECT MovieTitle
FROM Films 
ORDER BY MovieTitle
</jrun:sql>

<%-- Create HTML page --%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Orange Whip Studios - Movie List</TITLE>
</HEAD>

<BODY>

<H1>Movie List</H1>
<%-- Display movie list --%>
<jrun:param id="movies" type="QueryTable" />
<jrun:foreach group="<%= movies %>">
<%= movies.get("MovieTitle") %><BR>
</jrun:foreach>

</BODY>
</HTML>

-----Original Message-----
From: Theodore Zimmerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 10:59 AM
To: JRun-Talk
Subject: RE: jruntags in 4.0


Michael,
It should work.  Does your tag look something similar to this?

<%@ page import="java.sql.*,javax.sql.*,allaire.taglib.*" %>
<%@ taglib uri="WEB-INF/lib/jruntags.jar" prefix="jrun" %>
 
<jrun:sql datasrc="DSName" id="rs">
select * from department
</jrun:sql>

Have you tried connecting using either the connection attribute or driver,
url, username and password attributes?

Ted Zimmerman


-----Original Message-----
From: Michael Greenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 10:41 AM
To: JRun-Talk
Subject: RE: jruntags in 4.0


Ted,
I made my changes to web.xml and jrun-web.xml and Im still getting the error
500.

Any ideas?

Thanks,
Michael

-----Original Message-----
From: Theodore Zimmerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 9:47 AM
To: JRun-Talk
Subject: RE: jruntags in 4.0


Hi Michael,
The DSName is the name you give the datasource in JRun.

Ted Zimmerman

-----Original Message-----
From: Michael Greenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 8:41 AM
To: JRun-Talk
Subject: RE: jruntags in 4.0


Hi Ted and everyone else,
I have been working with jruntags in Jrun 4.0 (yes still, but I'll be trying
to get away from them after this project and I educate myself on the fine
art of tlds)

I have most of what I need working except jrun:sql.

I made Ted's suggested fixes and I get....

500 Unhandled exception thrown

When Ted is refering to DSName is he refering to the specific DSN?

Any suggestions ?

Thanks,
Michael

-----Original Message-----
From: Theodore Zimmerman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 19, 2002 11:19 AM
To: JRun-Talk
Subject: RE: jruntags in 4.0


Hi Michael,
The JRun 3.1 tag library is deprecated in JRun 4.0.  If you want to use it
place the jruntags.jar file in your application's WEB-INF/lib.  Then in your
jsp do the following:

<%@ taglib uri="WEB-INF/lib/jruntags.jar" prefix="jrun" %>

One issue I know of is that the datasrc attribute won't work with the
jrun:sql tag due to the change in the datasource lookup between JRun 3.1 and
JRun 4.  JRun 4 only requires the datasource name to be passed rather than
java:comp/env/jdbc/dsName.  You can get around that by making the following
changes in the web.xml and jrun-web.xml files:

web.xml:

<resource-ref>
  <res-ref-name>jdbc/DSName</res-ref-name>
  <res-type>javax.sql.Datasource</res-type>
</resource-ref>  

jrun-web.xml:

<resource-ref>
   <res-ref-name>jdbc/DSName</res-ref-name>
   <jndi-name>DSName</jndi-name>
</resource-ref>  

I haven't done much with jst's other than what is in the JRun documentation
so perhaps someone else can help you out there.

Ted Zimmerman 


-----Original Message-----
From: Michael Greenberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 19, 2002 11:04 AM
To: JRun-Talk
Subject: jruntags in 4.0


Hi folks,
I am trying to figure out how to run the jruntags from 3.1 in jrun 4.0.
Where is the tld associated it with it? All I should need to move over is
jruntags.jar and the tld right?

Im slightly confused on this. Can someone shed some light on jst? I dont
have much experience there and I want to understand it better.

Thanks,
Michael








______________________________________________________________________
Get the JRun Web Application Construction Kit - the only book written specifically for 
JRun developers.
http://www.amazon.com/exec/obidos/ASIN/0789726009/houseoffusion
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to