问题标签 [catalina]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
apache - 将主机 ip 重定向到 apache tomcat 集群中的负载均衡器
我有一个使用 Apache 2.2 和 Tomcat 7 节点设置的负载平衡集群。我知道客户端通常不会知道节点的 IP,但我很好奇是否有办法配置节点以将请求重定向到负载均衡器。其中一部分已经有效,例如 url:
结果是:
这很好。
但是,如果我指定任何其他 url,我会收到 403 响应,例如:
有没有办法让请求 2 重定向到负载均衡器?
tomcat - ERROR: Catalina_Home Variable is not define correctly in this environment
I just trying to running tomcat on my PC, but I got this error
Catalina_Home Variable is not define correctly in this environment
FYI: I have tried to search about the error and find some information about this error. But, unfortunatelly, that doesn't solve my problem.
Here is the content of the startup.bat file. Thanks![enter image description here][1]
@echo off rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with rem this work for additional information regarding copyright ownership. rem The ASF licenses this file to You under the Apache License, Version 2.0 rem (the "License"); you may not use this file except in compliance with rem the License. You may obtain a copy of the License at rem rem
http://www.apache.org/licenses/LICENSE-2.0 rem rem Unless required by applicable law or agreed to in writing, software rem distributed under the License is distributed on an "AS IS" BASIS, rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem See the License for the specific language governing permissions and rem limitations under the License.if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- rem Start script for the CATALINA Server rem rem $Id: startup.bat
895392 2010-01-03 14:02:31Z kkolinko $ rem
rem Guess CATALINA_HOME if not defined set "CURRENT_DIR=%cd%" if not "%CATALINA_HOME%" == "" goto gotHome set "CATALINA_HOME=%CURRENT_DIR%" if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome cd .. set "CATALINA_HOME=%cd%" cd "%CURRENT_DIR%" :gotHome if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome echo The CATALINA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program goto end :okHome
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
rem Check that target executable exists if exist "%EXECUTABLE%" goto okExec echo Cannot find "%EXECUTABLE%" echo This file is needed to run this program goto end :okExec
rem Get remaining unshifted command line arguments and save them in the set CMD_LINE_ARGS= :setArgs if ""%1""=="""" goto doneSetArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto setArgs :doneSetArgs
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
:end
apache - apache tomcat catalina 作为 CORS 过滤器的 maven 依赖项
我在我的 web 应用程序中使用 org.apache.catalina.filters.CorsFilter。所以我指定了maven依赖
现在,如果我说范围是“提供”或“运行时”服务器不会启动,因为
这个类在 jbossews/lib 的 catalina jar 中不可用,它是 7.0.40
在 openshift 上“升级”tomcat 容易吗?或者,如果有人可以提出解决方案,我们将不胜感激。
非常感谢,
tomcat - Where to upload files in Jboss and later download them?
We are moving one web app from Tomcat 7.0 to Jboss 7.1. In this web app there is a possibility to upload documents by the users. These documents can be then downloaded or deleted by the users as well.
The documents have been stored within the web application (this is a requirement, so we cannot store the documents in a DB or in another folder outside of the app on the web container).
When using Tomcat I could have done smth. like the following in java code to get an existing absolute path to the directory where the files were stored:
How can I achieve the same or similar goal when we I now use Jboss 7.1 instead of Tomcat?
Using smth. like System.getProperty("JBOSS_HOME") didn't work for me.
Thanx a lot in advance.
eclipse - 在 Eclipse 上设置外部 Tomcat(带有 CATALINA_HOME/CATALINA_BASE 配置)
我正在使用CATALINA_HOME
/CATALINA_BASE
配置使用 Tomcat 7 服务器。根据此配置,Tomcat 服务器可以使用命令$CATALINA_BASE/bin/catalina.sh start
或启动$CATALINA_BASE/bin/catalina.sh run
,具体取决于您的兴趣。
这种方法有一些非常有趣的优点:可以对 CATALINA_BASE 文件夹进行版本控制,而如果您想更改 Tomcat 版本,可以轻松地更改 CATALINA_HOME 文件夹。
尝试在 Eclipse 上配置 Tomcat 服务器而不修改任何服务器 (CATALINA_BASE) 文件时会出现问题:实际上 Tomcat 服务器集成在 Eclipse 中,我还没有找到配置来调用$CATALINA_BASE/bin/catalina.sh start
脚本以完全利用BASE/HOME 配置的强大功能。
我确信这可以在 IntelliJ IDEA 和 NetBeans 中完成,但是,当然,我不想使用这些 IDE。
你们中有人有类似的问题/要求吗?
linux - catalina.sh 中的 Tomcat 堆设置不起作用
在 linux Tomcat bin 文件夹中,我想设置JAVA_OPTS
堆内存,我已经完成了设置export CATALINA_OPTS="-server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m"
,然后重新启动,但我的堆内存仍然没有更新。
你能指导我吗?将这些属性放在catalina.sh中的什么位置,或者我遗漏了什么,或者我必须在其他地方进行修改?
apache - Java Servlet - 空指针异常和 .jar 未加载
所以我的情况有点奇怪,因为我正在查看一个无法访问源代码的服务器。到目前为止,关于 servlet 的一切都运行良好,但是出现了一个突然的、自发的错误,该错误与 Java servlet 之一具有空指针异常有关。
这是错误日志:
但是转到 catalina 文件,我注意到它指出在几个位置,它正在尝试验证 .jar 文件,并且 WEB-INF/lib 目录中没有加载 servlet.jar 文件。
这是具有特定位置的线的示例:
总的来说,我对这个问题感到非常困惑,因为就用户与源代码的交互而言,绝对没有,因为没有人可以访问它。这一切来得如此突然和自发。
有什么想法/资料可以帮助我解决这个问题吗?非常感激。
log4j - How to set log4j logging levels for Java jars called from JRuby
I have a JRuby project that requires a Java jar. The Java jar is instrumented for logging using log4j. I don't need to use log4j in my JRuby code, but I want to run the JRuby code so that when the instrumented Java classes are called they respect the log4j settings I've specified.
I'm using Trinidad and had hoped that just passing in the 'normal' log4j JVM arguments would do the trick. Here's the process information when I just run Trinidad:
and here's what I tried to get log4j working:
so I'm just adding
to what Trinidad is already doing.
What I'm not seeing is any of the log4j logging happening when I run Trinidad. However, when I use Rails console my logging statements are appearing.
The posts I've seen cover how to use log4j from within JRuby, but I would like to accomplish this via JVM arguments if possible.
java - 如何更正应该指向 JDK 而不是 JRE 文件夹的 JAVA_HOME?
我正在尝试使用 debug 命令在 Ubuntu Linux 上运行 Catalina。我收到以下错误:
但是,我尝试将 JAVA_HOME 设置.bashrc
为以下所有内容:
我错过了什么吗?
spring - 无法加载 Tomcat 服务器配置
我编辑catalina.properties
试图更改服务器的端口,它没有工作并恢复了原始值,现在我收到以下错误:
无法在 /Servers/VMware vFabric tc Server Developer Edition v2.9-config 加载 Tomcat 服务器配置。配置可能已损坏或不完整。资源与文件系统不同步:“/Servers/VMware vFabric tc Server Developer Edition v2.9-config/catalina.properties”。
这是 Spring Tool Suite 提供的默认服务器。
我找到的解决方案对我没有帮助,例如将所有 TOMCAT_DIR/conf 文件复制到我的服务器位置,该位置位于workspace/Servers
.
有什么帮助吗?