FAQ Database Discussion Community


Using client certificate with Apache Axis 1

web-services,tomcat,axis,client-certificates
Prerequisites Apache Tomcat 7 Spring 3.2.11.RELEASE Apache Camel 2.14.1 Apache Axis 1 (1.4) Keystore including client certificate (private key, public key etc.): my_keystore.p12 Question I am trying to access a remote rpc/encoded werbservice using Apache Axis 1. It is neccessary to use Apache Axis 1 because of rpc/encoded style of...

error has occured when running

spring,spring-mvc,tomcat
I have developed a spring mvc project as below link mentions but getting the below error when running. I am new to spring mvc. I followed all the instructions are given in this tutorial. http://www.dzone.com/tutorials/java/spring/spring-mvc-tutorial-1.html Error occurs when starting the container (Tomcat) java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/testspring]] at...

Eclipse & Tomcat - Class loading

java,eclipse,tomcat,tomcat7,eclipse-luna
I have recently migrated a Java Client project to a Java Server project, using Tomcat, I have found that project library dependencies may be broken. Ordinarily I include the Libraries into the Java Build Path via the Eclipse menu option. I store the Libraries in the project \lib folder. When...

Configure APR connector in Spring Tool Suite/Eclipse

eclipse,tomcat,spring-tool-suite,apr
I want to configure APR connector in Spring Tool Suite's tomcat in linux(CentOS7). Using apr 1.5.2, tomcat-native 1.1.33, Spring Tool Suite 3.6.2, tomcat 7.0.57. Followed this tutorial and installed apr and tomcat-native libraries. Then based on this question, configured the jdk path to eclipse tomcat's configuration arguments. Now when i...

Trying to setup tomcat to use servlets

java,tomcat,servlets,invokerequired
I'm following instructions found in Java All in one for Dummies 3rd edition I downloaded tomcat and followed all the steps for setting it up, step 6 says. "Modify the web.xml file to enable the invoker servlet" It says to find the lines of code for the invoker and then...

Tomcat support for HTTP/2.0?

tomcat,https,tomcat7,tomcat8,http2
Does anyone know what is the lowest version of Tomcat that supports HTTP/2.0? I've been looking everywhere on their site and I cannot find any details regarding this.

AOP (without Spring) not working on Tomcat but Eclipse

