is not a servlet problem

2002-04-28 Thread Tevfik Aytekin

Hi,
I have looked at many places but I could not solve my problem.
I have migrated from tomcat 3.3 to tomcat 4.0.3
But my servlets which are working under tomcat 3.3 do not work under tomcat
4.0.3
The example servlets under tomcat 4.0.3 are working properly by the way.
The following error is reported. Can anybody help? Thanks in advance.



type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Class monline.SessionManager.SessionManager
is not a Servlet
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88
8)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:536)


root cause

java.lang.ClassCastException: monline.SessionManager.SessionManager
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88
4)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at

RE: is not a servlet problem

2002-04-28 Thread Tevfik Aytekin

I have installed tomcat-4.0.1
No problems. There should be something wrong with tomcat-4.0.3

TA.

-Original Message-
From: Tevfik Aytekin [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 28, 2002 10:19 PM
To: [EMAIL PROTECTED]
Subject: is not a servlet problem


Hi,
I have looked at many places but I could not solve my problem.
I have migrated from tomcat 3.3 to tomcat 4.0.3
But my servlets which are working under tomcat 3.3 do not work under tomcat
4.0.3
The example servlets under tomcat 4.0.3 are working properly by the way.
The following error is reported. Can anybody help? Thanks in advance.



type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Class monline.SessionManager.SessionManager
is not a Servlet
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88
8)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:536)


root cause

java.lang.ClassCastException: monline.SessionManager.SessionManager
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88
4)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java

RE: applet to servlet problem - JVM problem ?

2002-03-10 Thread tamir

Hi,
I've checked again my applet and ensured that I'm calling openConnection
each time.

However, I've discovered that when I'm running this applet using java-plugin
it
works well(all the servelt requests are called simoulatnously).
Nevertheless, I still would like it to work without the plug-in.

Does anybody have something close that works without the plugin ?
I'd really appreciate your help.

Tnx,
Tamir





-Original Message-
From: Toru Watanabe [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 3:22 AM
To: Tomcat Users List
Subject: Re: applet to servlet problem



tamir   java.io.InputStreamReader is = new
tamir java.io.InputStreamReader(con.getInputStream()); 
 ^^^

Do each thread uses their own con?
each thread must create URLConection newly
inside run() if each thread need to connect 
to server in the same time.

regards,
Watanabe.

In the message applet to servlet problem
   D054B0637615D611967000D0B78059CB0254F4@IBM3000
tamir [EMAIL PROTECTED] wrote:

tamir Hello everybody,
tamir I'm quite sure it's not tomcat problem, however, I give it a shot,
mainly
tamir because I know all the people here
tamir usually have great ideas...

tamir I'm using tomcat 3.3.1b. 
tamir I've an applet that runs several threads. Each thread calls to the
server
tamir using URLConnection.
tamir Everything works fine, however, only 2-3 threads can simoulantously
achieve
tamir the
tamir server, and the rest are waiting. When one thread finishes, the other
one
tamir can connect the server.

tamir The stuck command is:
 
tamir   java.io.InputStreamReader is = new
tamir java.io.InputStreamReader(con.getInputStream()); 

tamir I'm using the Applet tag to run my applet.

tamir Do you have any clues for me ?

tamir Best regards,
tamir Tamir

tamir --
tamir To unsubscribe:   mailto:[EMAIL PROTECTED]
tamir For additional commands: mailto:[EMAIL PROTECTED]
tamir 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]

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




Re: applet to servlet problem

2002-03-07 Thread Toru Watanabe


tamir   java.io.InputStreamReader is = new
tamir java.io.InputStreamReader(con.getInputStream()); 
 ^^^

Do each thread uses their own con?
each thread must create URLConection newly
inside run() if each thread need to connect 
to server in the same time.

regards,
Watanabe.

In the message applet to servlet problem
   D054B0637615D611967000D0B78059CB0254F4@IBM3000
tamir [EMAIL PROTECTED] wrote:

tamir Hello everybody,
tamir I'm quite sure it's not tomcat problem, however, I give it a shot, mainly
tamir because I know all the people here
tamir usually have great ideas...

