Can one use mod_pagespeed with tomcat application server? directly or indirectly?
Am i correct in stating that you can use mod_pagespeed with tomcat if you use apache webserver as a proxy to tomcat webserver? (does this work with mod_jk?)
You can use mod_pagespeed with Tomcat. You're right that you'll need to use Apache as a proxy to Tomcat. I know that it definitely works with mod_jk since we use it in production. I assume it also works with mod_proxy and mod_proxy_ajp, however I can't confirm those.
Related
I constructed my back-end server with Java + Spring boot, and deployed it with default WAS in it, tomcat.
Also, my service is very small, I think only 1 server instance would be reasonable for now.
But I wonder, in this case, is using nginx besides tomcat better choice?
I read some documents, and it seems like nginx is more fit when I have to load-balancing.
What is advantages of using nginx + tomcat over using only tomcat? Thanks.
How would I go about configuring Geoserver to only load from an https address? I have been combing the web and cannot find any solution.
I think that this question is not exactly related to geoserver.
You should configure your java application server (tomcat or whatever) to use https. Geoserver will inherit that configuration
If you are using tomcat you can try to follow this instructions. Or as stated in the comments, now geoserver doc also includes how to configure tomcat for ssl.
If you make use of a proxy, e.g. Nginx. Make sure to set the correct Proxy Url in GeoServer. If not set correctly, GeoServer will advertise with HTTP when asked for it's capabilities. You can check it yourself by opening WMS_MS_Capabilities.dtd in your browser.
https://youserver.com/geoserver/schemas/wms/1.1.1/WMS_MS_Capabilities.dtd
or
https://youserver.com/schemas/wms/1.1.1/WMS_MS_Capabilities.dtd
I was wondering if it is possible to embed an OSGi container like Karaf inside a Tomcat instance. According to this SO question and a few others, it seems like its possible, but I can't seem to find any solid details on how to do this or what pitfalls/caveats to watch out for.
So:
Is it possible to embed an OSGi container inside Tomcat, so that I can hot-deploy OSGi bundles at any point to this container without having to restart Tomcat?
If the answer to #1 above is "yes", then what system services/ports does embedding OSGi inside Tomcat expose? I ask because I would like to deploy OSGi in a Tomcat server hosted on a Java PaaS where I don't have admin rights. And I'm wondering if - when I try to deploy the embedded OSGi container to Tomcat, that it will try to start listening on ports, or perhaps start doing something to the local file system. If this is the case I will likely receive security/permission errors.
Thanks in advance!
Is it possible to embed an OSGi container inside Tomcat?
Yes. In fact if you download Karaf and look in <KARAF_HOME>/demos/web you'll find a demo project that does exactly that.
what system services/ports does embedding OSGi inside Tomcat expose?
That would depend on what you install in it and how you configure it. Here is somewhat old (but IMHO stil relevant) discussion about default ports and how to configure them.
We deploy our application in the same fashion. We have deployed karaf in tomcat & on weblogic using a servelt bridge. The reason for using the container was to get past environment constraints where some customers are a "oracle" or an "ibm" shop and want all deployments done on these servers.
Since you will be using a servlet bridge it does not need to open a new port to list to http traffic. You may have issues with the karaf console if that port is blocked. Also I recall having issues with running cxf due to an embedded jetty instance it starts on another port.
Other than the ports you will need a karaf home directory with write access.
It seems that tomcat is a web application server and EAR cannot be deployed in it. Can it be updated to deploy EAR files. If not what could be the alternate server which is easy to configure and deploy?
In Short - NO. Tomcat is not a Java EE compliant server, but just a web server.
Use JBoss/GlassFish/Geronimo, there are a lot more, just google for it :)
Best alternative is Glassfish Application Server, alongwith Netbeans which will be best for practice purpose. Although there are a long list of such server and also that Apache also have one such server.
....
I don't know about Glassfish, but JBoss uses an embedded Tomcat so you might get comfortable with it somewhat easier.
We are trying to run the GWT (2.1) Speedtracer, but have trouble with it, since Jetty doesn't accept our JDBC resources (they work fine in Tomcat) - probably because the JAR containing the drivers is not found by it.
Is there a way to make the GWT speedtracer run without the Jetty Server?
Or how do I make the web.xml/context.xml compatible with both Tomcat and Jetty?
I would prefer to run it in Jetty - as long as this won't cause problems with tomcat.
If you want to use Tomcat:
The GWT documentation mentions, that you can use Speed Tracer on the server-side with the SpringSource tc Server (which is a Tomcat server).
If you want to use Jetty:
Using DataSources with the embedded GWT Jetty server is possible, but not easy. It's explained in this Google Group post for GWT 1.6. I have tried this with GWT 2.1, and it basically remains the same procedure. Here's a quick outline:
enable JNDI for the embedded Jetty:
add jetty-naming-*.jar, jetty-plus-*.jar
modify the JettyLauncher,
add the VM arg -Djava.naming.factory.initial=org.mortbay.naming.InitialContextFactory (or use jndi.properties)
create a jetty-env.xml (similar to Tomcat's context.xml)
define a resource-ref in the web.xml