java,tomcat,aop,aspectj
Implemented AOP using AspectJ without Spring. It works perfectly fine when running in Eclipse (Tomcat server) but not when run directly in Tomcat. Have added required dependencies in the pom but of no use. Not able to figure out the issue. Aspect class: @Aspect public class FeatureAOP { private static...

Get authorisation token after HttpServletRequest.login()

java,tomcat,servlet-3.0,websphere-8
In our webapplication we need to store the authentication token (LtpaToken2 (websphere), JSESSIONID(tomcat)) in an external datastore after a successful login. I was hoping to retrieve the token after a login on the HttpServletRequest object. LOG.debug("nr of cookies in request " + request.getCookies().length + " response header " + response.getHeaderNames().size());...

Tomcat servlet the requested resource is unavailable

java,tomcat,servlets
I am very unfamiliar w/ servlets and have been asked to write a simple a simple program on tomcat 7 using java. I wrote a very simple hello world program and haven't been able to get it running and need some help. import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;...

Spring boot war file deploy on Tomcat

tomcat,deployment,spring-boot,war
I use Spring Boot 1.2.4.RELEASE with gs-rest-service source file. I got: 127.0.0.1 - - [18/Jun/2015:09:59:25 +0300] "GET /gs-rest-service-0.1.0/ HTTP/1.1" 404 1021 There are no other exceptions in Tomcat logs. I have read related questions, but my test doesn't run. Spring Boot War deployed to Tomcat I have read howto-create-a-deployable-war and...

Jersey Viewable resulting in 404

java,spring,jsp,tomcat,jersey
I am attempting to create a RESTful web service in Java using Jersey and Tomcat. The problem I am having is that after authenticating a user, I try to return a Response with a Viewable containing the path to my file and I receive a 404 resource not found error....

Tomcat failing to startup

java,tomcat,java-8,java-7
A few days ago when I turned the computer on, I tried to start up tomcat and got a surprise for the first time since I deal with software development. The exact error message is: Using CATALINA_BASE: "C:\apache-tomcat-8.0.9" Using CATALINA_HOME: "C:\apache-tomcat-8.0.9" Using CATALINA_TMPDIR: "C:\apache-tomcat-8.0.9\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_45" Using CLASSPATH:...

How do I password protect an HTTP Get Request on my Apache Tomcat server?

java,apache,http,tomcat,servlets
I want to send a user some data only if they correctly supply the username and password in the header of their HTTP request. I tried doing this via the HttpServletReqest login() method, but it hasn't worked. this is my server's doGet method: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws...

Log runtime exceptions using log4j in JSF web application

jsf,tomcat,log4j
I want to log all unhadled exceptions in my JSF web application using log4j. I read this post Log runtime Exceptions in Java using log4j and add a class that implements Thread.UncaughtExceptionHandler. but the method is not fired. Any sugestion please ? Web Server : Tomcat 8.0...

Run tomcat application from any subdomain, subfolder or ROOT

java,url,tomcat,path
I'm new to java web development so bear with me. I have created a application which runs on localhost:8080. The application uses a simpel MVC setup (controller servlet forwards request to jsp page). If I deploy my application to a remote server in a subfolder (www.myserver.com/myapplication) the application does not...

Tomcat SSL Cert Renewal Issue (SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure)

java,apache,tomcat,ssl,https
Attemping to renew a certificate that expired earlier this month and I can't seem to get it to work. Apache Tomcat 7.0.34 Centos Java 1.7.0_65 (Root Cert) I've tried Both gdroot-g2_cross.crt (Java Root) And gdroot-g2.crt seperately and neither worked (intermed Cert) gdig2.crt (tomcat Cert) The one I was given by...

How to get some utf-8 characters using hibernate and spring mvc in database?

java,spring,hibernate,spring-mvc,tomcat
I have developed small server program. When I extract tuple from database, some characters become ÇѱÛÃàÁ¦. I modify server.xml. However ÇѱÛÃàÁ¦ characters still appear. Help me. How can I get correct characters? This is my server.xml. (I use apache tomcat 7.0 server.) <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache...

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver [Eclipse, Tomcat]

java,mysql,eclipse,tomcat,jdbc
I know that's an over-asked question, but still I can't get this thing right. I'm running a web application on Eclipse who has to interact with a mysql database. It all runs on a tomcat 7.0.27 server on localhost. As much as I try to add my my mysql-connector-java-5.1.21-bin.jar to...

solrException. XML parser doesn't support XInclude option

xml,tomcat,solr,lucene,xinclude
After configuring solr4.7.2 with tomcat 7, got the error in solrAdmin page stating SolrCore Initialization Failures fran92:org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: XML parser doesn't support XInclude option My solr.xml file contains one core <?xml version="1.0" encoding="UTF-8" ?> <solr persistent="true"> <cores host="${host:}" adminPath="/admin/cores" hostContext="${hostContext:solr}"> <core config="solrconfig.xml" name="fran92" instanceDir="generic" schema="schema.xml"...

Deploye two wars with different domain name but same context-path in same jboss-4.0.3

tomcat,jboss,web-deployment,contextpath
I've two web application wars STORE_ABC.war and STORE_DEF.war and single JBoss server running on my machine. I want to deploye both war with same context path in my jboss as follows. http://localhost:8080/home For STORE_ABC.war http://testsite1:8080/home For STORE_DEF.war jboss-web.xml for STORE_ABC.war and STORE_DEF.war <jboss-web> <context-root>/</context-root> </jboss-web> How could I achieve above...

Unable to load bean using Struts convention plugin

java,maven,tomcat,struts2,struts2-convention-plugin
I want to use annotation based config instead of xml based. Struts has convention plugin to do this kind of thing. So I removed struts.xml file in main/resources, added this plugin as dependency, put some annotations on actions and tried to run my project on a server (Tomcat 7). When...

How are JSP/Servlet's executed in a Java-Capable webserver? [closed]

java,jsp,tomcat,java-ee,servlets
I'm playing with writing a Java-capable webserver. How do you get from your WAR/JSP to executable Java code? I've figured at this point FCGI is not available(I do have a client impl). What kind of mechanisms or specs are here? Are there any standards?

Is Tomcat backward compatible?

java,apache,tomcat,servlets
I have few .WAR files that run on a tomcat 5.5 instance. So probably they would be Servlet Specification 2.3 or something not sure. And I also have a new .WAR that is built with Servlet Spec 3.0 and needs tomcat7. So my question is.. Can I deploy the old...

Issue in deploying restlet based application on tomcat

tomcat,deployment,restlet
I am having issue in deploying restlet application on tomcat webserver. I am able to run the application directly from eclipse but when I deploy on tomcat I get issues like the following. May 10, 2015 10:04:32 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped...

Application root path

java,jsp,spring-mvc,tomcat,servlets
I am trying to find the application root path with the following code on my local machine(Deployed in tomcat 6) . ${pageContext.servletContext.contextPath} At local system it return "/ProjectName" eg:- "/Hello". But when i put the same code in a remote server where my application is deployed in production mode it...

How to use two port numbers for a single java web application?

java,eclipse,tomcat,servlets,port
I am working in a java web project in Eclipse IDE. project is working fine and we use Apache tomcat 7 as server. Now to access the application we use the URL as localhost:8080/APPNAME/. It works fine. In my project there is a servlet, that will request by other java...

user.dir is incorrect while using tomcat web app in eclipse

java,eclipse,tomcat,path,relative-path
I have a configuration project that few projects are using it. All of my project under the same workingspace. workingspace/configuration workingspace/webapp1 workingspace/mongoDB workingspace/model mongoDB and the model project are using the configuration jar project and able to read the xml files using relative path ../configuration/conf/....xml when using the System.out.println("Working Directory...

access tomcat deployed application (aws) by domain name (www.mydomain.com)

tomcat,amazon-ec2,dns,ip
I am new to aws hosting, please help me out in pointing the domain name to tomcat hosted application. During configuration following steps are taken- 1- I have created ec2 ubuntu instance. Configured with java, tomcat. Deployed my war files on tomcat. I am able to access the application successfully....

Is there a way to cluster different machines running Tomcat instances

tomcat,amazon-ec2
I have setup multiple tomcat instances in a single machine to launch more threads, however, if I have to make use of 10 EC2 instances with Tomcat installed as a cluster, how would I achieve this. Any good resources to look at?

Editing Folder content in tomcat manually?

java,html,apache,tomcat,war
I have a WAR file called ROOT.war where I uploaded into Tomcat few days back. There I have few "public" HTML pages like index.html, about.html etc. These pages has no connection with the programatic part of the application, instead containing a link for login.jsp. Now, I need to change the...

Remote debugging tomcat with OpenShift

eclipse,tomcat,openshift,remote-debugging
I am using openshift for my tomcat webapp. I am able to run the app but unable to debug it. As openshift starts tomcat in debug mode, I was expecting I'll be able to debug. Host: $OPENSHIFT_JBOSSEWS_IP Value of this is 127.5.20.129 for me which I got from command: rhc...

Tomcat 7.0 + Chrome dont show JSON

java,json,rest,tomcat,jersey
Iam using Dynamic Web Project 2.5, Jersey and Tomcat 7.0 to create a Java Restful Webservice. I want to response JSON if someone request data. But i always get the following error from Tomcat: That my configurations in relation to web.xml and annotations are ok is demonstrated by using xml...

Intellij web application on tomcat server shows http://localhost:8080/index.jsp instead of http://localhost:8080/myapp/index.jsp

java,jsp,tomcat,servlets,intellij-idea
I'm following a tutorial on udemy. In the tutorial he is using eclipse. But i'm following the course with intellij. Every thing works fine but one thing i keep noticing is that when he runs the servlets or jsp pages it is always shows the project name before the servlet(http://localhost:8080/myapp/index.jsp)....

Spring : How to configure tomcat Datasource Programatically in Groovy DAO

java,spring,spring-mvc,tomcat,groovy
I have my tomcat datasource configured in XML as below: <bean id="docDataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close" p:driverClassName="${doc.database.driver}" p:url="${doc.database.url}" p:username="${doc.database.user}" p:password="${doc.database.password}" p:validationQuery="select 1" p:testOnBorrow="true" p:minIdle="2" p:maxIdle="4" p:maxActive="6" p:defaultTransactionIsolation="1"> </bean> And my customDAO(groovy class) uses the above datasource as below import...

Express.js server with Apache Tomcat

node.js,tomcat,express
I am making a sample web application in node.js using express.js. I am getting a little confused when using apache-tomcat as my web server. I have two doubts: When i run apache-tomcat as a web server and my express.js server is providing me services at port number 4000, how does...

Wildcard with Service Stop/Start

batch-file,tomcat,kill
I know we could do this in VBS, PowerShell, etc. However, we do not want to do this with another language other than good ol' batch script. Have figured out the following: TASKKILL /F /IM "tomcat*" And this will forcibly kill/stop any persistent instances of Tomcat. Also, this would cover...

SSL Implementation using java keytool

java,tomcat,ssl
I got my keystore file of jks type using keytool commands. now i need to get a self signed certificate to test at development. I am unable to understand how to generate certificate i tried by using keytool commands but i am getting exceptions like "illegal option, file not found"...

Getting 404 error with Jersey Tomcat service

java,web-services,rest,tomcat,jersey
I am getting a 404 page when trying to run a RESTful service in Java with Jersey and Tomcat. Here is my project: Here is the HelloWorld.java: package service; import javax.ws.rs.*; @Path("/hello") public class HelloWorld { @GET @Produces("text/plain") public String get() { return "Hello World"; } } Here is the...

Alternative of JTATransaction

spring,tomcat,java-ee,jta
I have an Spring based J2EE application which runs well on Weblogic, I wanted to move it to Tomcat. It seems tomcat doesn't support JTA Transaction Manager without external jar help like Atomikos, JOTM, Bitronix, SimpleJTA. I am reluctant to make changes into my application where i am already using...

Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

java,mysql,spring,hibernate,tomcat
I have an application that uses the Spring Repository framework and a MySQL database. I currently have it deployed on Tomcat 7. Once I deploy and attempt to log into the application (the first call to the database) I receive the following exception: SEVERE: Exception sending context initialized event to...

Get the currently used protocol name from HttpServletRequest?

java,spring,tomcat
I'm constructing a new URL in a Spring MVC controller, to be passed back to the client. Currently I'm trying this: // httpRequest is the current HttpServletRequest new URL(httpRequest.getProtocol(), httpRequest.getServerName(), httpRequest.getServerPort(), httpRequest.getContextPath().concat("/foo/bar.html")); Problem is that httpRequest.getProtocol() gives me "HTTP/1.1" instead of just "HTTP". I can trim it but wondered if...

How can i address this---> Error HTTP Status 404 on my Code below

java,html,xml,tomcat
So i'm trying to display info in the web using servlets and i am stuck, I have tried searching and researching but with vain, i have found no help.I was wondering could it be an issues with the server? It keeps giving me this error HTTP Status 404 when i...

Spring Boot War file gets 404 on ec2

tomcat,amazon-ec2,spring-boot,.war
I put together a simple Eclipse Spring Boot Rest program. Just a couple of endpoints that return some stings. I am building it with the Eclipse Gradle plug-in. No problems, it runs fine in the Eclipse provided Tomcat instance. I also ran it on a native windows Tomcat. I deployed...

POST to Jersey REST service getting error 415 Unsupported Media Type

java,json,rest,tomcat,jersey
I am using a JAX-RS web application with Jersey and Tomcat. Get requests are fine however when I try to post JSON I get an HTTP status 415 - Unsupported Media Type. Here is my simple HelloWorld.java: package service; import javax.ws.rs.*; @Path("hello") public class HelloWorld { @GET @Produces("text/plain") public String...

CORS Request Error Tomcat 7 & Java Servlet

java,tomcat,servlets
I somehow can't get this to work. I have a Java Servlet running on a Tomcat 7 Server (running on localhost:8080) and I want to make a PUT-Request from a different Webservice (running on localhost:80). I have added the CORS-Accept-Header in the Servlet-Code as well as in the Tomcat Configuration,...

Tomcat, enable DELETE method

tomcat,tomcat7,http-delete
This question is asked before How to make Apache Tomcat accept DELETE method, but the solution it provides doesn't work for me. I've added <init-param> <param-name>readonly</param-name> <param-value>false</param-value> </init-param> to web.xml and my <servlet> setting looks like this: <servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <init-param> <param-name>debug</param-name>...

How to use a local tomcat version with maven

java,maven,tomcat
This may have been asked before (if it is please link me), but when I search I'm finding a bunch of how to run maven on tomcat, how to hook up an IDE to do this (nearly all of them are ide / configuration questions), how to use maven plugin...

Set locale for JSTL in Tomcat JVM arguments for testing?

java,tomcat,intellij-idea,jstl
I am trying to test localization of date formats in a web app. I am running a Tomcat 7 webserver, with the JSTL argument <fmt:setLocale value="${pageContext.request.locale.language}_${pageContext.request.locale.country}" /> on the page to set the date format. I am running the local server from Intellij, with the JVM arguments of -Duser.language=en -Duser.region=GB...

how can i find which application is causing memory leaks

java,tomcat,memory-leaks,heap
I am running Tomcat-6.0.32 on the RHEL 5.4 with JDK-1.6.0_23 version. I am running almost more than 15 applications. Applications are small applications only. My RAM is 8GB and swap is 12GB. I set the heap size from 512Mb to 4GB. The issue is after a few hours or days...

Tomcat not deploying new version of files at all - linux / eclipse

linux,eclipse,tomcat
I am having issue with the way tomcat deploys my files to the server. I have installed Tomcat 7 to /opt/tomcat7. In my eclipse i have specified this path as my tomcat server. my workspace directory is /home/maciej/workspace/<projects here> now if I edit a class file and i add simply...

Netbeans project deployment failure

java,tomcat,netbeans,localhost
server.xml <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084" protocol="HTTP/1.1" redirectPort="8443"/> Whenever, I'm trying to run my project then, it is redirecting it to my lan ip address resulting deployment failure. Please see below. Server Log The system cannot find the file specified. The system cannot find the file specified. Using CATALINA_BASE: "C:\Users\xxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base" Using...

Grails web-app image directory is not working properly in war

tomcat,grails,debian,grails-2.0
I am working with Grails 2.4.2. I am saving images to a directory named gameImage under web-app folder. It's working perfectly in development mode. But when I run the war on localhost in the xampp server then in the view image is not showing but saving in the directory. Here...

Linkage Error in Tomcat when 2 webapp instances load lucene classes

java,tomcat,lucene,jvm,java.lang.linkageerror
I'm running a tomcat 8 container with 2 different webapps, 1 prod and 1 sandbox. All the classes/libs and compilation is the same with just some minor differences in the config parameters. I'm using lucene core 4.10.4 (via hibernate search). Both apps startup just fine, now after startup if I...

What is difference between Tomcat and TomEE, TomEE and TomEE Plus

tomcat,server,tomee
I want to deploy EJB ear in a server so I really confused about choosing a server out of tomcat, TomEE and TomEE Plus. What is difference between Tomcat vs TomEE? What are new in TomEE and TomEE Plus? In Which case we have to go for TomEE and TomEE...

Tomcat server is getting started but displaying only blank page when I open it

java,tomcat,servlets
I am not using any IDE with servlets. Tomcat server is getting started but when I open it, it only displays a blank page and nothing else.

OutOfMemoryError on tomcat7

java,jsp,tomcat,memory
I am developing a web-app which takes a zip file, uploaded by the user, unzips it on the server, and process the files. It works like a charm when the zip file is not too large (20-25MB) but if the file is about or over (50MB), it produces the OutOfMemoryError....

Multitenented Parallel Processing

java,multithreading,tomcat,parallel-processing,threadpool
I have a tomcat server with a handful of fairly long-running operations that I feel could be greatly sped up if broken up and processed in parallel. What is the best practice as far as this is concerned? I am concerned that if I just create some threadpool that is...

Service not starting using Spring-boot during integration tests

tomcat,spring-boot,rest-assured
I am writting my tests useing rest-assured and spring-boot. @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = ApplicationSErvice.class) @WebAppConfiguration @IntegrationTest("server.port:0")//dynamically pick up ports public class MyTestClass{ @Value("${local.server.port}") int port; @Before public void setup(){ RestAssured.port=port; } @Test public void testMethod(){ //asserting } In the log I see it says starting Tomcat on port and STarting service...

How to prevent JSF from initializing automatically?

jsf,tomcat,mojarra
When I create a web application from scratch and add jsf-api-2.2.11.jar and jsf-impl-2.2.11.jar to pom.xml (add them to apps classpath) and deploy it to Tomcat 7, JSf is initializing automatically: INFO [j.e.r.w.j.config] - Mojarra 2.2.11 ( 20150505-0732 https:[email protected]) ..... initialized. In older versions I used to start it declarativly by...

java.io.IOException: Permission denied while creating new file from Tomcat in Grails

tomcat,grails
I have a Grails application deployed on Tomcat 7. Here is my code fragment which tries to create a new file: def path = "/var/csvs" + file.fileItem.fileName def fileInputStream = file.inputStream File f = new File(path) if (!f.exists()) { f.createNewFile() } I get this exception: Permission denied. Stacktrace follows: java.io.IOException:...

Whenever I try to run Tomcat with Jersey, it refuses to load

java,rest,tomcat,jersey
Basically I am trying to create a simple Hello World program using Rational Software Architect. To create the server I use Tomcat and Jersey. I found that when I create the server without putting the jersey jar files into WEB-INF/lib but rather I create a custom user library with all...

Docker image builds, but doesn't run

java,tomcat,docker,tomcat6,libreplan
I am trying to create a docker build for libreplan, using the install instructions here. The dockerfile is FROM tomcat:6 RUN apt-get -yq update && apt-get -yq install \ cutycapt \ patch \ postgresql-client \ libpg-java \ xvfb # Prepare webapp location RUN mkdir -p /usr/local/tomcat/webapps/libreplan # Get WAR file...

TomEE starts but Netbeans gives “Failed to start” error

java,tomcat,netbeans,tomee
I'm using NetBeans 8.0.2 (also, tried it in the latest nightly build) and trying to start TomEE Plume server on port 8084 (tried it on different port too). Server starts and works fine, but NetBeans thinks it is not started and after approximately 2 minutes of waiting ("Waiting for Tomcat")...

Idea 14 - Maven 3 - pass parameters

java,maven,tomcat,intellij-idea
I am looking for most efficient way to pass parameters to maven through idea 14 (I have just started working with idea). When I want to compile and deploy my application through maven itself, I just run this command mvn clean package tomcat7:redeploy -P localhost -Daugage_env=local. I dont know, how...

How do I publish my own typed WSDL?

java,web-services,tomcat,wsdl,jax-ws
I'm building a web service and deploying it on Tomcat. I already have a wsdl for it, which I'd like to publish, and I've tried specifying with the wsdlLocation attribute of the WebServiceProvider annotation, but Tomcat(?) just generates its own. EDIT: No, It just throws exceptions, it was generating its...

how to uninstall tomcat from AWS linux?

linux,tomcat,amazon-web-services
What is the equivalent of sudo yum install tomcat7 tomcat7-webapps but for uninstalling tomcat7? Is there a straight forward method and that leaves no trace behind?

Tomcat 7 PermGen Space or Failed to Create JVM

java,eclipse,tomcat,tomcat7,permgen
I'm currently searching for any help about this. I'm trying to start a Tomcat 7 server, but I only get PermGen Space exception. I tried to change the XXMaxPermSize value, but when I change it, I get a Pop Up at launch of my Eclipse : "Failed to Create the...

Use JSF, JPA, JTA, JAAS, CDI, Bean Validation with Tomcat? [closed]

jsf,tomcat,jpa,cdi,jta
Is it possible to use the following APIs with tomcat (as a lightweight server): JSF, JPA, JTA, JAAS, CDI, Bean Validation. ...

Tomcat - redirect old context root to new context root

java,tomcat,servlets,contextroot
We want to change the context root of a Tomcat web appplication and have the old URL guide users to the newly named application. http://hostname/oldappname http://hostname/newappname One way to do this would be deploy the application with a context root of newappname and another application with a context root of...

Openshift context path

java,tomcat,openshift,war
I have deployed the war into tomcat 7 Openshift . Everything is fine and its running .Myappp Here is my mapped web application. I am storing images in the dir webapps->docs->images But When I upload the image (with UI) it doesnt appear on site and I cant even find where...

CAS Redirect Loop

java,tomcat,single-sign-on,cas
I am trying to get the CAS setup up and running and I am pretty new to this. I am following through the standard steps similar to this video. I have created keystore file Created a certificate Imported it successfully and add to cacerts file I have made the necessary...

Tomcat filter not being invoked for Atmosphere servlet

java,tomcat,servlets,servlet-filters,atmosphere
I'm using Atmosphere 1.0.15 to handle push notifications under Tomcat and it's been been working fine for a few years now. Recently I added a simple filter to my Tomcat as a test, which (currently) just logs the incoming URL and continues. The problem is it the filter appears to...

how to manage multiple war application in tomcat server?

java,maven,tomcat,servlets
I use tomcat as web server,I want to deploy many same war file in tomcat server with different config. How to do this in the best way possible manner? So I want to run tomcat server per each war application, my means is tomcat1 handle the .war1 in webapp and...

Disable direct access to application via Tomcat

apache,tomcat
I have a small local (internal to organisation) browser application running on Tomcat. I have inherited an application (also for internal organisation use only) running under PHP server which I have been asked to get running on the same box. I decided the best thing was to get both Tomcat...

Placing secure data in Java web application

java,security,tomcat
The question is about security in tomcat, but first consider the following example: Suppose you have apache web server. Then, under www folder, create folder named dist, and under folder dist create folder named bdf23b1c-ddd3-4d5b-8fdf-948693674011. Under this folder create some file with secure information. For example, some private picture you...

How to Setup a Docker Tomcat Container on Mac OS X

osx,tomcat,docker
I'm new to Docker... From my understanding, Docker is only compatible with Linux, is it possible to run docker for development purposes on a Mac? I installed virtualbox using homebrew and have tried to create a virtualbox instance. I installed docker, but am having trouble getting my mac to communicate...

Included CDI-enabled Servlet Fails with ContextNotActiveException: WELD-001303:

java,tomcat,servlets,cdi,weld
I am writing a CDI application that runs on Tomcat. I am using Tomcat 7.0.62 with Weld 2.2.12.Final as the CDI implementation. I am using CDI without JSF. The application consists of a dispatcher servlet that is not CDI enabled. The dispatcher includes the output of a CDI enabled servlet...

Tomcat6 memory allocation with Apache2

apache,tomcat,ubuntu,memory,tomcat6
I have fronted Tomcat6 with Apache2. On an Ubuntu instance I have Apache2 running with 8GB RAM, so decided to have following apache2.conf configurations. <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 550 ServerLimit 550 MaxRequestsPerChild 0 </IfModule> Above configuration was done using below parameters and this blog post(how...

Where is root directory in Tomcat web application?

jsp,tomcat,tomcat8
I have a web application using Tomcat whose index.jsp needs to read some data from a textfile. However, I'm not quite sure as to where the root directory is. Can anybody give me any insight, material, and/or solutions as to where this directory is and how it is decided that...

Infinite load on tomcat server webapp startup

java,tomcat,tooltwist
I encountered a weird error when I upgraded from ToolTwist 8.1 to ToolTwist 8.5. The error is infinite load on tomcat server webapp startup. I think there is no error on loading the configurations because I am seeing the Tooltwist Startup Commencing on the console which means the tooltwist libraries...

Meaning of connectionTimeout in tomcat

java,eclipse,tomcat
What does that parameter mean for tomcat. It was declared in server.xml as follows: <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> So, I tried to change it <Connector connectionTimeout="2" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> and didn't notice any effect. I expected that each page the load takes for more than 2 milliseconds would produce...

Fowarding from Apache to Tomcat breaks Grails rest api calls

apache,rest,tomcat,grails
Here is my setup: Apache virtual host listens on port 80, redirects to Tomcat at localhost:8080/webapp. Here is my virtual host settings: <VirtualHost xxx> ServerAdmin xxx DocumentRoot "xxx" ServerName xxx ProxyRequests Off ProxyPass /webapp http://localhost:8080/webapp ProxyPassReverse /webapp http://localhost:8080/webapp RedirectMatch (.*) xxx/webapp <Location "/"> # Configurations specific to this location. Add...

How to configure Servlet on Tomcat Server and fix javax.naming.NameNotFoundException?

java,tomcat,servlets,web.xml,catalina
Recently I deployed an app to Tomcat Server. It's not working because the app can't find the Servlet. I thought the servlet-class in web.xml was okay but apparently the syntax/mapping is wrong since they cant find it... web.xml <servlet> <servlet-name>ControllerServlet</servlet-name> <servlet-class>controller.ControllerServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> catalina.log INFO myapp.com-startStop-2 org.apache.catalina.startup.HostConfig - Deployment of...

How to deploy a spring boot MVC application in traditional tomcat webapps folder?

java,spring-mvc,tomcat,spring-boot
I created a simple spring mvc application following a springboot springmvc with gradle example. Below is the structure. src/main/java - This is where all the code base is there. src/main/resources - This is where all the resources/templates are there. import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static...

Java Restful Service eclipse tomcat HTTP Error 404

java,rest,tomcat,jersey,jersey-2.0
i try to keep up with a java rest service. So i found some tutorials, which explain always the same way. But i cant get this running :(. I made Dynamic Web Project in Version 2.5 and Tomcat 7.0 in eclipse. Then i load following jars to WEB-INF/lib My Projectname...

Tomcat 7 not started in jax-ws

java,eclipse,apache,tomcat
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42 Jun 10, 2015 3:39:19 PM org.apache.catalina.core.ContainerBase startInternal SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/NewOpac]] at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at...

Cannot find a package in yum repo list

tomcat,centos,yum
I'm looking for tomcat-native (Centos 6) $sudo yum install tomcat-native No package tomcat-native available. Error: Nothing to do How do I update the yum repository list?...

How to make a redirect in velocity template?

apache,tomcat,velocity
How to redirect to http://google.com in the code .vm file? (I mean within #if <redirect to Google here> #else ... #end statement) Doing setRequestURI('http://google.com') or similar doesn't work and I'm not sure if it is possible at all. Thank you. Can anybody explain please?...

How to shutdown a Tomcat's instance that wont shutdown? [duplicate]

java,tomcat,netbeans,tomee
This question already has an answer here: TomEE starts but Netbeans gives “Failed to start” error 3 answers I'm trying to use a new installation of TomEE as a local server in Netbeans but there's another instance of Tomcat that will never shutdown no matter how many times I...

How to pass deployment dependant parameters to webapp

java,tomcat,servlets,parameter-passing,servlet-container
In projects I work(ed) on, deployment parameters - such as storage path or DB login - are usually given through a parameter file, which is stored in the war file. I find that unsuitable because those values needs to be changed each time the webapp is packaged for a different...

Tomcat v7.0 Server at localhost failed to start (Only with specific WebApp)

java,tomcat,tomcat7
I get the above error when I'm trying to start the server. Important note, for any other Web Apps the server starts just fine. It's just this particular Web App that does not work. Here is the complete stack trace: SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed...

Issue after upgrading from Tomcat 6 to Tomcat 8

java,tomcat,servlets,tomcat8
I have a j2ee application with a web.xml having a default servlet to handle all requests. <servlet> <servlet-name>controller</servlet-name> <servlet-class>gr.comp.pjx.controller.FrontController</servlet-class> </servlet> <servlet-mapping> <servlet-name>controller</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> The strange behavior is when the application's context is loaded. So, when netbeans loads http://localhost:8080/my_application/ I see that my...

Why do some servers run both Tomcat and also Apache Web Server?

java,apache,web-services,tomcat
Tomcat is used for running Java servlets, but it also has the webserver functionality built in, so it can run independently. However, I see several articles on how to integrate Apache Webserver with Tomcat? What's the purpose of doing this? Does it improve performance? I am using Tomcat for serving...

Spring Boot configure a Domain/Host to access in a www.website.com fashion

tomcat,nginx
I have a spring boot application. Usually I run my Spring applications on PaaS instances, and configuring a domain name from there is easy enough, however I am running this on a Virtual Private Server, and I cannot, for the life of me, figure out how to run my spring...

Insufficient memory for Java Runtime Environment to continue in Tomcat

java,tomcat,jvm,jvm-crash
I'm a tomcat/ tech newbie, so i'm sorry if I make any mistakes in the problem description. I'm trying to run a dashboarding application, DOMO on our test server. We have been using tomcat to run the application since a decade, and everything usually works fine. Recently, when I tried...

Cannot start a war with a tomcat

tomcat,war
does anyone could start that war with a tomcat? https://docs.google.com/file/d/0B5FiAsl5yGbZcV9rZDBrVS1IcDA/edit I put the war in webapps, startup.bat, http://localhost:8080/org.cap.editor.jsp/edit.html in browser but I get an "NetworkError: 404 Not Found - http://localhost:8080/org.cap.editor.jsp/edit.html" it's missing the edit.html? If anyone can start this, please tell me how, thanks!...

Spring Boot: Inject a custom context path

spring,spring-mvc,tomcat,spring-security,spring-boot
I'm running a Spring Boot 1.2.3 application with embedded Tomcat. I'd like to inject a custom contextPath on every request, based on the first part of the URL. Examples: http://localhost:8080/foo has by default contextPath="" and should get contextPath="foo" http://localhost:8080/foo/bar has by default contextPath="" and should get contextPath="foo" (URLs without path...

Application can't find properties file on Tomcat server

java,tomcat,tomcat8
I am trying to get Tomcat to load an external property file, which exists outside the classpath of the WAR file. I have simple class called PropertiesSingleton, which is supposed the load the properties file into a java.util.Properties object. package my.test.properties; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import...

Axis2 keeps generating files in temp folder when running on tomcat

java,tomcat,soap,axis2,axis
When deploying a web application on tomcat which uses Axis2 for SOAP communication, then in the tomcat temp directory 'apache-tomcat-6.0.29\temp' we keep getting a folder such as 'axis2-tmp-21936.tmp' holding jars for the deployed Axis2 modules such as Rampart (for e.g. axis21098rampart-mar-1.5.1.jar). The files keep growing until they fill up your...

Struts namespaces and WEB-INF folder

java,jsp,tomcat,struts2
I want to put view.jsp file in WEB-INF folder. it lies in WEB-INF\user\view.jsp <package name="user" extends="struts-default" namespace="user"> <action name="view" class="com.example.user.ViewUserAction"> <result>/WEB-INF/user/view.jsp</result> </action> </package> but Struts changes this url to application/user/WEB-INF/user/view.jsp so as I understand if my namespace is not "/ " I will never visit the jsp in WEB-INF ?...