jetty

How to access Solr from an external IP address?

白昼怎懂夜的黑 提交于 2020-01-01 07:07:25
问题 I have Solr running on my server on localhost in the Jetty container. This seems like an obvious question, but how do I access the web interface from outside the server itself, like from an external IP address? Obviously, authentication will be important as part of any solution. I am also running Apache2 on the server, if that is a good solution. I'm surprised I can't find anything about this. 回答1: I finally stumbled upon an answer to this. I don't really need persistent access to the Solr

Jetty 8.1.1.v20120215 in Eclipse with webapp (JSF + Maven)

南笙酒味 提交于 2020-01-01 04:36:08
问题 I am trying to run my webapp (using JSf) Jetty 8.1.1.v20120215 in Eclipse. I downloade Jettey Adaptor for Jetty and then added Jetty Server 8.1 in Eclipse. Then I stared my webapp under Jetty webserver. And got follwoing error. From statck trace it looks like Jetting is not getting some of the required jars. As have adde all those jar in my webapp in dependanceis as I am using maven. I can also see in eclipse those file listed in Eclipse under Refrenced Libaries. 2012-03-01 16:46:00.492:INFO

Jetty 7: OutOfMemoryError: PermGen space on application redeploy

不问归期 提交于 2020-01-01 03:24:08
问题 First time app starts correctly. Then I delete webapp/*.war file and paste new version of *.war. Jetty start deploying new war but error java.lang.OutOfMemoryError: PermGen space occurs. How can I configure Jetty to fix error / make correct redeploy? This solution doesn't help me. Jetty version: jetty-7.4.3.v20110701 回答1: There is probably no way to configure the problem away. Each JVM has one PermGen memory area that is used for class loading and static data. Whenever your application gets

how to reduce solr memory usage?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 03:18:09
问题 I use solr in my application, there is just hundreds of documents. the memory usage is about 80M, how to reduce it? 回答1: 80M is not much, in fact it's pretty much the mininum, you won't go much lower than that. Some factors that affect memory usage: Input document size Multi-threaded document updates Cache size Facet queries Sorting References: http://wiki.apache.org/solr/SolrPerformanceFactors#Factors_affecting_memory_usage http://www.nabble.com/Debugging-Solr-memory-usage-heap-problems

Deploy & Debug remote Jetty with IntelliJ 12

可紊 提交于 2020-01-01 03:15:10
问题 I've been hacking and googling for a while now, and I've found several statck overflow threads that seemed like they were written for older versions of intellij, with various application servers. Usually they tell you to enter java -Xdebug -Xrunjdwp:transport=dt_socket,address=51887,suspend=n,server=y One answer suggests using something like -agentlib:jdwp:transport=dt_socket,address=51887,suspend=n,server=y But then I get this: Error occurred during initialization of VM Could not find agent

Jetty 9.2.1 redirect http to https

混江龙づ霸主 提交于 2020-01-01 00:23:13
问题 can someone help migrating the code from jetty 8 to 9.2.1. I need to have jetty listening on port 80 (http) and redirect every request to 443 (https). this is the code for jetty 8, but it doesn’t work on 9.2.1. Version 9 uses ServerConnector but I cant find examples on how to use the setConfidentialPort property. Server server = new Server(); //Create a connector on port 80 to listen for HTTP requests SelectChannelConnector httpConnector = new SelectChannelConnector(); httpConnector.setPort

How to configure jetty to put logs into an external file

守給你的承諾、 提交于 2019-12-31 22:34:31
问题 How to configure jetty to put its logs into an external file? Manual says that I have to put slf4j into the lib directory. What I did was: download slf4j and put slf4j-log4j12-1.7.3.jar into $JETTY_HOME$/lib . download log4j and put log4j-1.2.17.jar into $JETTY_HOME$/lib create a log4j configuration file. it's available from below: <appender name="fileAppender" class="org.apache.log4j.RollingFileAppender"> <param name="Threshold" value="DEBUG" /> <param name="File" value="c:/app/jetty/logs

C3p0 connection pooling for jpa in persistence.xml not working?

淺唱寂寞╮ 提交于 2019-12-31 22:27:10
问题 I'm still getting JDBC timeouts after trying to configure c3p0 following all of the examples I could find. I'm using JPA, Hibernate, Tomcat, MySQL [AWS RDS]. Here's the snippet from persistence.xml: <property name="javax.persistence.jdbc.url" value="jdbc:mysql://url..." /> <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" /> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> <property name="connection.provider_class" value="org

How to use setThreadPool() in Jetty

妖精的绣舞 提交于 2019-12-31 03:08:08
问题 I wanted to see how to use the setThreadPool() functionality. Let's say my main class is the following: import javax.servlet.SingleThreadModel; import org.eclipse.jetty.server.Server; public class FServer implements SingleThreadModel { public static void main(String[] args) throws Exception { Server server = new Server(x); server.setHandler(new Handler()); server.start(); server.join(); } } When trying to add the setThreadPool() , I'm always asked to implement abstract methods. My question is

Bind Jetty to IPv6 address

狂风中的少年 提交于 2019-12-31 01:52:15
问题 I am trying to bind Jetty to listen only to IPv6 address. I am using Jetty 7.4.2.v20110526. my jetty.xml: <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> <Set name="host">::1</Set> <Set name="port"><SystemProperty name="jetty.port" default="8070"/></Set> <Set name="maxIdleTime">30000</Set> <Set name="Acceptors">2</Set> <Set name="confidentialPort">8443</Set> </New> </Arg> </Call> the error I get: java.net.SocketException@3d3c4c09: Address