Re: Tomcat configuration under webApp

2011-10-19 Thread ettoregia



Pid * wrote:
 
 On 18/10/2011 23:29, Tim Watts wrote:
 Sorry I meant  /tomcat/apps/myAppName/conf/ and under conf all the files
  mentioned above
 That is a strange layout. Is it possible that the IT people are running
 each webapp in a separate JVM and pointing CATALINA_BASE
 to /tomcat/apps/appName ? 
 
 That makes sense actually, I'll ask the IT if that's what they do.
 
 
 
   What is in the server.xml file?
 
 Question still stands...
 
 
 p
 
 SERVER.XML--
 ?xml version='1.0' encoding='utf-8'?
 Server port=1${tomcat.server.port} shutdown=SHUTDOWN
 
   Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /
   Listener className=org.apache.catalina.core.JasperListener /
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 /
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
 
   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
 
   Service name=Catalina
 Connector port=${tomcat.server.port} protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /
 
 Engine name=Catalina defaultHost=localhost
 
 Realm className=org.apache.catalina.realm.JNDIRealm
 connectionURL=ldap://pinot-nero.energiaspa.it:389;
 alternateURL=ldap://pinot-grigio.energiaspa.it:389;
 connectionName=ENERGIASPA\ldapbrowser
 connectionPassword=drc4Fv9CGqIzWewX9nO3
 userBase=DC=ENERGIASPA,DC=IT
 referrals=follow
 userSubtree=true
   userSubtree=true
 userSearch=(amp;(sAMAccountName={0})(objectClass=user))
 roleBase=OU=linux-group,OU=Linux,DC=ENERGIASPA,DC=IT
 roleName=cn
 roleSearch=(member={0})
 /
 
   Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
 
   Context path=/lambdaprobe
 docBase=${catalina.home}/webapps/probe privileged=true
  antiResourceLocking=false antiJARLocking=false
 
   /Context
 
   /Host
 /Engine
   /Service
 /Server
 ---
 
 
  
 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-configuration-under-webApp-tp32675490p32680389.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat configuration under webApp

2011-10-19 Thread ettoregia



Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Ettore,
 
 On 10/19/2011 3:38 AM, ettoregia wrote:
 SERVER.XML-- ?xml
 version='1.0' encoding='utf-8'? Server
 port=1${tomcat.server.port} shutdown=SHUTDOWN
 
 Just to let you know, I'm trying to figure out something out of what has
 been done by someone else, that is, sometimes I don't know why those
 things are there.
 
 You might want to consider using two different properties for the
 shutdown and connector ports: port 1xxx might not be available all the
 time, and you might want to configure it explicitly and independently
 of tomcat.server.port.
 
 OK
 
 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
 
 You should remove that Resource if you're not using it.
 
 
 
 Service name=Catalina Connector port=${tomcat.server.port}
 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443
 /
 
 Engine name=Catalina defaultHost=localhost
 
 Realm className=org.apache.catalina.realm.JNDIRealm 
 connectionURL=ldap://pinot-nero.energiaspa.it:389; 
 alternateURL=ldap://pinot-grigio.energiaspa.it:389; 
 connectionName=ENERGIASPA\ldapbrowser 
 connectionPassword=drc4Fv9CGqIzWewX9nO3
 
 Whoops. Time to change your password.
 You're def right, even if those tools are inside the intranet and the pwd
 are old ones, but still...thanks
 
 Host name=localhost  appBase=webapps unpackWARs=true
 autoDeploy=true xmlValidation=false xmlNamespaceAware=false
 
 Context path=/lambdaprobe 
 docBase=${catalina.home}/webapps/probe privileged=true 
 antiResourceLocking=false antiJARLocking=false
 
 A Host with appBase=webapps and a Context with a docBase in
 webapps will result in Lambda Probe (time to upgrade to Psi Probe!)
 being deployed twice. (Unless you are using CATALINA_HOME and
 CATALINA_BASE, in which case, you should be okay with this).
 
 Okay, I don't see any reason why you couldn't have everything
 contained in your webapp: either you use the Realm specified at the
 Engine level and don't need to specify it in your
 META-INF/context.xml or you use a different Realm and *do* need to
 specify it in your META-INF/context.xml.
 
 So... why can't you use the manager webapp to deploy your WAR?
 
 Well because I've no permission to access the manager webApp since there
 are other applications under the container that I don't own. 
 
 Btw dou you understand why I have server.xml and the others mentioned
 before under Tomcat/webApps/myWebApp/conf/, aren't they files that should
 just be stored under Tomcat/conf ??
 
 Thanks a lot for your time, really apprecciate!
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk6e3+oACgkQ9CaO5/Lv0PAxNwCgn6tBSZDtt8Bu04dXNOZL+2eN
 pZQAn289rvJm5fkETltiDMfsfY80KmvQ
 =9Mkp
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-configuration-under-webApp-tp32675490p32683725.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: [sidebar] Tomcat configuration under webApp

