Re: Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-09-06 Thread rakesh k
Hi Konstantin Kolinko

Thanks for replying back.

we are using *httpd-2.2.3-43 (*Apache HTTPD) version, we are not using
mod_jk . we are using mod_proxy
and please find  the apache httpd configuration we use

*ProxyPass / http://localhost:8082 route=msf1*


Regards
Rakesh

On Thu, Aug 25, 2011 at 9:03 PM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2011/8/12 rakesh k rakroc...@gmail.com:
  I am using Apache tomcat 6.0.18 version

 Can you upgrade? There is 3 years worth of fixes between 6.0.18 and 6.0.33.

 What version of Apache HTTPD is in front of Tomcat? How it is configured?
 Do you use mod_jk? What version?

 Best regards,
 Konstantin Kolinko

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-09-06 Thread rakesh k
Hi Christopher Schultz

Thanks for replying back to my question.

can you brief me on that which part my configuration is insane.

and can you please let me what are the things do you require from me, so
that it can help you out where the configurations are disorder.

so that i can provide you the entire information you require from my side.

Regards
Rakesh

On Thu, Aug 25, 2011 at 9:36 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Rakesh,

 On 8/16/2011 3:08 AM, rakesh k wrote:
  Connector executor=tomcatThreadPool port=8082
  protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443
  /

 Still not an AJP connector.

 Something tells me that your configuration is completely insane.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk5Wcv8ACgkQ9CaO5/Lv0PCDLACdHdT6nVOla/dy1w6OoXbSYAii
 0gkAoLdNBfVn8bUVhGDbCh3fQb4g8275
 =hEvv
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: [Servlet 3.0] Monitoring File Upload Progress

2011-09-06 Thread Ole Ersoy

Hi Andre,

I'm looking for something like this:

pfu.setProgressListener(new FileUploadProgressListener());

Described in this article:
http://www.ibm.com/developerworks/web/library/wa-aj-dwr/?ca=dgr-lnxw06AjaxDWR

I could just go back to commons file upload, but thought I'd look around to see 
if anything something similar could be done with servlet 3.0.

Thanks,
- Ole


On 09/05/2011 03:12 PM, André Warnier wrote:

Ole Ersoy wrote:

Hi,

Anyone know whether it's possible to monitor progress of a file upload?


What do you mean by monitoring ?

Is it a question of providing the user with some feedback, like a
progress bar ?

If so, then one of the easier ways would be to write your own java
applet, downloaded and run by the browser in your upload form, to do the
upload and display some progress bar to the user.
You may want to search for something already available to do it though,
because writing it from scratch is not really trivial.
Personally, I would only do that if it was /really/ worth the effort.
Like if many users get impatient and break off the upload before it
finishes. Or of course if the marketing guys insist on it, for the look.
But then tell them the cost.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet 3.0 File Upload

2011-09-06 Thread Ole Ersoy

Thanks guys!

Ole

On 09/03/2011 10:51 AM, Konstantin Preißer wrote:

Hi,


-Original Message-
From: Jonathan Soons [mailto:jso...@juilliard.edu]
Sent: Saturday, September 03, 2011 2:24 PM
To: Ole Ersoy; Tomcat Users List
Subject: RE: Servlet 3.0 File Upload

You need to add a line in in your form:
input type=text name=filename /

Then in your servlet GetPost() method you put this filename in a
variable:
String filename;
filename = req.getParameter(filename);

Then instead of part.write(samplefile);
do:
part.write(filename);



Doesn't that mean that the user has to enter the filename by himself?

What I usually do to get the filename is:

Part uploadPart = request.getPart(uploadfield); // get the Part
String contDispoHeader = uploadPart.getHeader(Content-Disposition); // get 
Content-Disposition header
String uploadFilename = null;
if (contDispoHeader != null) {
try {
uploadFilename = new 
ContentDisposition(contDispoHeader).getParameter(filename);
} catch (ParseException e) { }
}

Note that ContentDisposition class is from JavaMail package 
(javax.mail.internet.ContentDisposition). Browser usually send filenames in the 
filename parameter of a Content-Disposition header.


