jetty

HTTP ERROR: 404 missing core name in path with solr

佐手、 提交于 2019-12-17 16:01:36
问题 I am new to Solr, after installing it in ubuntu 8.10, when I was trying exampledocs to index , as per this link, I got this error: HTTP ERROR: 404 missing core name in path This is in Jetty. What shall I do, in order to solve this? 回答1: I've gotten the same error: HTTP ERROR: 404 missing core name in path In my case I've forgotten so set the solr/home value in the WEB-INF/web.xml file <env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value>/put/your/solr/home/here</env-entry

Executable war file that starts jetty without maven

与世无争的帅哥 提交于 2019-12-17 15:00:08
问题 I'm trying to make an "executable" war file ( java -jar myWarFile.war ) that will start up a Jetty webserver that hosts the webapp contained in the WAR file I executed. I found a page that described how to make what I'm looking for: However, following that advice along with how I think I'm supposed to make an executable jar (war) isn't working. I have an Ant task creating a WAR file with a manifest that looks like: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 Created-By: 1.5.0_18-b02

java——Jetty目录结构

筅森魡賤 提交于 2019-12-17 12:16:38
     -- bin 存放Windows和linux等系统中使用的Jetty启动脚本和相关文件 -- contexts 存放应用程序发布描述文件,里面有Jetty自带的示例文件 -- distribution 关于发行构建的代码,正式环境可删除 -- etc Jetty配置文件,后续章节会详细介绍 -- examples Jetty示例程序源代码,正式环境可删除 -- extras Jetty相关程序源代码,正式环境可删除 -- javadoc Jetty 核心代码的API文档,正式环境可删除 -- jxr Jetty 其他相关程序API文档,正式环境可删除 -- LICENSES 发行协议说明 -- logs 日志目录 -- modules Jetty相关模块程序源代码,正式环境可删除 -- patches jdk5的补丁文件描述,正式环境可删除 -- project-website maven产生的项目站点文档目录 -- resources 如果存在该目录,jetty启动时会将该目录加入类路径,默认存放log4j配置文件 -- webapps 存放web应用程序,默认情况下该目录下面的文件夹或者war文件将在jetty启动的时候被运行 -- start.jar 启动Jetty引导java程序,可以在各个操作系统中使用它启动jetty服务,后续章节将详细介绍该组件 来源:

Is there a way to pass jvm args via command line to maven? [duplicate]

喜你入骨 提交于 2019-12-17 10:18:14
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: maven jetty plugin - how to control vm arguments? In particular, I want to do something like this: mvn -DjvmArgs="-Xmx2000m -Xms1000m -XX:PermSize=512m -XX:MaxPermSize=512m" jetty:run -Pmyprofile Oh, and I would like to do this without having to modify the pom files or set any environment variables.. etc 回答1: I think MAVEN_OPTS would be most appropriate for you. See here: http://maven.apache.org/configure.html

How do I access instantiated WebSockets in Jetty 9?

给你一囗甜甜゛ 提交于 2019-12-17 06:42:33
问题 This is probably obvious, but I am new to this paradigm. I create a Jetty Server and register my websocket class as follows: Server server = new Server(8080); WebSocketHandler wsHandler = new WebSocketHandler() { @Override public void configure(WebSocketServletFactory factory) { factory.register(MyEchoSocket.class); } }; server.setHandler(wsHandler); The websocket receives messages fine. I would like to also be able to send messages out from the server without having first received a message

could not find Factory: javax.faces.context.FacesContextFactory

狂风中的少年 提交于 2019-12-17 06:38:08
问题 I notice that when trying to setup my JSF 2 webapp running on jetty, i have this error : java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory which is easily solved by adding this to my web.xml <listener> <listener-class> com.sun.faces.config.ConfigureListener </listener-class> </listener> I've tried searching for a detailed explanation but in futile .. jetty-maven-plugin:8.0.3.v20111011:run + jdk

Linux下部署Java项目(jetty作为容器)常用脚本命令

若如初见. 提交于 2019-12-17 05:31:26
startup.sh #!/bin/bash echo $(basename $(pwd)) "jetty started" cd jetty nohup java -Xmx8g -Xms8g -Xmn4g -XX:PermSize=2g -XX:MaxPermSize=4g -XX:+CMSClassUnloadingEnabled -jar -Dfile.encoding=UTF-8 start.jar --module=http >/dev/null 2>&1 & status.sh #!/bin/bash #close start.jar and debug for pid in `ps aux | grep java | grep -v "grep" | awk '{print $2}'` ; do start_path=`ls -l /proc/${pid}/cwd | awk '{print $11}'` if [[ ${start_path} =~ $(basename $(pwd)) ]] then debug_path=`ps aux | grep -v grep |grep ${pid}|awk '{print $12}'` if [[ ${debug_path} =~ "debug" ]] then echo ${pid} $(basename $(pwd)

Jetty架构解析及应用示例

家住魔仙堡 提交于 2019-12-17 01:01:35
Jetty 是一个 Web server/servlet container, 支持 SPDY , WebSocket , OSGi , JMX , JNDI , JAAS 。Jetty非常高效而且灵活,Google App Engine 选择了Jetty,而放弃了Tomcat,或是其他的服务器。 Jetty has a slogan, "Don't deploy your application in Jetty, deploy Jetty in your application." What this means is that , putting an HTTP module into your application, rather than putting your application into an HTTP server. Jetty的口号是:“不要把你的程序部署到Jetty里,而是把Jetty部署到你的程序里”,意味着,你可以把Jetty当成程序的一个HTTP模块放到你的程序里。 本文先通过一个简单的HelloWorld示例,展示了java应用中的Jetty是如何启动的;接着详细分析了Jetty的整体架构;最后展示了用Jetty启动一个标准的Java web app。 Hello World 示例 需要的jar包: jetty-server-8.1.11

Jetty - Container源码分析

这一生的挚爱 提交于 2019-12-16 17:51:09
1. 描述 Container提供管理bean的能力。 基于Jetty-9.4.8.v20171121。 1.1 API public interface Container { // 增加一个bean,如果bean是一个Container.Listener则隐含调用addEventListener(Container.Listener)方法 // Container.Listener只关心两个事件:(1)增加bean(2)删除bean public boolean addBean(Object o); // 返回该Container里面所有的bean public Collection<Object> getBeans(); // 返回指定类型(包括子类)的bean public <T> Collection<T> getBeans(Class<T> clazz); // 返回指定类型(包括子类)的第一个bean,如果不存在则返回null public <T> T getBean(Class<T> clazz); // 删除指定的bean,如果bean是一个Container.Listener,隐含调用removeEventListener(Container.Listener) public boolean removeBean(Object o); //

ActiveMQ via REST: High throughput Jetty configuration

我只是一个虾纸丫 提交于 2019-12-14 03:14:07
问题 i want to send Messages to ActiveMQ via HTTP Requests. I created my own Servlet (the default servlet isn't that good). Unfortunately my Server only handles 400 Requests per second. Is there a configuration i have to do so jetty can handle more? I'm running on an 8 core maschine so more requests should not be a problem. 回答1: Two suggestions: Did you configure the jetty thread pool high enough to concurrently handle your requests? Or is the CPU utilization of the JVM at 100% at runtime? If yes,