tomcat7

How to hide spring mvc web app name in the browser url?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-05 04:02:23
问题 I have a spring mvc 3.x web app in eclipse where the resource project artifact name is "webapp". So, http://localhost:8080/webapp will load the main home page using tomcat 7 with the eclipse IDE. However, when I release to tomcat 7.0 to some prod servers I don't want the URL to resolve to http://mywebsite.com/webapp but instead http://mywebsite.com How can I achieve this? 回答1: You can follow either of below approaches Delete existing ROOT/ directory (in webapps) from tomcat and rename your

Tomcat7 won't start up on ubuntu (clean install), permission denied [closed]

半腔热情 提交于 2020-01-05 03:00:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a clean ubuntu installation (14) and try to run Tomcat7. I have installed it via terminal, run the "sudo service tomcat7 start" command which should start tomcat, but when I try to open: localhost:8080, the welcome index page is not loading and I get a 404 error (file not found). The 8080 port is not

Cannot call JNDI resource in persistence.xml file

空扰寡人 提交于 2020-01-04 11:44:28
问题 Although it seems many users faced the same problem, I have to post my own issue, taking in account that for now, no suggestion from those already present worked for me. Or maybe am I missing something? Here is my persistence.xml file (located uner resources/META-INF/ directory, in a maven project): <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/

Getting Conflicting URI templates errors when trying to add resource class

余生颓废 提交于 2020-01-04 02:11:41
问题 I have a restfull implementation using Jersey and Tomcat7. I have 3 resources called RegionService, ClientService and NoteService defined in my campher.rest package. When I try to add another resource called TestResource, and Tomcat starts, it gives me the following error below. I don't understand how /{notes} conflicts with /{test}?? Please help, my hair will thank you. Aug 22, 2012 2:23:39 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses INFO: Root resource classes found: class

Tomcat7 HTTP Status 500 - Servlet execution threw an exception

依然范特西╮ 提交于 2020-01-03 17:27:39
问题 type Exception report message Servlet execution threw an exception description The server encountered an internal error that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClassCond(Unknown Source) java.lang.ClassLoader.defineClass(Unknown

Tomcat7 HTTP Status 500 - Servlet execution threw an exception

丶灬走出姿态 提交于 2020-01-03 17:27:10
问题 type Exception report message Servlet execution threw an exception description The server encountered an internal error that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClassCond(Unknown Source) java.lang.ClassLoader.defineClass(Unknown

How set TimeZone for each virtual host in tomcat

时光怂恿深爱的人放手 提交于 2020-01-03 17:06:04
问题 I have web apps for 3 regions (Mongolia,Turkmenia, etc). And they are deployed on tomcat's virtual host . Now I need set timezone for each application. How can I do that? I implemented ServerContextListener interface for each apps to set TimeZone : @Override public void contextInitialized(ServletContextEvent servletContextEvent) { TimeZone timeZone=TimeZone.getTimeZone("Asia/Ulan_Bator"); // TimeZone timeZone=TimeZone.getTimeZone("Asia/Ashgabat"); timeZone.setDefault(timeZone); } But after

Tomcat 7 and ScheduledExecutorService.shutdown

你。 提交于 2020-01-03 11:18:05
问题 I am using ScheduledExecutorService to run scheduled threads. I implemented ServletContextListener.contextDestroyed and invoked ScheduledExecutorService.shutdownNow and awaitTermination . Here is an example: @Override public void contextDestroyed(ServletContextEvent servletcontextevent) { pool.shutdownNow(); // Disable new tasks from being submitted try { // Wait a while for existing tasks to terminate if (!pool.awaitTermination(50, TimeUnit.SECONDS)) { pool.shutdownNow(); // Cancel currently

Where does Tomcat7w.exe store Settings on Windows

孤者浪人 提交于 2020-01-03 10:30:29
问题 I had endless problems finding an answer to this question when trying to make a backup of my existing settings before making wild modifications that I wanted to test. I finally have an answer that I'd like to share with the denizens of stack overflow in case anybody else is having the same problem! 回答1: The value is stored in the windows registry in a really unintuitive place. HKLM > Software > Wow6432Node > Apache Software Foundation > Procrun 2.0 > [Your Instance Name] 来源: https:/

Serialize FacesContext or How to get properties-values after Server Restart

怎甘沉沦 提交于 2020-01-03 04:32:38
问题 The problem is the following: I need to serialize the user session, so, it will still be present after a server restarts. Using JavaEE and Tomcat 7 works fine with implements Serializable , but the problem is the FacesContext . Indeed, after restarting the server, FacesContext.getCurrentInstance() returns null , and therefore I cannot access the message bundle (and therefore my message.properties cannot be found anymore). So, how do I keep the FacesContext when restarting Tomcat? 回答1: Your