RE: Upgrade to Tomcat 7 Issues

2013-08-12 Thread Seema Patel


 Date: Fri, 9 Aug 2013 09:07:12 -0700
 From: its_toas...@yahoo.com
 To: users@tomcat.apache.org
 Subject: Re: Upgrade to Tomcat 7 Issues
 
 On 8/9/2013 8:46 AM, Christopher Schultz wrote:
  -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
 
  Chuck,
 
  On 8/9/13 10:08 AM, Caldarale, Charles R wrote:
  From: Seema Patel [mailto:seema...@hotmail.com] Subject: RE:
  Upgrade to Tomcat 7 Issues
 
  In my WEB-INF/lib I have the following (sorry the list is quite
  long): activation.jar
 
  In Tomcat7.0/lib directory I have (I have grouped them
  alphabetically so it doesn't make the list too long downwards,
  like the above list)
 
  activation.jar j2ee.jar
 
  You must never, never, never have the same class files in multiple
  locations in the class loader hierarchy (e.g., activation.jar and
  several others).
 
  I don't think activation is something provided by servlet
  containers. I don't see it in a stock Tomcat, for example.
 
 
 JavaBeans activation framework (activation.jar) was required for Java 
 mail when running on older versions of the JRE. It has been included 
 since JRE 6 (can't remember the minor version).
 
 Since the original poster has upgraded to JRE 7, there should be no need 
 for this JAR either in $CATALINA_HOME/lib or WEB-INF/lib of the application.
 
  Also, j2ee.jar must never be present anywhere in any Tomcat
  installation.
 
  I'm not sure what's in this particular j2ee.jar, but you're probably
  right that it does not belong. The container should provide all
  services to the webapp. If you want a more fully-functional J2EE
  container, consider Apache TomEE.
 
  You need to start over, not adding anything to Tomcat's lib
  directory, and try running your webapp.
 
  Absolutely.
 
  - -chris
 
 . . . . just my two cents.
 /mde/
 

Right, I've re-installed Tomcat 7.0.42.  The only things I've changed are in 
the server.xml file, here is what's in the server.xml file (what I have 
added/changed are in red, one being the connector port - from 8080 to 8088 and 
the other is adding the realm tag/element just before the Host tag/element):

Server port=8005 shutdown=SHUTDOWN
  !-- Security listener. Documentation at /docs/config/listeners.html
  Listener className=org.apache.catalina.security.SecurityListener /
  --
  !--APR library loader. Documentation at /docs/apr.html --
  Listener SSLEngine=on 
className=org.apache.catalina.core.AprLifecycleListener/
  !--Initialize Jasper prior to webapps are loaded. Documentation at 
/docs/jasper-howto.html --
  Listener className=org.apache.catalina.core.JasperListener/
  !-- Prevent memory leaks due to use of particular java/javax APIs--
  Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener/
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/
  Listener 
className=org.apache.catalina.core.ThreadLocalLeakPreventionListener/

  !-- Global JNDI resources
   Documentation at /docs/jndi-resources-howto.html
  --
  GlobalNamingResources
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users
--
Resource auth=Container description=User database that can be updated 
and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory 
name=UserDatabase pathname=conf/tomcat-users.xml 
type=org.apache.catalina.UserDatabase/
  /GlobalNamingResources

  !-- A Service is a collection of one or more Connectors that share
   a single Container Note:  A Service is not itself a Container,
   so you may not define subcomponents such as Valves at this level.
   Documentation at /docs/config/service.html
   --
  Service name=Catalina

!--The connectors can use a shared executor, you can define one or more 
named thread pools--
!--
Executor name=tomcatThreadPool namePrefix=catalina-exec-
maxThreads=150 minSpareThreads=4/
--


!-- A Connector represents an endpoint by which requests are received
 and responses are returned. Documentation at :
 Java HTTP Connector: /docs/config/http.html (blocking  non-blocking)
 Java AJP  Connector: /docs/config/ajp.html
 APR (HTTP/AJP) Connector: /docs/apr.html
 Define a non-SSL HTTP/1.1 Connector on port 8080
