Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Tomcat Webapp barfing when saving Image

Tomcat Webapp barfing when saving Image

2006-12-12       - By Mon Cab

 Back
Reply:     1     2  

Hi

I am trying to store a file in my webapp (Tomcat on Fedora) and am
using

File serverFile = new File(file_pathname);
serverFile.createNewFile();    
FileOutputStream os = new FileOutputStream(serverFile);    
os.write(fileData);      
os.close();
 
but I am getting an IE6 "page cant be displayed" error when I use the
following as the pathname

/var/lib/tomcat5/webapps/datingapp2/user_images/

The image is actually saving to the user_images folder BUT, it seems
that the webapp is no longer accessible after the image is saved.  As
soon as the save image code is executed the log file shws the following
(is this Tomcat restarting!?)

2006-12-11 22:57:50,489 [main] INFO
org.apache.coyote.http11.Http11Protocol Source code of org.apache.coyote.http11.Http11Protocol - Initializing Coyote HTTP/1.1
on http-8080 (See http://ttp-8080.ora-code.com)
2006-12-11 22:57:50,686 [main] INFO
org.apache.coyote.http11.Http11Protocol Source code of org.apache.coyote.http11.Http11Protocol - Initializing Coyote HTTP/1.1
on http-9080 (See http://ttp-9080.ora-code.com)
2006-12-11 22:57:50,686 [main] INFO
org.apache.catalina.startup.Catalina Source code of org.apache.catalina.startup.Catalina - Initialization processed in 2203
ms
2006-12-11 22:57:50,930 [main] INFO
org.apache.catalina.realm.JAASRealm Source code of org.apache.catalina.realm.JAASRealm - Set JAAS app name PSA
2006-12-11 22:57:51,109 [main] INFO
org.apache.catalina.core.StandardService Source code of org.apache.catalina.core.StandardService - Starting service Catalina
2006-12-11 22:57:51,123 [main] INFO
org.apache.catalina.core.StandardEngine Source code of org.apache.catalina.core.StandardEngine - Starting Servlet Engine:
Apache Tomcat/5.0
2006-12-11 22:57:51,261 [main] INFO
org.apache.catalina.core.StandardHost Source code of org.apache.catalina.core.StandardHost - XML validation disabled
2006-12-11 22:57:54,503 [main] INFO
org.apache.struts.tiles.TilesPlugin Source code of org.apache.struts.tiles.TilesPlugin - Tiles definition factory loaded
for module ''.
2006-12-11 22:57:54,534 [main] INFO
org.apache.struts.validator.ValidatorPlugIn Source code of org.apache.struts.validator.ValidatorPlugIn - Loading validation rules
file from '/WEB-INF/validator-rules.xml'
2006-12-11 22:57:54,535 [main] INFO
org.apache.struts.validator.ValidatorPlugIn Source code of org.apache.struts.validator.ValidatorPlugIn - Loading validation rules
file from '/WEB-INF/validation.xml'
2006-12-11 22:57:55,666 [main] INFO
org.apache.catalina.core.StandardHost Source code of org.apache.catalina.core.StandardHost - Create Host deployer for direct
deployment ( non-jmx )
2006-12-11 22:57:55,673 [main] INFO
org.apache.catalina.core.StandardHostDeployer Source code of org.apache.catalina.core.StandardHostDeployer - Processing Context
configuration file URL
file:/etc/tomcat5/Catalina/localhost/balancer.xml
2006-12-11 22:57:56,196 [main] INFO
org.apache.catalina.core.StandardHostDeployer Source code of org.apache.catalina.core.StandardHostDeployer - Processing Context
configuration file URL file:/etc/tomcat5/Catalina/localhost/admin.xml
2006-12-11 22:57:56,911 [main] INFO
org.apache.struts.util.PropertyMessageResources Source code of org.apache.struts.util.PropertyMessageResources - Initializing,
config='org.apache.struts.action.ActionResources', returnNull=true
2006-12-11 22:57:57,051 [main] INFO
org.apache.struts.util.PropertyMessageResources Source code of org.apache.struts.util.PropertyMessageResources - Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
2006-12-11 22:57:57,914 [main] INFO
org.apache.struts.util.PropertyMessageResources Source code of org.apache.struts.util.PropertyMessageResources - Initializing,
config='org.apache.webapp.admin.ApplicationResources', returnNull=true
2006-12-11 22:57:59,449 [main] INFO
org.apache.catalina.core.StandardHostDeployer Source code of org.apache.catalina.core.StandardHostDeployer - Processing Context
configuration file URL file:/etc/tomcat5/Catalina/localhost/manager.xml
2006-12-11 22:57:59,979 [main] INFO
org.apache.catalina.core.StandardHostDeployer Source code of org.apache.catalina.core.StandardHostDeployer - Processing Context
configuration file URL
file:/etc/tomcat5/Catalina/localhost/datingapp.xml
2006-12-11 22:58:00,036 [main] ERROR
tomcat.localhost./datingapp.Context - Error starting static Resources
java.lang.IllegalArgumentException Source code of java.lang.IllegalArgumentException: Document base /datingapp does not
exist or is not a readable directory
  at
org.apache.naming.resources.FileDirContext Source code of org.apache.naming.resources.FileDirContext(java.lang.String Source code of java.lang.String)
(/usr/lib/libnaming-resources-5 (See http://ces-5.ora-code.com).0.30.jar.so)
  at org.apache.catalina.core.StandardContext Source code of org.apache.catalina.core.StandardContext()
(/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at org.apache.catalina.core.StandardContext Source code of org.apache.catalina.core.StandardContext()
(/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at
org.apache.catalina.core.ContainerBase Source code of org.apache.catalina.core.ContainerBase(org.apache.catalina
.Container)
(/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at
org.apache.catalina.core.ContainerBase Source code of org.apache.catalina.core.ContainerBase(org.apache.catalina.Container Source code of org.apache.catalina.Container)
(/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at
org.apache.catalina.core.StandardHost Source code of org.apache.catalina.core.StandardHost(org.apache.catalina.Container Source code of org.apache.catalina.Container)
(/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at
org.apache.catalina.core.StandardHostDeployer Source code of org.apache.catalina.core.StandardHostDeployer(org.apache.catalina
.Container)
(/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at java.lang.reflect.Method Source code of java.lang.reflect.Method(java.lang.Object Source code of java.lang.Object,
java.lang.Object[]) (/usr/lib/libgcj.so.6.0.0)
  at
org.apache.commons.beanutils.MethodUtils Source code of org.apache.commons.beanutils.MethodUtils(java.lang.Object Source code of java.lang.Object,
java.lang.String Source code of java.lang.String, java.lang.Object[], java.lang.Class[])
(/tmp/libjakarta-commons-beanutils-1 (See http://ils-1.ora-code.com).7.0.jar.sofxwvo0.so)
  at org.apache.commons.digester.SetNextRule Source code of org.apache.commons.digester.SetNextRule()
(/usr/lib/libjakarta-commons-digester-1 (See http://ter-1.ora-code.com).6.jar.so)
  at org.apache.commons.digester.Rule Source code of org.apache.commons.digester.Rule(java.lang.String Source code of java.lang.String,
java.lang.String Source code of java.lang.String) (/usr/lib/libjakarta-commons-digester-1 (See http://ter-1.ora-code.com).6.jar.so)
  at org.apache.commons.digester.Digester Source code of org.apache.commons.digester.Digester(java.lang.String Source code of java.lang.String,
java.lang.String Source code of java.lang.String.html>java.lang.String Source code of java.lang.String java.lang.String Source code of java.lang.String.java.html>Source code of <a href=http://www.docjar.com/docs/api/java/lang/String.html>java.lang.String</a> <a href=http://www.docjar.com/html/api/java/lang/String.java.html><img src=/j.gif alt=' border=0>, java.lang.String Source code of java.lang.String.html>java.lang.String Source code of java.lang.String java.lang.String Source code of java.lang.String.java.html>Source code of <a href=http://www.docjar.com/docs/api/java/lang/String.html>java.lang.String</a> <a href=http://www.docjar.com/html/api/java/lang/String.java.html><img src=/j.gif alt=' border=0>)
(/usr/lib/libjakarta-commons-digester-1 (See http://ter-1.ora-code.com).6.jar.so)
  at
org.apache.catalina.util.CatalinaDigester Source code of org.apache.catalina.util.CatalinaDigester(java.lang.String Source code of java.lang.String,
java.lang.String Source code of java.lang.String.html>java.lang.String Source code of java.lang.String java.lang.String Source code of java.lang.String.java.html>Source code of <a href=http://www.docjar.com/docs/api/java/lang/String.html>java.lang.String</a> <a href=http://www.docjar.com/html/api/java/lang/String.java.html><img src=/j.gif alt=' border=0>, java.lang.String Source code of java.lang.String.html>java.lang.String Source code of java.lang.String java.lang.String Source code of java.lang.String.java.html>Source code of <a href=http://www.docjar.com/docs/api/java/lang/String.html>java.lang.String</a> <a href=http://www.docjar.com/html/api/java/lang/String.java.html><img src=/j.gif alt=' border=0>)
(/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at
org.apache.xerces.parsers.AbstractSAXParser Source code of org.apache.xerces.parsers.AbstractSAXParser(org.apache.xerces.xni
.QName,
org.apache.xerces.xni.Augmentations Source code of org.apache.xerces.xni.Augmentations)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl Source code of org.apache.xerces.impl.XMLDocumentFragmentScannerImpl()
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl Source code of org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher
.dispatch(boolean)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl Source code of org.apache.xerces.impl.XMLDocumentFragmentScannerImpl(boolean)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at org.apache.xerces.parsers.XML11Configuration Source code of org.apache.xerces.parsers.XML11Configuration(boolean)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at
org.apache.xerces.parsers.XML11Configuration Source code of org.apache.xerces.parsers.XML11Configuration(org.apache.xerces.xni.parser
.XMLInputSource)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at
org.apache.xerces.parsers.XMLParser Source code of org.apache.xerces.parsers.XMLParser(org.apache.xerces.xni.parser
.XMLInputSource)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at
org.apache.xerces.parsers.AbstractSAXParser Source code of org.apache.xerces.parsers.AbstractSAXParser(org.xml.sax.InputSource Source code of org.xml.sax.InputSource)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
  at org.apache.commons.digester.Digester Source code of org.apache.commons.digester.Digester(java.io.InputStream Source code of java.io.InputStream)
(/usr/lib/libjakarta-commons-digester-1 (See http://ter-1.ora-code.com).6.jar.so)
  at
org.apache.catalina.core.StandardHostDeployer Source code of org.apache.catalina.core.StandardHostDeployer(java.net.URL Source code of java.net.URL,
java.net.URL Source code of java.net.URL) (/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)
  at org.apache.catalina.core.StandardHost Source code of org.apache.catalina.core.StandardHost(java.net.URL Source code of java.net.URL,
java.net.URL Source code of java.net.URL) (/usr/lib/libcatalina-5 (See http://ina-5.ora-code.com).0.30.jar.so)


Does anyone know what might be going wrong here?  What should I do to
fix this?  




__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______
__ __
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.