Regards,

Konstantin Preißer


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [Servlet 3.0] Monitoring File Upload Progress

2011-09-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ole,

On 9/6/2011 11:03 AM, Ole Ersoy wrote:
 Described in this article: 
 http://www.ibm.com/developerworks/web/library/wa-aj-dwr/?ca=dgr-lnxw06AjaxDWR

  I could just go back to commons file upload, but thought I'd look
 around to see if anything something similar could be done with
 servlet 3.0.

The servlet API does not have any such provisions: your code executes
after the file upload has completed.

If you want to interact with the stream, you'll have to either handle
the stream yourself or use a library (like commons-fileupload) that
lets you watch the stream.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5mbkMACgkQ9CaO5/Lv0PC/JQCfRV9lZuCJ+Zvc5IL7ooctJYVh
TcEAnjkOqfAOgJPzhaXUfh2FOWlT/gZD
=MXx4
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet 3.0 File Upload

2011-09-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 9/3/2011 11:51 AM, Konstantin Preißer wrote:
 What I usually do to get the filename is:
 
 Part uploadPart = request.getPart(uploadfield); // get the Part 
 String contDispoHeader =
 uploadPart.getHeader(Content-Disposition); // get
 Content-Disposition header String uploadFilename = null; if
 (contDispoHeader != null) { try { uploadFilename = new
 ContentDisposition(contDispoHeader).getParameter(filename); }
 catch (ParseException e) { } }

It seems dangerous to allow the client to specify the file name. All
kinds of bad things can happen such as specifying special file names
(does PRN still work in win32? through Java?) or overwriting files
from other clients.

I would highly recommend that some portion of the temporary file name
be completely random, as well as using something keyed on the request
to disambiguate the file as well.

I usually just use File.createTempFile, though performance of that
method can be less than ideal.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5mb14ACgkQ9CaO5/Lv0PAYTACgi6ldsMdMYH4v3XLdfv5J6+U4
zh8An17xhq5gBZ1FJ5ElFLzXd1XVLX0q
=groU
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-09-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rakesh,

On 9/6/2011 7:39 AM, rakesh k wrote:
 Can you brief me on that which part my configuration is insane.

The configurations you are posting do not match your own assertions
about your configuration.

To wit: you think you have an AJP processor, yet you have configured
an HTTP processor.

 and can you please let me what are the things do you require from
 me, so that it can help you out where the configurations are
 disorder.

What connectors do you want to configure? What is your current
configuration?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5mb/0ACgkQ9CaO5/Lv0PBp1ACgkrJuX6BQI9C60Nz3W5jkW6GV
MEYAn2xN8Mgc+fC5gsykU3pu2RYQpHoh
=vYeV
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: servlet unavailable

2011-09-06 Thread Adam Posner
It couldnt c find the struts servlet, thats the only thing in web.xml if
youre using struts. There was nothing specific in the logs, or startupo
which was normal

On Sun, Sep 4, 2011 at 4:48 PM, Pid p...@pidster.com wrote:

 On 03/09/2011 22:36, Adam Posner wrote:
   Posner to users
  show details 8:16 PM (2 minutes ago)
 
  Hello all:
 
 
  I am hoping someone can help with this.  Tomcat 6.0.28 keeps giving me,
  saying 'Servlet Front Controller is not available'
  I am using struts 1, the jar file is struts-core-1.3.10 located in
  install_dir/myapp/WEB-INF/lib
 
  Please help
 
 
 
  ?xml version=1.0 encoding=UTF-8?
  web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 
  listener
  listener-classcom.listeners.TrailsContextListener/listener-class
  /listener
 
   context-param
  param-name
  trailsDBConnName
  /param-name
  param-value
