I have discovered some details of the problem; I was finally able to get exceptions and stacktraces printing correctly.
Originally, the problem was that the mapping.xml file wasn't found, so I supplied an absolute path and that eliminated that error. Is there a better way to do this, a standard place in the directory structure where mapping.xml and database.xml can be placed?
Now, I'm having a similar problem with castor.properties. The bean wants this file to be located in the java lib directory, specifically
/usr/java/j2sdk1.4.0_02/jre/lib/castor.properties . So I placed it there, turned a+r on , and it still throws an AccessControlException ("access denied") trying to read the file.
I realize that java's read permissions are beyond the purview of the Castor-dev list, but I'm wondering if there's not a more standardized setup I should be following.

Thanks for any help,
Rob Kent

Robert Kent writes:

I'm having trouble getting Castor to work in a JSP environment.
I built a class that ran acceptably from the command line (ShopTest), and modified it, primarily by eliminating the main() method, and renamed to ShopBean.
I then moved the associated files into my web applications directory, in thsi case /var/www/ora. Here's my setup:
/var/www/ora/WEB-INF
- contains the database.xml and mapping.xml
/var/www/ora/WEB-INF/classes
- contains the ShopBean.class and com/rjkcomm
tree containing my package (of 1 more class).
/var/www/ora/rob/
- contains shop.jsp, which is as follows:
shop.jsp:
<%@ page import = "ShopBean" %>
<jsp:useBean id="shop" class="ShopBean" scope="page">
<jsp:SetProperty name="shop" property="*"/>
</jsp:useBean>
<!-- the only references to this bean below this point are
jsp:getProperty actions -->
The XML files and non-bean class (just the bean + a main function) work fine, so it doesn't seem like there'd be anything wrong with them. But I can post them if that info would help.
The error thrown is very general; it's the HandlePageException at the bottom of the generated shop$jsp.java file. No Castor-specific info is shown in the stack trace.
I think what I need is some general help on integrating Castor with a JSP setup. Oh! I'm also not sure about where the castor JAR file needs to go; I tried copying it to the $CATALINA_HOME/common/lib directory in case the jdk classpath wasn't enough, but that didn't help.
Incidentally, I'd be glad to put up a page describing how to do this "easy" stuff if I get it working correctly, since there doesn't seem to be a collection of Castor + JSP information readily available. Of course, I'm quite new to Castor, so take that for what it's worth.

Thanks for any help,
_________________________________
Robert Kent - (617) 413-3510
http://www.rjk-comm.com/
_________________________________
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev


_________________________________
Robert Kent - (617) 413-3510
http://www.rjk-comm.com/
_________________________________
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to