--
Connector connectionTimeout=2 port=8088 protocol=HTTP/1.1 
redirectPort=8443/
!-- A Connector using the shared thread pool--
!--
Connector executor=tomcatThreadPool
   port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
--
!-- Define a SSL HTTP/1.1 Connector on port 8443
 This connector uses the JSSE configuration, when using APR, the
 connector should be using the OpenSSL style configuration
 described in the APR documentation --
!--
Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=false sslProtocol=TLS /
--

   

Re: Upgrade to Tomcat 7 Issues

2013-08-12 Thread André Warnier

Seema Patel wrote:



...
Right, I've re-installed Tomcat 7.0.42.  The only things I've changed are in the server.xml file, here is what's in the server.xml file (what I have added/changed are in red, 


Not the easiest to spot, for a list which works only with plain text messages and strips 
most attachments.


Please check the recommendations in http://tomcat.apache.org/lists.html


...

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



RE: Upgrade to Tomcat 7 Issues

2013-08-12 Thread Seema Patel
Sorry,  I didn't realise it wouls remove the highlighted red.  This is what I 
have changed from 8080 to 8088:

Connector connectionTimeout=2 port=8088 protocol=HTTP/1.1 
redirectPort=8443/

This is what I have added just above the Host tag/element:

Realm className=org.apache.catalina.realm.JNDIRealm
connectionURL=xxx://xxx:3268
connectionName=xxx@xxx.local connectionPassword=xxx
referrals=follow userBase=dc=xxx,dc=local
userSearch=(sAMAccountName={0}) userSubtree=true
roleBase=dc=xxx,dc=local roleSearch=(member={0})
roleName=cn roleSubtree=true /

Sorry again about that.

 Date: Mon, 12 Aug 2013 12:05:51 +0200
 From: a...@ice-sa.com
 To: users@tomcat.apache.org
 Subject: Re: Upgrade to Tomcat 7 Issues
 
 Seema Patel wrote:
  
 ...
  Right, I've re-installed Tomcat 7.0.42.  The only things I've changed are 
  in the server.xml file, here is what's in the server.xml file (what I have 
  added/changed are in red, 
 
 Not the easiest to spot, for a list which works only with plain text messages 
 and strips 
 most attachments.
 
 Please check the recommendations in http://tomcat.apache.org/lists.html
 
 
 ...
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

RE: Upgrade to Tomcat 7 Issues

2013-08-12 Thread Seema Patel


 From: seema...@hotmail.com
 To: users@tomcat.apache.org
 Subject: RE: Upgrade to Tomcat 7 Issues
 Date: Mon, 12 Aug 2013 11:09:59 +0100
 
 Sorry,  I didn't realise it wouls remove the highlighted red.  This is what I 
 have changed from 8080 to 8088:
 
 Connector connectionTimeout=2 port=8088 protocol=HTTP/1.1 
 redirectPort=8443/
 
 This is what I have added just above the Host tag/element:
 
 Realm className=org.apache.catalina.realm.JNDIRealm
 connectionURL=xxx://xxx:3268
 connectionName=xxx@xxx.local connectionPassword=xxx
 referrals=follow userBase=dc=xxx,dc=local
 userSearch=(sAMAccountName={0}) userSubtree=true
 roleBase=dc=xxx,dc=local roleSearch=(member={0})
 roleName=cn roleSubtree=true /
 
 Sorry again about that.
 

I've added my application.xml file to Tomcat/conf/Catalina/localhost/ directory 
which contains all the database connection resources.
This has removed the error I was getting in my 1st post for today.  I now have 
this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 
'com.mysql.jdbc.Driver'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.viatel.soportal.helpers.Database.getSopConnection(Database.java:18)
at com.viatel.soportal.util.UserUtil.getUser(UserUtil.java:36)
at com.viatel.soportal.P1_00Action.portalExecute(P1_00Action.java:60)
at com.viatel.soportal.PortalBaseAction.execute(PortalBaseAction.java:200)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.viatel.soportal.RequestFilter.doFilter(RequestFilter.java:47)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.viatel.commonlib.ADGroupFilter.doFilter(ADGroupFilter.java:62)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
... 37 more


