JSP precompilation and including webinc.xml in web.xml

2002-06-04 Thread Al Tingley

Hello,
We are trying to automate the pre-compilation of our JSP files with JspC and
the inclusion of the generated webinc.xml file in our application
web.xml file.  We have constructed an application web.xml as shown below.
Both web.xml and webinc.xml are local to the
.../webapps/application/WEB-INF/ directory.

Our problem is that Tomcat complains when starting up with the message:
 org.xml.sax.SAXParseException: Relative URI webinc.xml; can not
be resolved without a base URI.

Note the local reference to webinc.xml below in the DOCTYPE tag.

If we change the reference to webinc.xml to an absolute URI of the form
below (on Windows):

file://E/jakarta-tomcat-4.0.4b3/webapps/appname/WEB-INF/webinc.xml

... we get a null pointer exception when Tomcat starts up (parser error at
the line where we reference the file to be included):

2002-06-04 08:55:27 ContextConfig[/voicemail] Parse error in application
web.xml
java.lang.NullPointerException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
...

What are we doing wrong?  We're using Tomcat 4.0.4b3.
Thanks,
Alan Tingley
Iperia, Inc.

---
The application web.xml file:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
[!ENTITY includes SYSTEM webinc.xml]


web-app
!-- all of the precompiled jsp declarations and mappings are in this
included file from the JspC --
includes;
/web-app

---
Output when starting up Tomcat:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.4-b3
PARSE error at line 6 column -1
org.xml.sax.SAXParseException: Relative URI webinc.xml; can not be
resolved without a base URI.


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Upload file to email as attachment

2002-03-20 Thread Al Tingley

I haven't used jspSmartUpload, but you can certainly avoid writing then
reading a file by using a ByteArrayOutputStream; write the uploaded file
(that's already in an in-memory buffer) to a ByteArrayOutputStream, then use
that stream's toByteArray() method in the constructor of a
ByteArrayInputStream (this is what we had to do using O'Reilly's upload
tools, anyway).

Where do I find more about jspSmartUpload?
Regards,
Al Tingley


-Original Message-
From: Jason Webber [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 5:05 PM
To: [EMAIL PROTECTED]
Subject: Upload file to email as attachment


Right now I finally got the file uploading to work properly using
jspSmartUpload.  Now I need to have my servlet send an email with the file
as an attachment.  I believe I wont have a problem saving the file to disk
and then attaching it to an email.  However saving it to disk just to reread
from the disk to send as an attachment seems wasteful.  The files are only
about 30-50kb.  Has anyone done this or is there even a better way to do
this using somethign other than jspSmartUpload?

TIA


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat 4.0 crash

2002-02-20 Thread Al Tingley

Hello,
Has anyone had an experience with Tomcat 4.0 simply going down with no
trace?  No log message, no exception, ...  We've seen instances where our
applications are running, then Tomcat just goes away and must be restarted
manually.
Thanks,
Al Tingley


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]