tamir I'm using tomcat 3.3.1b. 
tamir I've an applet that runs several threads. Each thread calls to the server
tamir using URLConnection.
tamir Everything works fine, however, only 2-3 threads can simoulantously achieve
tamir the
tamir server, and the rest are waiting. When one thread finishes, the other one
tamir can connect the server.

tamir The stuck command is:
 
tamir   java.io.InputStreamReader is = new
tamir java.io.InputStreamReader(con.getInputStream()); 

tamir I'm using the Applet tag to run my applet.

tamir Do you have any clues for me ?

tamir Best regards,
tamir Tamir

tamir --
tamir To unsubscribe:   mailto:[EMAIL PROTECTED]
tamir For additional commands: mailto:[EMAIL PROTECTED]
tamir 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]




File downloading through a servlet problem. This is weird!!!

2000-12-22 Thread Stefán F. Stefánsson

Hello.

I'm experiencing strange things when I download files through a servlet.
The history is that I have access to a file stream in a servlet and I
want the user to be able to download this file.  I do this by sending a
file id as a parameter to the servlet as so:

https://localhost/servlet/com.decode.ips.webclient.controller.FileDownlo
adServlet?fileID=111fileName=somefilename.txt

To begin with I was using some unknown content type to try to force IE
to display the File open/save dialog box.  This was not working and IE
always popped up an error window saying that the file was not available
and I should try later!

After a while of searching the net I found an article about how to
change the default file name for the File open/save dialog box.  That
article suggested the use of the content type application/octet which I
did like so:

response.setContentType("application/octet; name=" + theFileName
+ "\nContent-Disposition: attachment; filename=" + theFileName +
"\n\n");

This works (well... kindof) except for one thing... and this is the
reason for me posting to the group.  Every time I save a file I get an
some extra lines at the top of the message.  I think there are three
lines.  The first contains nothing but a new line the second contains a
string and the third contains a newline character.  The string in that
second line looks like this:

Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2;
Java 1.3.0; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)

One more thing before I ask the obvious question... and this is the
weird part.  When I change the contentType to "text/plain" I get my file
looking exactly like it's supposed to look... I find this very strange!

So... now for my question.  What is this string I'm getting?  Where does
it come from???  How can I get rid of it?  Changing to another content
type is hardly an option since this is the only thing that has worked
for me for IE.  Note: Netscape has always allowed me to save my file
just fine and no hazzle... well.. except that the default file name
doesn't work there... but at least it's not adding those three damn
lines at the top.

I realize this is a browser issue but I don't know where to turn...
e-mail Microsoft for help???  I don't think so!

Any help is greatly appreciated,

kind regards,

Stefan


Stefan Freyr Stefansson
Software Developer
deCODE Genetics, Inc.
http://www.decode.com

Phone: (+354) 570 2854
GSM:   (+354) 861 1718
Fax:   (+354) 491 3782
 Stefan Stefansson.vcf 


BEGIN:VCARD
VERSION:2.1
N;ENCODING=QUOTED-PRINTABLE:;=01
REV:20001030T115142Z
END:VCARD



Re: File downloading through a servlet problem. This is weird!!!

2000-12-22 Thread Kurt Bernhard Pruenner

Stefán F. Stefánsson wrote:
 response.setContentType("application/octet; name=" + 
 theFileName + "\nContent-Disposition: attachment; filename=" + 
 theFileName + "\n\n");

Try

response.setContentType("application/octet; name=" + theFileName);
response.setHeader("Content-Disposition","attachment; filename=" + 
  theFileName);

The "\n\n" at the end basically fries the headers you've produced until
now, as an empty line is what separates the HTTP headers from the actual
content.

Also, instead of relying on the browser to handle the
"Content-Disposition" header correctly, just map your servlet to handle
all requests in a specific subdirectory so you have the filename in your
URL...

I.e. if you'd want to download, say, "SeasonsGreetings.jpg", use

http://server.dom.ain/yourwebapp/download/SeasonsGreetings.jpg?filename=/pics/SeasonsGreetings.jpg

or something like that...

-- 
Kurt Bernhard Pruenner --- Haendelstrasse 17 --- 4020 Linz --- Austria
Music: http://www.mp3.com/Leak --- Work: http://www.ssw.uni-linz.ac.at
...It might be written "Mindfuck", but it's spelt "L-A-I-N"...
np: Burnt Friedman  The Nu Dub Players - Just Landed (Just Landed)