2011-10-19 Thread ettoregia



n828cl wrote:
 
 From: Mark Thomas [mailto:ma...@apache.org] 
 Subject: Re: [sidebar] Tomcat configuration under webApp
 
 On 19/10/2011 19:01, Tim Watts wrote:
  Don't know how this happens but your replies are coming across as
  quoted (i.e. having a   line prefix). Makes it very difficult to
  follow the thread.
 
 That is a *good* thing. Unquoted replies make it very difficult to
 differentiate between who wrote what.
 
 It would be if used properly; unfortunately, Ettore is using it
 improperly, so he's prefixing not only the text being responded to, but
 also his own - the message is largely indecipherable, so I ignore anything
 from him.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 
 


My fault guys, I apologize!

Thanks for your replies.
-- 
View this message in context: 
http://old.nabble.com/Tomcat-configuration-under-webApp-tp32675490p32684576.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Tomcat configuration under webApp

2011-10-18 Thread ettoregia

My system: Tomcat 6.0.18 --- Linux Red Hat 4 -- Java 6

Hi folk,

does anyone of you knows where I can get some materials in order to
understand how Tomcat works with sub-directories within an exploded-war
file?


I clarify the question: I have the below structure and what I don't
understand is why those xml files that are also under /Tomcat/conf/ are put
under such a webApp folder. My understanding is that having them under one
own folder they can be customized for any specific war, am I right?

/tomcat/apps/webAppName{
Catalina catalina.properties  log4j.properties  tomcat-users.xml
catalina.policy  context.xml  server.xmlweb.xml }

I'm asking this because the IT department of the Company where I work as
consultant, is not giving me any write privileges to modify some files,
neither they're allowing me to copy, by myself, a .war file under webApp. 

In the end, with those files I can customize the catalina.properties,
tomcat-users to deploy my webApp from the browser, the context and the
like.. Do you think is this the point?

Probably the qeustion is trivial but I'm on my own and have no one else to
ask.

Thanks in advance,
Ettore.
-- 
View this message in context: 
http://old.nabble.com/Tomcat-configuration-under-webApp-tp32675490p32675490.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat configuration under webApp

2011-10-18 Thread ettoregia



Pid * wrote:
 
 On 18 Oct 2011, at 16:12, ettoregia ettore...@gmail.com wrote:
 

 My system: Tomcat 6.0.18 --- Linux Red Hat 4 -- Java 6

 Hi folk,

 does anyone of you knows where I can get some materials in order to
 understand how Tomcat works with sub-directories within an exploded-war
 file?
 
 http://tomcat.apache.org/ ?
 
 
 I clarify the question: I have the below structure and what I don't
 understand is why those xml files that are also under /Tomcat/conf/ are
 put
 under such a webApp folder. My understanding is that having them under
 one
 own folder they can be customized for any specific war, am I right?

 /tomcat/apps/webAppName{
 Catalina catalina.properties  log4j.properties  tomcat-users.xml
 catalina.policy  context.xml  server.xmlweb.xml }
 
 The above is not a standard file layout and I don't understand what
 the braces mean.
 
 Sorry I meant  /tomcat/apps/myAppName/conf/ and under conf all the files
 mentioned above
 
 What is in the server.xml file?
 
 
 p
 

 I'm asking this because the IT department of the Company where I work as
 consultant, is not giving me any write privileges to modify some files,
 neither they're allowing me to copy, by myself, a .war file under webApp.

 In the end, with those files I can customize the catalina.properties,
 tomcat-users to deploy my webApp from the browser, the context and the
 like.. Do you think is this the point?

 Probably the qeustion is trivial but I'm on my own and have no one else
 to
 ask.

 Thanks in advance,
 Ettore.
 --
 View this message in context:
 http://old.nabble.com/Tomcat-configuration-under-webApp-tp32675490p32675490.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-configuration-under-webApp-tp32675490p32676068.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Configure tomcat using init.d

2011-10-17 Thread ettoregia

Alright guys, thanks for your help.



Pid * wrote:
 
 On 14/10/2011 16:31, Mark Thomas wrote:
 On 14/10/2011 16:15, Mark H. Wood wrote:
 This I can agree with.  They don't allow application managers
 access to Tomcat's config., but anyone can drop stuff into
 /etc/init.d, whence it will run as root?  Really?  Something is not
 right here.
 
 +1  These support guys need firing...
 
 Is it just me, or is the simple privilege escalation attack that this
 makes possible the quickest way to solve this? :) Granted, it isn't
 the best way to solve it but boy would I be tempted in your shoes.
 
 Yes, quite.
 
 
 p
 
 
  
 

-- 
View this message in context: 
http://old.nabble.com/Configure-tomcat-using-init.d-tp32650998p32665384.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Configure tomcat using init.d

2011-10-17 Thread ettoregia

Thanks Hassan for your help.

I found the version (Red Hat 4.1.2-50).

