tomcat6

use multiple CATALINA_BASE to setup tomcat 6 instances on windows

对着背影说爱祢 提交于 2019-11-26 22:33:48
问题 The RUNNING.txt that comes with tomcat distribution indicates the use of CATALINA_BASE variable to enable multiple tomcat instance. But how can I set the CATALINA_BASE environment variable for each tomcat instance directory? 回答1: Having multiple Tomcat instances on your development machine is great. Here's how I usually do it for Windows (the important parts for setup are in steps 2, 3, 4 and 5): Install a copy of Tomcat 6 to a directory (like C:\apache-tomcat-6.0.20 ). Copy the conf

How to run Spring 3.0 PetClinic in tomcat with Hibernate backed JPA

孤人 提交于 2019-11-26 21:38:52
问题 OK, this probably is supposed to be the easiest thing in the world, but I've been trying for the entire day, and it's still not working.. Any help is highly appreciated! EDIT: For the correct procedure, please see Pascal's answer. My wrong (since I did not disabled LoadTimeWeaving) procedure is left for reference..: What I did: Downloaded Tomcat 6.0.26 & Spring 3.0.1 Downloaded PetClinic from https://src.springframework.org/svn/spring-samples/petclinic Built & deployed petclinic.war. Ran fine

Using EL 2.2 with Tomcat 6.0.24

只愿长相守 提交于 2019-11-26 19:45:45
问题 With JSF 2 you should be able to do this: <h:commandButton action="#{myBean.myAction(myParameter)}"/> which would then call the action method, passing in the parameter (assume it's an Integer): @ManagedBean @SessionScoped public class MyBean { ... public String myAction(Integer myParameter) { // do something return null; } ... } This works on Glassfish v3 perfectly. However not on Tomcat, you get an ELException notifying of the parse error Caused by: javax.el.ELException: Error Parsing: ...

Define Servlet Context in WAR-File

╄→гoц情女王★ 提交于 2019-11-26 18:19:05
问题 How can I tell e.g. Tomcat to use a specific context path when given my WAR-File? Example: I have a war file created by maven build and the resulting name of the file is rather long. So I do not want the tomcat manager application to use the filename of the war as the context. Supplying a context.xml in META-INF did not produce the desired results I also found this in the documentation for the path attribute of Context : The value of this field must not be set except when statically defining

Java: using endpoint to publish webservice to tomcat server

泪湿孤枕 提交于 2019-11-26 18:09:53
问题 i am creating a simple SOAP web service. i am to ensure that it runs on a tomcat web service. im trying to implement this with JAX-WS (see code) my question is: does the Endpoint.publish use the tomcat server to host this or is it a mini glassfish kind of server? should i be extending UnicastRemoveObject or something similiar instead? ideally it would be able to be packaged into a .WAR and dropped in the directory and just work. It doesn't seem to work with my installed tomcat server as is

AbstractMethodError on deploying Spring 4.0 in Tomcat 6

大兔子大兔子 提交于 2019-11-26 17:41:57
问题 I am getting below exception on deploying Spring 4.0.1 app in Tomcat 6.0.37: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean#0': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.internal

Shutdown ExecutorService gracefully in webapp?

与世无争的帅哥 提交于 2019-11-26 16:27:10
问题 In my webapp, I created a service that is using an ExecutorService with fixed size ThreadPool. I reuse the same ExecutorService during the whole application lifetime. private static ExecutorService pool = Executors.newFixedThreadPool(8); All is running in Tomcat which gives me the following error while shuting down: appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. I do realize I need to shutdown the

Deploying war file to Tomcat with a different path

旧巷老猫 提交于 2019-11-26 15:48:41
问题 If I deploy a war file to Tomcat, called for example foo-bar-1.1.2.war , how can I deploy it so that it is extracted to webapps/bar and its URL root is /bar/... ? My intention here is to keep the war file in the webapps server with its version information so that I know which version is installed but have it overwrite a previous version of the app. I could deploy the war file using PSI Probe. This would allow me to specify a target context for the web app. However, it means that I would lose

Why are my JSP changes are not reflected without restarting Tomcat?

a 夏天 提交于 2019-11-26 15:48:13
问题 I am editing JSP files which are residing directly inside tomcat/webapps/myapp/WEB-INF , but to see the changes, I have to restart the server. As far as I know, JSP changes don't require you to restart the server. The only configuration I found which is related to automatic reloading is reloadable = "true" Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. I used this

How to set level logging to DEBUG in Tomcat?

北战南征 提交于 2019-11-26 15:30:02
问题 I would like to set level logging to DEBUG in tomcat but in console nevertheless only INFO and WARN output. Could anybody tell me what's wrong? My C:\tomcat\logging.properties: # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional DEBUGrmation regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use