Do i need to add the my-sql-connector-java-5.0.8-bin jar somewhere?  Or do I 
need to do something else?

Thanks


  Date: Mon, 12 Aug 2013 12:05:51 +0200
  From: 

How Tomcat6 access a remote directory on the network(NetApp)

2013-08-12 Thread Rudiyono RUDIYONO
Hello Tomcat experts,

I'm using Tomcat6 on my web application which is running on Windows Server 2003 
Standard Edition.
I want to access static files (PDF) in the remote directory on the disk server 
(NetApp) through http address from web browser.
I tried to use Windows shortcut, but It didn't work. Seems that Tomcat 
recognize a shortcut as a common file (.lnk) instead of a soft link.
How can I access it properly through http in the IE browser?

I can only access the files if the static files are put in the local disk.
I tried to use hard link and junction, but they work only on the local disk (on 
the same computer).
I tried to modify context.xml, but it didn't succeed.
Most of the solution in the internet is a soft link from local disk to local 
disk.

Thank you for your clues.
I'm still beginner in Tomcat administration.
Rudi



Re: How Tomcat6 access a remote directory on the network(NetApp)

2013-08-12 Thread André Warnier

Rudiyono RUDIYONO wrote:

Hello Tomcat experts,

I'm using Tomcat6 on my web application which is running on Windows Server 2003 
Standard Edition.
I want to access static files (PDF) in the remote directory on the disk server 
(NetApp) through http address from web browser.
I tried to use Windows shortcut, but It didn't work. Seems that Tomcat 
recognize a shortcut as a common file (.lnk) instead of a soft link.
How can I access it properly through http in the IE browser?

I can only access the files if the static files are put in the local disk.
I tried to use hard link and junction, but they work only on the local disk (on 
the same computer).
I tried to modify context.xml, but it didn't succeed.
Most of the solution in the internet is a soft link from local disk to local 
disk.

Thank you for your clues.
I'm still beginner in Tomcat administration.
Rudi



Are you sure that this is your problem ?
If you have installed Tomcat in the standard way, Tomcat will run as a Service, under a 
user-id LocalSystem.  In Windows, this special user-id has no access to Windows network 
resources such as network-mapped drives etc..
In order for Tomcat to be able to access such drives, you will need to use a domain user 
to run the Tomcat Service.

This may or may not be your problem, but it is something that you should 
probably check first.


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



RE: How Tomcat6 access a remote directory on the network(NetApp)

2013-08-12 Thread Rudiyono RUDIYONO
Hi André,

Yes, it's under Local System.
I think you are right. It's because of the access problem.

That's why all the errors are related to read/write access to the target 
directory.

Thank you for your clues.


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: 12 August 2013 15:39
To: Tomcat Users List
Subject: Re: How Tomcat6 access a remote directory on the network(NetApp)

Rudiyono RUDIYONO wrote:
 Hello Tomcat experts,
 
 I'm using Tomcat6 on my web application which is running on Windows Server 
 2003 Standard Edition.
 I want to access static files (PDF) in the remote directory on the disk 
 server (NetApp) through http address from web browser.
 I tried to use Windows shortcut, but It didn't work. Seems that Tomcat 
 recognize a shortcut as a common file (.lnk) instead of a soft link.
 How can I access it properly through http in the IE browser?
 
 I can only access the files if the static files are put in the local disk.
 I tried to use hard link and junction, but they work only on the local disk 
 (on the same computer).
 I tried to modify context.xml, but it didn't succeed.
 Most of the solution in the internet is a soft link from local disk to local 
 disk.
 
 Thank you for your clues.
 I'm still beginner in Tomcat administration.
 Rudi
 
 