jdbc:mysql://localhost:3306/trailsDB
  /param-value
  /context-param
 
 
  !--Define the controller servlet --
 
   servlet
  servlet-nameFrontController/servlet-name
 
  servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 
 
  !-- Name the Struts configuration file --
 
  init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
  /init-param
 
  !-- Guarantees that this servlet is loaded on startup  I'm
 hoping
  that this won't interfere with my --
  !--listener declaration above since that also needs to be
  initialized first before anything runs --
 
 load-on-startup2/load-on-startup
 /servlet
 
  servlet-mapping
  servlet-nameFrontController/servlet-name
  url-pattern*.do/url-pattern
 /servlet-mapping
 
  !-- These other servlets will become Actions, and go in
  struts-config.xml file --
  !-- I'll leave them here but commented out for now in case you need
 to
  see them
 
  servlet
  servlet-nameShow Bikes/servlet-name
  servlet-classcom.bikes.controller.BikeModelsServlet/servlet-class
  /servlet
 servlet-mapping
  servlet-nameShow Bikes/servlet-name
  url-pattern/getBikes.do/url-pattern
 /servlet-mapping
 
 
  servlet
  servlet-nameDisplay Characteristics/servlet-name
 
 
 servlet-classcom.bikes.controller.DisplayModelRatingsServlet/servlet-class
  /servlet
 servlet-mapping
  servlet-nameDisplay Characteristics/servlet-name
  url-pattern/getModelInfo.do/url-pattern
 /servlet-mapping
 
 --
 
 !-- Leaving this as is for now --
 
welcome-file-list
  welcome-fileindex.jsp/welcome-file
  /welcome-file-list
 
  /web-app

 Are there any messages in the Tomcat logs which occur during application
 startup?


 p




Re: servlet unavailable

2011-09-06 Thread Adam Posner
ep 6, 2011 3:10:54 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
Sep 6, 2011 3:10:54 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use null:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1014)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at
java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.init(ServerSocket.java:202)
at java.net.ServerSocket.init(ServerSocket.java:158)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
... 12 more
Sep 6, 2011 3:10:54 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use null:8080
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 6, 2011 3:10:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 690 ms
Sep 6, 2011 3:10:54 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 6, 2011 3:10:54 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.28
Sep 6, 2011 3:10:54 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Sep 6, 2011 3:10:55 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Sep 6, 2011 3:10:55 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor MyStrutsApp.xml
Sep 6, 2011 3:10:56 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from
jar:file:/home/cuco/NetBeansProjects/MyStrutsApp/build/web/WEB-INF/lib/struts-core-1.3.8.jar!/org/apache/struts/chain/chain-config.xml
Sep 6, 2011 3:10:56 PM org.apache.struts.tiles.TilesPlugin
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Sep 6, 2011 3:10:56 PM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Sep 6, 2011 3:10:56 PM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Sep 6, 2011 3:10:56 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory ROOT
Sep 6, 2011 3:10:56 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory docs
Sep 6, 2011 3:10:56 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory examples
Sep 6, 2011 3:10:56 PM org.apache.catalina.startup.HostConfig

Re: servlet unavailable

2011-09-06 Thread Adam Posner
There seems to be no reason for the bind exception. There was no other app
running.

It still started up though




