tomcat7

Tomcat hosting multiple virtual host with multiple SSL certificate

我的未来我决定 提交于 2020-01-01 10:36:26
问题 I have a server hosting multiple websites using Tomcat 7, for example a.abc.com b.abc.com c.def.com d.def.com Using tomcat's virtual hosting feature, so they each may belong to different webapps folder. We're now trying to implement Https to each of the sites. So basically we got 2 wildcard certificates, *.abc.com, and *.def.com I've been looking for the ways to setup and I found: This where it taught me how to setup SSL with tomcat This where it taught me how to setup multiple Host with

AngularJS remove # and have error when refresh page

若如初见. 提交于 2020-01-01 05:24:12
问题 I have AngularJS webapp and start it with Tomcat 7 . Using $locationProvider.html5Mode(true) I remove hash '#' from url localhost:8080/App/#/login -> localhost:8080/App/login But now, when I refresh localhost:8080/App/login I have 404 error . How to configure Tomcat7 for localhost:8080/App/login refresh? app.config: $urlRouterProvider.otherwise("/login/"); $stateProvider .state('home', { abstract: true, templateUrl: 'dist/view/home.html', controller: 'HomeCtrl' }); $locationProvider.html5Mode

permgen, but Java VisualVM says “No GC root found”

老子叫甜甜 提交于 2020-01-01 05:04:11
问题 I have a very simple 'Hello world' type web application (Spring 3.2.1, Hibernate 4.1.9) on stopping/restarting the web-app Tomcat 7.0.26 The following web applications were stopped (reloaded, undeployed), but their classes from previous runs are still loaded in memory, thus causing a memory leak (use a profiler to confirm): /myapp I took the following steps: Started JVisualVM Right click on Tomcat and selected 'Heap Dump' Clicked on 'OQL Console' on the [heapdump] Ran this query: select x

Apache httpd vs. Tomcat 7: port 80 vs. port 8080

空扰寡人 提交于 2020-01-01 00:35:29
问题 I had recently installed Tomcat 7 on Amazon ec2. I found that Tomcat, by default, listens on port 8080. The documentation on the internet advocates that this is because linux is better saving the lower ports to the super user. (The solution on ec2 btw is creating a Load Balancer - directing the communications from port 80 to port 8080 on the target machine) Than - to my surprise - I went on and installed an Apache server on another machine (yum install httpd), and surprise! - Apache listens

Adding a directory to tomcat classpath and read the property file in spring

笑着哭i 提交于 2019-12-31 11:47:41
问题 I am trying to read the test1.properties file which is located at an external folder. here is my spring config file: <bean id="propertyConfigurer3" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders" value="true"/> <property name="locations"> <list> <value>classpath:test.properties</value> <value>classpath:test1.properties</value> </list> </property> </bean> if I place the test1.properties in the tomcat7/lib folder, I

Jar file failed to load in tomcat webapps

我的未来我决定 提交于 2019-12-31 08:46:14
问题 This is what the error i got when i try to deploy maven project to tomcat mvn tomcat7:deploy Error : INFO: validateJarFile(D:\Softwares\tomcat\apache-tomcat-7.0.50\webapps\myWebApp_ 1\WEB-INF\lib\javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 3. 0, section 10.7.2. Offending class: javax/servlet/Servlet.class But the javax.servlet-api-3.0.1.jar is there in WEB-INF\lib Thanks 回答1: INFO: validateJarFile(D:\Softwares\tomcat\apache-tomcat-7.0.50\webapps\myWebApp_ 1\WEB-INF\lib

Can not include javascript file from WEB-INF directory in JSP.

拈花ヽ惹草 提交于 2019-12-31 04:13:55
问题 How to include a file in the following folder WEB-INF\includes\header.js in jsp using tomcat. I have the included the following in jsp file but it does not work " <script type="text/javascript" src="WEB-INF/includes/header.js"></script> ". It is not getting the header.js and when i view source and try to click on the src link it says resource not found 404 error. 回答1: <script type="text/javascript"> <%@include file="../foo.js" %> </script> foo.js is under WEB-INF/jsp and the file include it

Tomcat 7 fails to compile JSP Pages

Deadly 提交于 2019-12-31 04:11:18
问题 I have an application that works perfectly fine on Tomcat 6. I have now moved this application to Tomcat 7 and the JSPs are throwing below compilation exception Mar 21, 2014 12:05:56 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [jsp] in context with path [/core-tool-5.0] threw exception [Unable to compile class for JSP: An error occurred at line: 22 in the generated java file The type welcome_jsp must implement the inherited abstract method

modify properties file in Tomcat during runtime

早过忘川 提交于 2019-12-30 11:08:21
问题 I would like to modify a properties file of a Portlet during runtime. The portlet is deployed in a Tomcat 7.0.23 and the properties file sits in "/WEB-INF/classes/content" from where I can access it via the code shown below. In fact, the code is executed without any exceptions but the newly added Property is not saved to the properties file. String fileName = "MyProps.properties"; String relativePath = "/WEB-INF/classes/content/"; String fullPath = "c:/tomcat-7.0.23/webapps/my-portlet/WEB-INF

modify properties file in Tomcat during runtime

↘锁芯ラ 提交于 2019-12-30 11:08:07
问题 I would like to modify a properties file of a Portlet during runtime. The portlet is deployed in a Tomcat 7.0.23 and the properties file sits in "/WEB-INF/classes/content" from where I can access it via the code shown below. In fact, the code is executed without any exceptions but the newly added Property is not saved to the properties file. String fileName = "MyProps.properties"; String relativePath = "/WEB-INF/classes/content/"; String fullPath = "c:/tomcat-7.0.23/webapps/my-portlet/WEB-INF