Are you sure that this is your problem ?
If you have installed Tomcat in the standard way, Tomcat will run as a Service, 
under a user-id LocalSystem.  In Windows, this special user-id has no access 
to Windows network resources such as network-mapped drives etc..
In order for Tomcat to be able to access such drives, you will need to use a 
domain user 
to run the Tomcat Service.
This may or may not be your problem, but it is something that you should 
probably check first.


-
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: Upgrade to Tomcat 7 Issues

2013-08-12 Thread Ognjen Blagojevic

Seema,

On 12.8.2013 13:09, Seema Patel wrote:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 
'com.mysql.jdbc.Driver'

...

Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver


You are doing fine. You correctly removed all the jar files as Chuck 
suggested. Now you need to add them one by one EITHER to Tomcat lib 
folder or webapp WEB-INF/lib folder.


Since your configuration implies that Tomcat will be managing your DB 
connection pool, add mysql-connector jar to Tomcat lib folder, and try 
to restart Tomcat.


-Ognjen


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



RE: Upgrade to Tomcat 7 Issues

2013-08-12 Thread Seema Patel


 Date: Mon, 12 Aug 2013 14:00:12 +0200
 From: ognjen.d.blagoje...@gmail.com
 To: users@tomcat.apache.org
 Subject: Re: Upgrade to Tomcat 7 Issues
 
 Seema,
 
 On 12.8.2013 13:09, Seema Patel wrote:
  org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver 
  class 'com.mysql.jdbc.Driver'
 ...
  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
 
 You are doing fine. You correctly removed all the jar files as Chuck 
 suggested. Now you need to add them one by one EITHER to Tomcat lib 
 folder or webapp WEB-INF/lib folder.
 
 Since your configuration implies that Tomcat will be managing your DB 
 connection pool, add mysql-connector jar to Tomcat lib folder, and try 
 to restart Tomcat.
 
 -Ognjen
 
 

Thanks for the advise.  I have now fixed the issue and it is working.  I added 
the mysql-connector-java-5.0.8-bin to my project's lib directory, which has put 
it into WEB-INF/lib directory when built and deployed.

Thanks to all that have helped me with this, its appreciated.
Seema


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

RE: Upgrade to Tomcat 7 Issues