On Tue, Sep 6, 2011 at 3:22 PM, Adam Posner cuco2...@gmail.com wrote:

 ep 6, 2011 3:10:54 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: The APR based Apache Tomcat Native library which allows optimal
 performance in production environments was not found on the
 java.library.path:
 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
 Sep 6, 2011 3:10:54 PM org.apache.coyote.http11.Http11Protocol init
 SEVERE: Error initializing endpoint
 java.net.BindException: Address already in use null:8080
 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
 at
 org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
 at
 org.apache.catalina.connector.Connector.initialize(Connector.java:1014)
 at
 org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
 at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 Caused by: java.net.BindException: Address already in use
 at java.net.PlainSocketImpl.socketBind(Native Method)
 at
 java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
 at java.net.ServerSocket.bind(ServerSocket.java:336)
 at java.net.ServerSocket.init(ServerSocket.java:202)
 at java.net.ServerSocket.init(ServerSocket.java:158)
 at
 org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
 ... 12 more
 Sep 6, 2011 3:10:54 PM org.apache.catalina.startup.Catalina load
 SEVERE: Catalina.start
 LifecycleException:  Protocol handler initialization failed:
 java.net.BindException: Address already in use null:8080
 at
 org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
 at
 org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
 at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 Sep 6, 2011 3:10:54 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 690 ms
 Sep 6, 2011 3:10:54 PM org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 Sep 6, 2011 3:10:54 PM org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.28
 Sep 6, 2011 3:10:54 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 INFO: Deploying configuration descriptor manager.xml
 Sep 6, 2011 3:10:55 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 INFO: Deploying configuration descriptor host-manager.xml
 Sep 6, 2011 3:10:55 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 INFO: Deploying configuration descriptor MyStrutsApp.xml
 Sep 6, 2011 3:10:56 PM org.apache.struts.action.ActionServlet initChain
 INFO: Loading chain catalog from
 jar:file:/home/cuco/NetBeansProjects/MyStrutsApp/build/web/WEB-INF/lib/struts-core-1.3.8.jar!/org/apache/struts/chain/chain-config.xml
 Sep 6, 2011 3:10:56 PM org.apache.struts.tiles.TilesPlugin
 initDefinitionsFactory
 INFO: Tiles definition factory loaded for module ''.
 Sep 6, 2011 3:10:56 PM org.apache.struts.validator.ValidatorPlugIn
 initResources
 INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
 Sep 6, 2011 3:10:56 PM org.apache.struts.validator.ValidatorPlugIn
 initResources
 INFO: Loading validation rules file from '/WEB-INF/validation.xml'
 Sep 6, 2011 3:10:56 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory ROOT
 Sep 6, 2011 3:10:56 PM 

Re: servlet unavailable

2011-09-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Adam,

On 9/3/2011 5:36 PM, Adam Posner wrote:
 I am hoping someone can help with this.  Tomcat 6.0.28 keeps giving
 me, saying 'Servlet Front Controller is not available'

Since your servlet is called FrontController (no space), the above
message is likely to be something you typed instead of copy/pasted.

Stop Tomcat and delete all the log files.
Start Tomcat and try to request /foo.do.