Regarding the the deploy, I know that by storing a file under
Catalina-localhost- myAppName.xml in which I specify the path of the WAR I
would not need to copy WAR under wepApps but Tomcat will do it by itself. Is
that correct?

For the context.xml, shall I create it, since there's no file so called in
META-INF.

Many thanks.


Hassan Schroeder-2 wrote:
 
 On Fri, Oct 14, 2011 at 1:52 AM, ettoregia ettore...@gmail.com wrote:
 
 My system: Linux, the version I'don't know how to realize, since I've got
 just an ssh connection and typing some command I've not been able to
 discover it, maybe you can help me out on this as well.
 
 `cat /proc/version` should give you something useful.
 
 Alright, I need to deploy .war file under tomcat that actually has 4
 engines
 (5.5, 6.0.16, 6.0.18, 7.0), and as I'm used to, I would put under
 /conf/Catalina/localhost, of the engine 6.0.18, a file called
 myAppName.xml to specify the context path of my webApp then I would
 modify
 the server.xml to specify the jdbc connection and the like. As I've no
 rights to modify anything under the tomcat's home the IT guy told me to
 use
 the folder init.d/myAppName in order to use any script at boot time to
 accomplish the configuration above.
 
 Huh? Your app's context path should be taken from the name of the
 WAR file, and the JDBC config should be contained in the WAR file
 in a META-INF/context.xml file.
 
 Nothing else required. Other than an better IT department. :-)
 
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 http://about.me/hassanschroeder
 twitter: @hassan
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Configure-tomcat-using-init.d-tp32650998p32665821.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Configure tomcat using init.d

2011-10-17 Thread ettoregia

I know, but storing the file it's less invasive. At least that suggest the
Tomcat doc.


Hassan Schroeder-2 wrote:
 
 On Mon, Oct 17, 2011 at 3:04 AM, ettoregia ettore...@gmail.com wrote:
 
 Regarding the the deploy, I know that by storing a file under
 Catalina-localhost- myAppName.xml in which I specify the path of the
 WAR I
 would not need to copy WAR under wepApps but Tomcat will do it by itself.
 Is
 that correct?
 
 Sorry, I'm not sure what you're asking. You need to place your WAR
 file *somewhere* to deploy it.
 
 Personally I just put it in the appBase directory, eliminating the step
 you describe above.
 
 For the context.xml, shall I create it, since there's no file so called
 in
 META-INF.
 
 Yes.
 
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 http://about.me/hassanschroeder
 twitter: @hassan
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Configure-tomcat-using-init.d-tp32650998p32667860.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat Manager

2011-10-17 Thread ettoregia



Tim Watts-3 wrote:
 
 On Mon, 2011-10-17 at 08:08 -0700, ettoregia wrote:
 Hi everybody,
 
 I'm using Tomcat 6.0.33 and at localhost:8080 it shows correctly.
 
 Does localhost:8080 it shows correctly mean you can see a process
 listening on it?
 
 Yes it does.
 
 When I try to access the tomcat manager link I get an 404 page error.
 
 
 What URL are you using? Did you enable access (i.e. are you really
 getting a 404 and not a 403)?
 
 Yes is a 404, before there was an error saying that I didn't configure the
 role admin..
 Then It started working fine. After few days I had to delete those files
 under conf/Catalina/localhost.
 Now they're there again.
 
 
 http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Configuring_Manager_Application_Access
 
 
 It says the resource is unavailable, the only row in the
 conf/Catalina/localhost/manager.xml  host-manager.xml is 
 
 ?xml version=1.0 encoding=UTF-8?
 Context antiResourceLocking=false privileged=true useHttpOnly=true
 /
 
 Any ideas on what could be the problem?
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-Manager-tp32667906p32668409.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Configure tomcat using init.d

2011-10-14 Thread ettoregia

Hi guys,

hope you're all doing well.

Today I'm facing a new challenge, at least for myself.

My system: Linux, the version I'don't know how to realize, since I've got
just an ssh connection and typing some command I've not been able to
discover it, maybe you can help me out on this as well.

Tomcat 6.0.18
Java 1.6

Alright, I need to deploy .war file under tomcat that actually has 4 engines
(5.5, 6.0.16, 6.0.18, 7.0), and as I'm used to, I would put under
/conf/Catalina/localhost, of the engine 6.0.18, a file called
myAppName.xml to specify the context path of my webApp then I would modify
the server.xml to specify the jdbc connection and the like. As I've no
rights to modify anything under the tomcat's home the IT guy told me to use
the folder init.d/myAppName in order to use any script at boot time to
accomplish the configuration above.

Here comes the problem. I've checked on the web, but the main use of init.d,
is to make tomcat a linux service using some shell scripting language, but
what about the deploy and jdbc configuration? 
I could not ask the IT guys because we communicate through a ticketing
system and btw they are not so willing to...

Do you have any clue? 

Many thanks in advance guys,
Ettore.
-- 
View this message in context: 
http://old.nabble.com/Configure-tomcat-using-init.d-tp32650998p32650998.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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