2013-08-12 Thread Jeffrey Janner
 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Friday, August 09, 2013 10:47 AM
 To: Tomcat Users List
 Subject: Re: Upgrade to Tomcat 7 Issues
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Chuck,
 
 On 8/9/13 10:08 AM, Caldarale, Charles R wrote:
  From: Seema Patel [mailto:seema...@hotmail.com] Subject: RE:
  Upgrade to Tomcat 7 Issues
 
  In my WEB-INF/lib I have the following (sorry the list is quite
  long): activation.jar
 
  In Tomcat7.0/lib directory I have (I have grouped them
 alphabetically
  so it doesn't make the list too long downwards, like the above list)
 
  activation.jar j2ee.jar
 
  You must never, never, never have the same class files in multiple
  locations in the class loader hierarchy (e.g., activation.jar and
  several others).
 
 I don't think activation is something provided by servlet containers.
 I don't see it in a stock Tomcat, for example.
 

CAVEAT:  I have yet to verify this via testing, but

I was reading the documentation on the javamail api and discovered that as of 
Java 6, the activation.jar file that was previously required in Java 5 and 
below is no longer needed, as the functionality is provided in the Java 6up 
jvm. Now I'm not sure what that means overall, but for myself, and many others, 
the only reason we included activation.jar in our apps is to support javamail.
If you are using activation.jar features directly, I would suggest verifying if 
you still need the jar file after upgrading jvms, otherwise, it should be safe 
to delete it.

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



RE: Option to allow \ in hardcoded file paths

2013-08-12 Thread Jeffrey Janner
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
Sent: Tuesday, August 06, 2013 10:06 AM
To: 'Tomcat Users List'
Subject: Option to allow \ in hardcoded file paths

Had a programmer build a filepath using \ instead of / , because he's 
windows centric (duh).
Works great on my mostly windows deployments, but fails spectacularly on 
Unix/Linux boxes.
Is there a Java option that can force the Linux boxes to treat the backslash as 
a forward slash?

[Jeff Janner] Obviously, the answer to my question above was No!, though no 
one bothered to address it directly.

Fixing the code for future releases, but need to get something working now with 
existing code.

[Jeff Janner] Yes, I changed all hard-coded path separators to / and 
recompiled.  Luckily, I had the time to make the correction before it went out 
to the customer base.

Jeffrey Janner
Sr. Network Administrator
jeffrey.jan...@polydyne.commailto:first.l...@polydyne.com
PolyDyne Software Inc.
Main:   512.343.9100
Direct:  512.583.8930

 [cid:image002.png@01CC0FB7.4FF43CE0]

Speed, Intelligence  Savings in Sourcing



RE: [OT] Using the bin/daemon.sh script on ubuntu.

2013-08-12 Thread Jeffrey Janner
 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Tuesday, August 06, 2013 10:52 PM
 To: Tomcat Users List
 Subject: Re: [OT] Using the bin/daemon.sh script on ubuntu.
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Igor,
 
 On 8/6/13 6:28 AM, Igor Cicimov wrote:
  On 06/08/2013 12:40 AM, Jeffrey Janner
  jeffrey.jan...@polydyne.com wrote:
 
  -Original Message- From: Christopher Schultz
  [mailto:ch...@christopherschultz.net] Sent: Friday, August 02,
  2013 10:30 PM To: Tomcat Users List Subject: Re: [OT] Using the
  bin/daemon.sh script on ubuntu.
 
  -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
 
  Christian
 
  On 8/1/13 11:55 AM, Christian Schneider wrote:
  On our (AWS) installation we have limited space on /opt, therefore
  we attached an EBS volume  to /var/, - otherwise we would get
  problems with the log files. Now it can grow above some GB.
 
  Have you thought about using /mnt/ephemeral[0-9]?
 
  Our instances have ~1TiB in combined ephemeral storage available
 per
  instance. I'm sure it depends upon the instance type, though.
  Remember that terminating the instance loses the ephemeral data..
  that's what makes it ... ephemeral. Just remember to copy what you
  need back to an EBS-backed storage volume before you terminate.
 
  - -chris
 
  Chris, If I remember my empirical testing of the AWS ephemeral
  storage system, you actually lose data on shutdown, not termination.
 
  Not true, the ephemeral data is only lost on instance termination.
 
 Confirmed -- at least with shutdown -r, and on an m1.large instance
 - -- /mnt/ephemeralX retains files across reboots. I didn't do a stop
 and start from the GUI or anything like that, though.
 
 I think you're supposed to be able to rely on ephemeral storage. The
 thing is that it's not EBS-backed: it's actually only on the physical
 server that you get when you launch an instance. When you shut-down,
 the data stays on the physical machine and you can only get to it again
 when you boot the same instance on the same machine. Since AWS always
 runs instances on the same physical hardware every time, you're good
 unless you /terminate/ (i.e. discard) the instance.
 
 Honestly, I was a bit surprised to find out that each time you launch
 an instance it doesn't just get launched on some random piece of
 equipment. That would seem more flexible (if wasteful: moving GiBs of
 data around to various hosts isn't exactly fast) to me.
 
 On more than one occasion, I've had an instance start acting funny and
 shortly thereafter, I get an email from AWS saying that they will be
 terminating my instance in a few days. You can't just migrate the VM
 to another piece of hardware. Instead, you have to image the VM, create
 an AMI from that image, create a new instance with that AMI, and
 destroy the old instance. (Then delete the old image *and* EBS store,
 otherwise you continue to pay for the disk space taken up by an
 instance that will never again be launched). Pain in the neck.
 
 I think you can create an AMI directly from a running instance these
 days (probably for this exact reason).
 
 - -chris

Well, I must admit my test was using an m4.xlarge with EBS-backed root, so my 
tests might have had some difference. I don't remember if I tested it with 
shutdown -r or init 6, though I do remember doing a stop/start from the GUI 
(since that's probably what my backup folks here would end up doing). 
BTW: If you set up your instance with an EBS-backed startup drive (or all 
useful drives), then you don't have to worry about all that AMI business, they 
can just mount your drives on another physical box.  Of course, at that point, 
the ephemeral drives are basically useless for anything other than temp/swap 
space. Makes one wonder why they are even offered, though I'm OK with using 
them for those purposes.
Jeff 


FW: configuring realm UserDatabase do not works

2013-08-12 Thread Francesco Viscomi
Some one can help me please!

Thanks anyway

Francesco

Italy

 

 

From: Francesco Viscomi [mailto:fvisc...@gmail.com] 
Sent: martedì 13 agosto 2013 0.54
To: 'users-ow...@tomcat.apache.org'
Subject: configuring realm UserDatabase do not works

 

Hi all,

I’ve spent a lot of time to configure tomcat on using realm UserDatabase
(that is tomcat-users.xml) without success.

When I try to access the protect resource I get:

 

HTTP Status 403 - Access to the requested resource has been denied

type Status report

message Access to the requested resource has been denied

description Access to the specified resource (Access to the requested
resource has been denied) has been forbidden.

 

Apache Tomcat/7.0.27

 

 

I’m using netbeans 7.3 with this characteristic:

 

Product Version: NetBeans IDE 7.3 (Build 201306052037) 

Java: 1.6.0_25; Java HotSpot(TM) Client VM 20.0-b11 

Runtime: Java(TM) SE Runtime Environment 1.6.0_25-b06 

System: Windows XP version 5.1 running on x86; Cp1252; it_IT (nb) 

User directory: C:\Documents and Settings\francesco\Dati
applicazioni\NetBeans\7.3 

Cache directory: C:\Documents and Settings\francesco\Impostazioni
locali\Dati applicazioni\NetBeans\Cache\7.3 

 

 

I also tried on both tomcat 7.0.27.0 and tomcat 7.0.34.0.

 

These are the step I did:

1)  Adding the following statement to the the tomcat-user.xml:



role rolename=UserRole/

user username=user password=uuu role=UserRole/



 

2) take sure that on the server.xml the following statement are present:

 



GlobalNamingResources

Resource name=UserDatabase auth=Container

  type=org.apache.catalina.UserDatabase

  description=User database that can be updated and saved

  factory=org.apache.catalina.users.MemoryUserDatabaseFactory

  pathname=conf/tomcat-users.xml /

/GlobalNamingResources



 



Realm className=org.apache.catalina.realm.LockOutRealm

Realm className=org.apache.catalina.realm.UserDatabaseRealm

  resourceName=UserDatabase/

/Realm



 

3)Configuring web.xml (inside the WEB-INF directory) as following:

 



?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;

session-config

session-timeout

30

/session-timeout

/session-config

welcome-file-list

welcome-fileindex.jsp/welcome-file

/welcome-file-list

security-constraint

display-nameVincoloUtente/display-name

web-resource-collection

web-resource-namearea protetta/web-resource-name

description/

url-pattern/CartellaProtetta/*/url-pattern

/web-resource-collection

auth-constraint

description/

role-nameUserRole/role-name

/auth-constraint

/security-constraint

login-config

auth-methodFORM/auth-method

form-login-config

form-login-page/login.jsp/form-login-page

form-error-page/error.jsp/form-error-page

/form-login-config

/login-config

security-role

descriptionUtenti che hanno questo ruolo (user) possono accedere all'area
protetta/description

role-nameUserRole/role-name

/security-role

/web-app



 

 

4) creating the file index.jsp,login.jsp and error.jsp.

 

5)creating the path and file at “web
pages/CartellaProtetta/fileProtetto.html”

 

 

Is this a bug on tomcat or I’m making some mistake?

 

Thanks really much

Francesco

Italy