Post the entire contents of all logs/* back to the list. NOTE THAT
ATTACHMENTS ARE OFTEN STRIPPED FROM POSTS, so please copy/paste them
inline instead of trying to attach them.

If you are using some non-standard logging setup, post appropriate log
files from those locations, too.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5mc9wACgkQ9CaO5/Lv0PD/aQCglVRVNNcTd8Tx5GmyNpiONdTu
uI8AniYRzKWqPAa6Y7Pvw/FJItzHyi0H
=1r3E
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet 3.0 Part Header Keys

2011-09-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ole,

On 9/3/2011 8:05 PM, Ole Ersoy wrote:
 Anyone know if the the keys for the various
 javax.servlet.http.Part headers are available as constants
 anywhere?  I'd like to do something like:
 
 part.getHeader(Part.FILENAME);...instead of 
 part.getHeader(filename);

You could read the Servlet 3.0 spec. Or the javadocs.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5mdV4ACgkQ9CaO5/Lv0PA6TACeOvI+V4o+OjS1fwWNIBVXk5sM
WvgAniOsfB55w9JwiEcfyWRkcfWRQXfd
=DpK/
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet 3.0 File Upload

2011-09-06 Thread verlag.preis...@t-online.de

Hi Chris,
 
 It seems dangerous to allow the client to specify the file name. All
 kinds of bad things can happen such as specifying special file names
 (does PRN still work in win32? through Java?) or overwriting files
 from other clients.
 
 I would highly recommend that some portion of the temporary file name
 be completely random, as well as using something keyed on the request
 to disambiguate the file as well.

did you read my other reply to that thread? ;-)

Of course, I don't use that filename to save that file on the server (I assumed 
it is completely clear that one wouldn't do this). But I want to use the 
filename for displaying purposes.
E.g., I have a web application where the user can upload pictures, combined to 
a picture gallery (http://bildergalerie.pleier-it.de/ , it is a German site 
however, using TC 7). On uploading, the server reads the submitted filename and 
stores it in a field in the corresponding DB entry (without the file ending). 
Then it generates a filename based on the DB Row-ID (not on the filename) to 
actually store that image.
When the user visits the site, it displays miniature icons, using the filename 
field of the DB entry as description. Or, if the user choses to download the 
file, I can append a Content-Disposition header 
(javax.mail.internet.ContentDisposition) and set a filename parameter, so the 
user's browser download dialog can display the original filename (or a new 
name, if he edited the entry), without the actual URL having to contain that 
filename.  :)


Regards,

Konstantin Preißer



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SSLSession invalidate

2011-09-06 Thread Jürgen Jakobitsch
hi, i'm pretty sure, this question
has been asked a thouthand times, but
i didn't find an answer :

how can access the SSLSession in a jsp or a servlet
to be able to invalidate it.

any pointer really appreciated

wkr www.turnguard.com/turnguard

--
| Jürgen Jakobitsch,
| Software Developer
| Semantic Web Company GmbH
| Mariahilfer Straße 70 / Neubaugasse 1, Top 8
| A - 1070 Wien, Austria
| Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22

COMPANY INFORMATION
| http://www.semantic-web.at/

PERSONAL INFORMATION
| web   : http://www.turnguard.com
| foaf  : http://www.turnguard.com/turnguard
| skype : jakobitsch-punkt

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SSLSession invalidate

2011-09-06 Thread Chema
 how can access the SSLSession in a jsp or a servlet
 to be able to invalidate it.

Sorry, but

is there any difference between to  invalidate a HTTP Session and a SSLSession ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



JNDI configuration with 6.0.29

2011-09-06 Thread Anjib Mulepati









Hi All,
I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with 
Tomcat 6.0.29. This is giving me following error
javax.naming.NameNotFoundException: Name dynic is not bound in this Context
org.apache.naming.NamingContext.lookup(NamingContext.java:770)
org.apache.naming.NamingContext.lookup(NamingContext.java:140)
org.apache.naming.NamingContext.lookup(NamingContext.java:781)
org.apache.naming.NamingContext.lookup(NamingContext.java:153)

org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97)
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
org.apache.naming.NamingContext.lookup(NamingContext.java:793)
org.apache.naming.NamingContext.lookup(NamingContext.java:140)
org.apache.naming.NamingContext.lookup(NamingContext.java:781)
org.apache.naming.NamingContext.lookup(NamingContext.java:153)
com.anjib.factory.DynICFactory.init(DynICFactory.java:41)
com.anjib.actions.CommonAction.execute(CommonAction.java:42)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)I ran same 
program with Tomcat 7.0.12 and it works fine. Here are my configurations:1. In 
META-INF/context.xmlContext antiJARLocking=true path=/ClientDAOTest
Resource name=jdbc/dynicauth=Container
type=oracle.jdbc.pool.OracleDataSource
driverClassName=oracle.jdbc.driver.OracleDriver
factory=oracle.jdbc.pool.OracleDataSourceFactory
url=jdbc:oracle:thin:@//localhost:4001/SAIDITuser=sfed_schema   
 password=sfed_schemamaxActive=20
maxIdle=10maxWait=-1 /   /Context2. In 
WEB-INF/web.xmlresource-ref  res-ref-namejdbc/dynic/res-ref-name 
res-typejavax.sql.DataSource/res-type res-authContainer/res-auth 
res-sharing-scopeShareable/res-sharing-scope /resource-ref
2. In factory class I havepublic class DynICFactory implements JNDIInterface{   
 private DataSource dataSource;@Overridepublic DataSource 
getDataSource() {return dataSource;}
@Overridepublic AgencyInterface createAgencyManager() {
AgencyImpl manager = new AgencyImpl();
manager.setDataSource(dataSource);return manager;}
public DynICFactory() throws DAOException {DataSource ds = null;
try {Context initCtx = new InitialContext();Context 
envCtx = (Context) initCtx.lookup(java:comp/env);ds = 
(DataSource) envCtx.lookup(jdbc/dynic);} catch 
(NamingException e) {throw new DAOException(Tomcat JNDI setup 
failed, e);}this.dataSource = ds;}}



Anjib Man Mulepati

409-225-6216



  

Re: SSLSession invalidate

2011-09-06 Thread baran topal
Greetings from Stockholm, this is Baran Topal.

As i was drinking my Guiness, i find your question interesting :)

Here you go:

%
HttpSession s = request.getSession(false);
if (s != null) s.invalidate();
%

Inform me whether this is working or not :)

Regards.

On 6 sep 2011, at 22:09, Chema demablo...@gmail.com wrote:

 how can access the SSLSession in a jsp or a servlet
 to be able to invalidate it.

 Sorry, but

 is there any difference between to  invalidate a HTTP Session and a 
 SSLSession ?

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SSLSession invalidate

2011-09-06 Thread Jürgen Jakobitsch
i should make myself clearer, i guess...

i'm trying to close a SSL connection, in case someone wants to use another 
certificate
for a webpage that uses client-cert as authentication method.

i know how to close a session, tanks. what i dont't know, how to invalidate a 
SSLSession.
apparently there is one, i can get it's id with 
request.getAttribute(javax.servlet.request.ssl_session)
and also apparently it is not enough to do session.invalidate(), why? because i 
have it in a logout.jsp
that redirects to my index.jsp. now if the SSL Connection would have been 
invalidated, i should be
asked to choose a certificate from my browser certs, which i'm not, after 
passing my logout.jsp
i'm still logged in, i even have a request.setHeader(connection, close) in 
my logout jsp, which
doesn't help either (i have read that the header thing might be interpreted 
more as guideline for the browser
and not necessarily close all connections).

in tomcat7 there's the possibility to use SSLSessionManager to invalidate 
SSLSession, so i'm doing a
wild guess, that something similar has to be possible with tomcat6 as well.


so the overall workflow would be

1. first hit of index.jsp
2. i'm asked to choose a browser cert
3. i log in with a browser cert
4. i hit the logout button, which makes an ajax request to logout.jsp
5. in logout.jsp i invalidate the normal HTTPSession and set the connection 
header to close

   = here some is missing to invalidate the SSLSession

6. in case of success of the logout-ajax request, i'm taken to index.jsp
   (now start over from point 1. again)
   only i'm not asked for a cert the second time, which is exactly what i want 
to achieve... and before you asked : i don't want to switch to tomcat7 for this
   but need it get done in tomcat-6.0.32

any help really appreciated
wkr turnguard



- Original Message -
From: baran topal jazziiil...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, September 6, 2011 10:57:17 PM
Subject: Re: SSLSession invalidate

Greetings from Stockholm, this is Baran Topal.

As i was drinking my Guiness, i find your question interesting :)

Here you go:

%
HttpSession s = request.getSession(false);
if (s != null) s.invalidate();
%

Inform me whether this is working or not :)

Regards.

On 6 sep 2011, at 22:09, Chema demablo...@gmail.com wrote:

 how can access the SSLSession in a jsp or a servlet
 to be able to invalidate it.

 Sorry, but

 is there any difference between to  invalidate a HTTP Session and a 
 SSLSession ?

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


--
| Jürgen Jakobitsch,
| Software Developer
| Semantic Web Company GmbH
| Mariahilfer Straße 70 / Neubaugasse 1, Top 8
| A - 1070 Wien, Austria
| Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22

COMPANY INFORMATION
| http://www.semantic-web.at/

PERSONAL INFORMATION
| web   : http://www.turnguard.com
| foaf  : http://www.turnguard.com/turnguard
| skype : jakobitsch-punkt

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SSLSession invalidate

2011-09-06 Thread Mark Thomas
On 06/09/2011 22:42, Jürgen Jakobitsch wrote:
 apparently there is one, i can get it's id with 
 request.getAttribute(javax.servlet.request.ssl_session)

That is a Tomcat bug it should be javax.servlet.request.ssl_session_id

 in tomcat7 there's the possibility to use SSLSessionManager to invalidate 
 SSLSession, so i'm doing a
 wild guess, that something similar has to be possible with tomcat6 as well.

Your wild guess is wrong. That feature is in Tomcat 7 onwards.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SSLSession invalidate

2011-09-06 Thread Jürgen Jakobitsch
thanks mark,

if i understand you correct, it is simply NOT possible to invalidate
the SSLSession of which i can get the id with 
request.getAttribute(javax.servlet.request.ssl_session)
(it works with this key in 6.0.32)

wkr turnguard

- Original Message -
From: Mark Thomas ma...@apache.org
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, September 7, 2011 12:08:29 AM
Subject: Re: SSLSession invalidate

On 06/09/2011 22:42, Jürgen Jakobitsch wrote:
 apparently there is one, i can get it's id with 
 request.getAttribute(javax.servlet.request.ssl_session)

That is a Tomcat bug it should be javax.servlet.request.ssl_session_id

 in tomcat7 there's the possibility to use SSLSessionManager to invalidate 
 SSLSession, so i'm doing a
 wild guess, that something similar has to be possible with tomcat6 as well.

Your wild guess is wrong. That feature is in Tomcat 7 onwards.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


--
| Jürgen Jakobitsch,
| Software Developer
| Semantic Web Company GmbH
| Mariahilfer Straße 70 / Neubaugasse 1, Top 8
| A - 1070 Wien, Austria
| Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22

COMPANY INFORMATION
| http://www.semantic-web.at/

PERSONAL INFORMATION
| web   : http://www.turnguard.com
| foaf  : http://www.turnguard.com/turnguard
| skype : jakobitsch-punkt

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: SSLSession invalidate

2011-09-06 Thread Adamus, Steven J.
Don't assume your SSL session or connection hasn't been invalidated just 
because you aren't asked to choose a certificate from your browser certs when 
you log in again.  In our system (Tomcat 5.5.33), I know that our HTTP session 
and Single Sign-on session are invalidated upon logout, and we see similar 
behavior (no need to select certificate) upon re-login because the browser 
caches the user's certificate choice (and smart card PIN).  Is your session ID 
the same when you go back in?  

If you are using IE and you want to clear the browser cache to select another 
certificate, go to Tools-Internet Options, select Content tab, and click Clear 
SSL state. 

-Original Message-
From: users-return-227483-STEVEN.J.ADAMUS=saic@tomcat.apache.org 
[mailto:users-return-227483-STEVEN.J.ADAMUS=saic@tomcat.apache.org] On 
Behalf Of Jürgen Jakobitsch
Sent: Tuesday, September 06, 2011 3:12 PM
To: Tomcat Users List
Subject: Re: SSLSession invalidate

thanks mark,

if i understand you correct, it is simply NOT possible to invalidate the 
SSLSession of which i can get the id with 
request.getAttribute(javax.servlet.request.ssl_session)
(it works with this key in 6.0.32)

wkr turnguard

- Original Message -
From: Mark Thomas ma...@apache.org
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, September 7, 2011 12:08:29 AM
Subject: Re: SSLSession invalidate

On 06/09/2011 22:42, Jürgen Jakobitsch wrote:
 apparently there is one, i can get it's id with 
 request.getAttribute(javax.servlet.request.ssl_session)

That is a Tomcat bug it should be javax.servlet.request.ssl_session_id

 in tomcat7 there's the possibility to use SSLSessionManager to 
 invalidate SSLSession, so i'm doing a wild guess, that something similar has 
 to be possible with tomcat6 as well.

Your wild guess is wrong. That feature is in Tomcat 7 onwards.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-- 
| Jürgen Jakobitsch,
| Software Developer
| Semantic Web Company GmbH
| Mariahilfer Straße 70 / Neubaugasse 1, Top 8 A - 1070 Wien, Austria 
| Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22

COMPANY INFORMATION
| http://www.semantic-web.at/

PERSONAL INFORMATION
| web   : http://www.turnguard.com
| foaf  : http://www.turnguard.com/turnguard
| skype : jakobitsch-punkt

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org