tomcat

Spring's application context prevents other applications from starting in same servlet container

I have two web applications running in same Servlet container (Tomcat), A and B. These two connect to each other using Spring Remoting. On startup, B needs to call A to open a connection automatically, it's basically a really simple authentication call. However since B is (in my case) loaded before A, B's application context blocks unti...

Create and deploy environment-specific war builds for Tomcat during same build

I want to be able to build a war file and deploy it in multiple environments. I know I can create an ant task to get the environment and either include the files in the war, or replace the tokens as necessary. However, this would lead to as many different war files as environments (dev, QA, DR, prod, etc...). It seems that this would ...

Grails encoding problem Gsp. Help!

I'm with trouble on groovy server pages (gsp) where utf-8 chars are showing not propertly, like "?". But this occur inside grails tags like "${}". Example: <p>Não</p> --> output browser: Não - OK <g:link title="Avaliação Relatório"....> output browser: Avaliaç?o Relat?rio ${value? "Sim" : "Não"} output browser: N?o The gsp already...

Registering a subdomain and mapping urls to it?

Hi, I own the a domain like "www.example.com". How do I setup ownership over "api.example.com"? And I have all my files hosted on a php server (at a hosting provider) and when I login to the file system I can see stuff like: /index.php /help/index.php etc. How do I map stuff like: api.example.com/v1/getAnimalNames.php to a file ...

Accessing XML payload of Metro 2.0 Request/Response Web Service

I am developing a web service, using Metro 2.0 and Tomcat 6, and I have a requirement to be able to log the XML payload of the request and response of a web method for development/support reasons. The payload would only be logged when in debug mode. The Web Service uses a servlet implementation (com.sun.xml.ws.transport.http.servlet.WS...

Integrate War-Plugin for m2eclipse into Eclipse Project

I set up a small web project with JSF and Maven. Now I want to deploy on a Tomcat server. Is there a possibility to automate that like a button in Eclipse that automatically deploys the project to Tomcat? I read about a the Maven War Plugin but I couldn't find a tutorial how to integrate that into my process (eclipse/m2eclipse). Can yo...

How to set the website context path

Hi All, I have uploaded my .WAR file on to the server and deployed it. But now the URL by which it is accessible is http://example.com/myapp/ where myapp, is the name of the WAR file that I uploaded on to the server. I want to know how can I set it to http://example.com/ that is, skip the name of the WAR file in the website...

In Linux, where is the default root directory for log4j.appender.R.File?

Hi all, in windows, when I use the following File path, log4j will write the file to C:\eclipse\logs\appLog.log (I am using eclipse as the IDE in windows): log4j.appender.R.File=logs/appLog.log Then when I deploy the jsp to the apache tomcat in a Linux server, where does the log file go? (I try to avoid using absolute path because I w...

Tomcat Catalina Error logs not showing up on console.

When I deploy my war file in tomcat, the SEVERE errors thrown by Catalina do not show up on console. For example NullPointerExceptions are not shown in the console making life hard sometimes. Instead they are shown in $TOMCAT_HOME/logs/localhost*.log files. What should I do to make these catalina logging information to show on the conso...

Tomcat not responding jersey request

Hi folks, I am facing one problem while writting webservice which will returns json string.I am sending jersey request to tomcat server which is returning json string at first time which is fine but after that if I send another request then it is not responding me.But I can see all the values of json string into logs which I spec...

How to generate histogram of Java object lifetimes

I have a Tomcat Java webapp which is thrashing the Java GC when under load. I think this is due to a combination of a large amount of short lived objects along with an unknown amount of moderately long lived objects. To validate this theory I want to find a tool which will let me determine the object lifetimes for all allocated objects ...

Weblogic 10.3 managed server shared memory object(s)

We are using Oracle Weblogic 10.3 as our application server. We have multiple modules that need to access an Object (contains some HashMaps) that is common for the managed server. This object will be populated via some other process on a daily basis. We do not want to have copies of this in each application, due to the large number of...

Tomcat + Hibernate + JNLP

Hello, I have a small question, I'm trying to build and application that run's on Tomcat 6.0.28. My application is a JNLP that has a swing frame. The deployment works fine, was able to delopy the JNLP in Tomcat and to access it after that from a browser. The JFrame show's up when I execute the JAR. But the problem is that I have a M...

Have Spring DispacherServlet resolve the correct URLmap

On my Tomcat-Spring-Java project I want to have the following URLS /index - to display entry page /login - Login page /cars/ - list the available cars /cars/{id} - show a particular car /cars/{id}/action - do action on this particular car /people/ - list the available people /people/{id} - show a particular person /peopl...

Nice application to track exceptions in Java?

Is there an application or something out there that will track a Tomcat application's exceptions? Basically, I want an easier way of viewing problem areas in my application without having to read a long log file. ...

what is faster to use jsp or servlets for web app

Hi i like to build web application and im trying to think about way to reduce cpu/memory what will be faster for tomcat to use servlets to get the requests and render back the HTML or using jsp ? ...

Tomcat fails to deploy JAX-WS webservice implementation

I'm running Tocmat 6.0.26 with jdk1.6.0_06 and jre6. My webservice uses only odbc14.jar and thats the only library I've included in it. it builds without any error but when i try to deploy it, i get following error: Jul 16, 2010 7:55:45 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initiali...

How can I deploy web app on Tomcat from running app.

I would like to develop updater app. Lets say I've got: - Running Tomcat - Running Updater App on the Tomcat - Running old version of the app on the same Tomcat I would like to - Stop old app - Undeploy old app - Deploy new version of app (lets assume that I've got new app war file somewere in Updater app resourcess. Is it possible to ...

Track down PermGen problem with JRuby on Rails in Tomcat

We're running a small web application written JRuby on Rails running under Tomcat. We're using a Spring back-end that's shared with another production web application. Unfortunately, we keep running into PermGen problems. OS: Ubuntu Linux 2.6.24-24-server #1 SMP x86_64 GNU/Linux Java: 1.6.0_21 Tomcat: 6.0.28 JRuby: 1.5.0 Rails: 2.3.7 W...

PUT Variables Missing between Python and Tomcat

I'm trying to get a PUT request from Python into a servlet in Tomcat. The parameters are missing when I get into Tomcat. The same code is happily working for POST requests, but not for PUT. Here's the client: lConnection = httplib.HTTPConnection('localhost:8080') lHeaders = {"Content-type": "application/x-www-form-urlencoded", ...