Questions tagged [context.xml]

The context.xml file is a web application context descriptor used by the Apache Tomcat servlet container.

199 questions
0
votes
1 answer

Tomcat v7.0 server does'nt read context.xml

As the question says, Tomcat v7.0 doesnt read context.xml. I added to src folder so that its in the class path. But, still not reading it. But, I can run my app if I use Grid Server instead of Tomcat. Am I missing something other than adding…
user3528213
  • 1,415
  • 3
  • 15
  • 18
0
votes
1 answer

Resource element in context.xml throws exception in Tomcat 8

I was using tomcat 7.0.54 and my web application was working as expected. When I switched to tomcat 8.0.22, I couldn't start the application. I got the following in the Tomcat 8 output: org.apache.catalina.deploy.NamingResourcesImpl.cleanUp Failed…
theyuv
  • 1,556
  • 4
  • 26
  • 55
0
votes
1 answer

How to deliver Realm with the war with Tomcat?

we have a simple web application running on Tomcat 7.0.56. Now we want to use our own realm for authentication. public class SpecialAuth extends DataSourceRealm{ @Override public Principal authenticate(String username, String credentials){ …
Marcel
  • 4,054
  • 5
  • 36
  • 50
0
votes
1 answer

How to configure Tomcat7 `server.xml` for non-standard war-file location

I want to have this directory structure for Tomcat7 apps: /var/lib/tomcat7/webapps /foo /current -> /var/lib/tomcat7/webapps/foo/releases/1.1 /releases /1.0 /1.1 /shared ... Where current is a…
Mark Nichols
  • 1,407
  • 2
  • 19
  • 25
0
votes
0 answers

java timer called method twice

Need help on this . Once i setup Timer.schedule the Run method got called twice. can you help please. i am using jdk1.7 and Timer and TimerTask class for this. my code web.xml
Mangesh Kh
  • 13
  • 7
0
votes
0 answers

Session fixation using tomcat7 configuration

My entire application runs on ssl (https). We are using tomcat7 as container. Now in context.xml I have added below configuration and I am expecting after successful login, JSESSIONID will be changed - Valve…
Kartic
  • 2,935
  • 5
  • 22
  • 43
0
votes
1 answer

context.xml for retrieve resources on disc issue Tomcat/Java EE

I'm trying to get some pics from disc I had put the pic as D: | |-images | |-attachments ->testimg.jpg and I'm trying to get this pics using a context file in META-INF on the webapp here is the code
user3260388
  • 313
  • 1
  • 4
  • 10
0
votes
2 answers

How to inject values from context.xml

I'm developing a new web application using Spring MVC with Spring Security 3.1.1 via Spring Tools Suite 3.4. My application is being written in java 1.6, it is authenticating against an Active Directory system, and it will be deployed to a Tomcat 7…
0
votes
0 answers

Tomcat 7 ignore application context.xml

Is it possible to tell Tomcat 7 to ignore datasources defined in application context.xml (located in META-INF). Goal is to necessary define datasources at server level.
Anas
  • 21
  • 1
  • 3
0
votes
1 answer

Tomcat virtual host and context config

I'm having an issue accomplishing something. I currently own a domain and I have the DNS set up to hit Tomcat on 8080 on my local machine when requested in the browser. All good so far. So when it hits Tomcat I get the standard "Cat" page where I…
0
votes
2 answers

Tomcat and Context paths

I created a web application in Netbeans, and it packages the application in a file called "aa-bb.war". When I run the project in netbeans, I can access it at "localhost:8080/aa/bb". This is all good. Moving the .war file into a standard tomcat…
user85116
  • 4,422
  • 7
  • 35
  • 33
0
votes
1 answer

JSP application - global variable list using Context.xml Environment tag

Is it possible to have a variable that is string list via the Context.xml file? For example, I'm currently doing this in my context.xml file: I read…
John Lee
  • 1,357
  • 1
  • 13
  • 26
0
votes
1 answer

How to handle variable number of context parameters with JNDI

I have a web application that needs to be able to read N number of keys (Strings) out of JNDI at runtime: Context ctx = new InitialContext(); String[] values = (String[])ctx.lookup("KEYS"); for(String value : values) { // Do something with the…
user1768830
0
votes
1 answer

How to protect sensitive information inside context.xml?

I just started storing all of my DB credentials in my WAR's context.xml file, and loading them through JNDI. This way, my app can reuse the same credentials in multiple areas, and I can use JNDI to retrieve them (instead of sprinkling the…
user1768830