my dog learned polymorphism*
The moose likes Tomcat and the fly likes web.xml, java.io.ByteArrayInputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "web.xml, java.io.ByteArrayInputStream" Watch "web.xml, java.io.ByteArrayInputStream" New topic
Author

web.xml, java.io.ByteArrayInputStream

sing
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>logVerbosityLevel</param-name>
<param-value>WARNING</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>

<servlet>
<servlet-name>ReceiveSMS</servlet-name>
<servlet-class>receive.ReceiveSMS</servlet-class>
<load-on-startup>4</load-on-startup>
</servlet>

I have added these code into web.xml in \Apache Tomcat 4.0\conf\ but i get this error when i start the tomcat.

ERROR reading java.io.ByteArrayInputStream@cb6009
At Line 16 /web-inf/servlet/


Can someone help me? Thank You.
srinivasan ganesan
Ranch Hand

Joined: Mar 09, 2001
Posts: 54
I believe this web.xml (under conf) is used to specify the default properties for all web applications that are running within this server instance. Unless you want this servlet to be used by all webapps, you don't want to make modifications to this file. Instead create your own deployment descriptor and place it in WEB-INF directory of your web application.
sing
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
Thank you for your reply.
I have tried to create my own deployment descriptor and place it in WEB-INF directory of my web application but i found some errors.
My program is doing : retrieve data from file in directory, update into database.
Error if i create deployment descriptor in WEB-INF directory :
1) It will update more than 1 time into database for first startup tomcat. After first file is process, the following files will be running fine which is update once.
2) I have deleted some print testing code and added other code to my program but i realised that it print out the new test code and old test code as well. I tried deleted work directory and restart tomcat but i still the same. I don't know where it catch the code?
sing
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
I hope someone can help me...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web.xml, java.io.ByteArrayInputStream