tomcat6

JSP: new Socket (“www”, 80); stopped working after years of working OK

半腔热情 提交于 2019-12-24 02:23:21
问题 In a JSP app, in Tomcat, the following code used to produce the whole address of the page (from this answer): String myUrl = "no network"; try { Socket s = new Socket("www", 80); myUrl = "http://"+s.getLocalAddress().getHostAddress()+":"+request.getLocalPort()+request.getRequestURI(); s.close(); } catch (Exception ex) { } finally { } After that miUrl would have the folowing value (not the real IP addr): http://111.101.101.2:8080/mypage.jsp It has been working for several years. A week ago

Continuous Integration with Grails [closed]

…衆ロ難τιáo~ 提交于 2019-12-24 02:17:22
问题 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 last year . What tool would you recommend for continuous integration in a Grails + Tomcat (+ Ubuntu) environment? Jenkins? Hudson? Something else? I'm not looking for anything complex... simple would do just fine. 回答1: I just configured a grails job in Jenkins (running on debian). I cannot really say something about other CI

How to avoid redirecting to SSL port

蹲街弑〆低调 提交于 2019-12-24 01:52:35
问题 My Web.xml config in my SSL confugured web app(deployed on tomcat(8080 port)) is as follows <security-constraint> <web-resource-collection> <web-resource-name>HTTPSOnly</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> When I tried https://google.com, I am getting the page When I tried http://google.com , it automatically redirects to https:/

How to avoid redirecting to SSL port

爱⌒轻易说出口 提交于 2019-12-24 01:52:03
问题 My Web.xml config in my SSL confugured web app(deployed on tomcat(8080 port)) is as follows <security-constraint> <web-resource-collection> <web-resource-name>HTTPSOnly</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> When I tried https://google.com, I am getting the page When I tried http://google.com , it automatically redirects to https:/

Memory leaks in MyFaces

守給你的承諾、 提交于 2019-12-23 18:31:04
问题 EDIT: The solution that you can find in comments below assumes changing JSF implemenetation from MyFaces to Sun's Mojarra. Hi, I have got really annoying problem with MyFaces 2.0.0 (To be more precisely I checked it out also on 2.0.1 and 2.0.2 and problem remains). I'm writing now application under MyFaces. Briefly speaking in my application i use frameworks: Spring, Hibernate, JSF (MyFaces implementation) My application container is Tomcat (6.0.29 version) I use maven to build and deploy

java.lang.RuntimePermission when running a applet from the web application

梦想的初衷 提交于 2019-12-23 14:56:52
问题 I'm trying to read a envrionment varaible from a applet, here is my code String env = System.getenv("TWS"); System.out.println(env); Runtime rt = Runtime.getRuntime(); String s = env + "\\WebStart.bat " ; System.out.println(s); try { Process p = rt.exec(s); } catch (Exception e) { } when i run the code from netbeans by right click and run, it is running without a problem. but when i put it to a jar file, add it to my web application and try to run it from a html page using the following code

Exception in thread “PoolCleaner[{a number}]” in tomcat

淺唱寂寞╮ 提交于 2019-12-23 12:29:12
问题 I have implemented a Rest Web Service using apache CXF and I have set up the Tomcat's connection Pool provided in the org.apache.tomcat.jdbc.pool . Everything seems to work fine and my connection pool works but I am keep getting an exception related to the PoolCleaner . The problem is that I cannot find a specific pattern on when this exception happens. It seems random to me and some times it different than the previous times. Sometimes happens when I start tomcat and other times when I

Tomcat 6 not loading jars from WEB-INF/lib

喜欢而已 提交于 2019-12-23 08:46:44
问题 I'm trying to track down a configuration issue in my tomcat environment. Our production servers are running a tomcat installation and reading the war from a shared NFS mount. However, when I try the same war with a stand-alone box (with their configuration), I get the error posted below. Whats interesting, is that if I unzip all the jars in WEB-INF/lib into WEB-INF/classes, this error goes away. So, it seems like something is preventing the app from loading the WEB-INF/lib path, but I can't

ClassNotFoundException Error in Tomcat 5.5 and Tomcat 6.0

泪湿孤枕 提交于 2019-12-23 08:37:12
问题 I am having this strange issue with the tomcat 5.5 and tomcat 6.0 servers. I have two web applications which will be installed on tomcat.When tomcat is started these two web applications also get started simultaneously but sometimes one web application fails to initialize because of the init failure in one application another application is getting classnotfoundexception errors while running. In tomcat 7.0 the application is running fine even if the other application failed to initialize.

how to reflect changes by replacing class files in tomcat?

别等时光非礼了梦想. 提交于 2019-12-23 06:01:21
问题 I have a java application. All I have with me is a set on class files. Iwant to replace one class file with a new one. Replacing the old class file with the new one and restrting tomcat is not reflecting the changes. How can I do this? I know its not a recommended way, but all I have is just one new class file. 回答1: I've done this the way you describe before, and Tomcat reflected the changes just fine after restart. Perhaps your application's files are in multiple locations, and you aren't