We'd like to set up a development environment using cloud foundry. Unfortunately, our architecture packages a few different wars into one webapp, each war running under its own context. Furthermore, we have a bunch of absolute URIs with the context in it, too many to rename all of them to relative URIs.
CF apparently deploys a war to the root context. Is there any way to get around this? I tried faking it by editing the web.xml in tomcat/conf/ but when I did a whole other application folder was created on my machine.
Thank you
When you push a Java web app to CloudFoundry, the platform installs and configures the Tomcat instance(s) for you, and you have limited control over the configuration. It is possible to configure your own Tomcat (or other application container) and push it along with your application instead of letting the platform do it for you.
There is a good blog post about using this bring-your-own-container approach with Tomcat 7: https://www.cloudfoundry.org/blog/deploying-tomcat-7-using-the-standalone-framework-2/.
I suggest using this approach to configure a Tomcat 6 or 7 distribution in a way that works for your application, zip up the customized Tomcat distribution along with your war files, and push that bundle as a stand-alone app on CloudFoundry.
Related
I deployed a web service developed using Apache Axis2 on Openshift.
When I try accessing the axis2 index.jsp, I can see the index page which only contains the default Version.
Q:
How do I get to display the web service other web services I created as I can view them on my localhost through the browser in Eclipse?
I have done a few searches online and seen some suggestions as to making adjustments to axis2.xml. In that regard, I have tried changing the contextRoot parameter and the servicePath without no success though I am not too sure if I am making the right changes.
My project structure in Eclipse is shown below:
SieveService
+...
+Java Resources
++src
+++Model
++++some model classes
+++Services
++++SieveServiceService.java
++Libraries
+...
+WebContent
++axis2-web
+++...
I had the same problem and that's occurs because openshift's tomcat server only deploys services in aar format, meanwhile in localhost deploys aar and exploded files too.
You need to create a aar file with your services and put it into your WebContent/WEB-INF/services/ directory. You need to update the services.list file too with the name of your services.
After that you must see your services in your openshift server.
I have a java Spring application that I want to deploy to Cloudfoundry on Tomcat7. I am newbie to Cloudfoundry and followed the steps mentioned here but when I issue vmc push command I am getting warning Can't determine the Application Type with no options provided. Any idea to resolve this ?
C:\apps\tomcat7>vmc push
Would you like to deploy from the current directory? [Yn]:
Application Name: myApp77
[WARNING] Can't determine the Application Type.
Select Application Type:
Dan's comment is correct. You should be given the option to choose standalone app.
You may want to have a look at https://github.com/ericbottard/cloudfoundry-tomcat-7 which is a distribution of tomcat already customized (and tested) as described in the blog post you mention.
Even better, if you're using Maven, just follow the README and you'll be able to deploy your war project automatically as a tomcat7 standalone.
Hope this helps,
This actually sounds correct to me, in the list of application types should be an entry named "standalone application". Select that one and then provide the command you wish to start the application with, in this case it's 'bin/startup.sh'
I have a webapp (http://sourceforge.net/projects/sf-mvn-plugins/files/m2-repo/net/sf/maven/plugins/example-captaincasa-jnlp/0.1-SNAPSHOT/example-captaincasa-jnlp-0.1-SNAPSHOT.war/download) which uses jsf in a servlet container. This works fine with jetty-maven-plugin run-war target at my local pc. In the future I would like make more of this kind of webapps.
I am looking for a way to deliver these webapps with jetty via jnlp. The end user should be have a zero installation but the webapps needs servlet container and my hoster does not support a servlet container or application server or so on.
I don't like an embedded solution because in this case each webapp must be delivered with a separate jetty und run with a separate jetty -> too big size -> to many download size and so on.
The architecture should be similar to this:
(source: sourceforge.net)
Example: Bundle1 could contains jetty and deployed webapp1 and Bundle2 could contains jetty and deployed webapp1 and webapp2 (related to requirements of end user I would like deliver many variant of my webapps)
But what is my question?
Which jars of jetty are needed? I would like these upload to my homepage for hosting.
Which jar should I use for jetty as main jar to start him via jnlp?
Which main class should I use to start jetty via jnlp?
Which parameter could I use to configure jetty to say this is war of webapp1 and this is war of webapp2.... or this is directory of weapps for hot deployment...?
The important question for me is 1. If this is answered so that I could run jetty local (without maven plugin) and via manual maybe I could solve the rest 2-4.
Why not deploy a normal Java app (with a main() etc.) that invokes Jetty programatically via its Server class? That class is configured via code with the appropriate contexts, servlet classes etc.
I've done that before with success. The only headache is running one Jetty with multiple apps being downloaded on request (if I read your question correctly). Can you use some classloading magic, and load classes/apps on demand from a remote URL ?
I have found another way today. This is interesting too. Here is the concept:
Use java webstart to install an osgi container
Use a bundle x or a osgi service to download all bundles of your app
Use the jetty bundle to provide jetty support
Then the application is installed
I got the idea from this article:
http://www.toedter.com/blog/?p=45
I deployed webservice written in .net language through IIS from my local machine,Is there any possible way to access remote HTTP server which contain different OS and different technologies
Sorry for being confused, but can you define:
different OS and different
technologies
Do you mean deploy your webservice to another host or
Do you mean consume a webservice from another host?
Option 1
If the host is not running IIS/ASP.NET I think you are going to have some issues as Mono may not run what your code base requires.
But you could try the following:
publish your site to a folder
zip up that folder
scp/ftp/upload this zip to the remote server
unzip the files (or upload individual files/folder) to directory configured by IIS Management
try to run
Option 2
You need to use either the svcutil tool to create the proxy clients to consume that webservice or you use the Add Web Reference in Visual Studio to automate this for you.
Hope this answers your requirements. Update your question with more information for the community to offer more support.
I think that is one of the main things that web services are for.
I need to deploy an old style .asmx asp.net web service (not WCF) on a windows 7 machine for test reasons. However it seems that just deploying it on a virtual directory or new web site on IIS won't cut like it used to back in xp.
What should I do? I need to test the service locally prior to deploying it, and so far it's giving me a hard time.
Any help will be greatly appreciated
Thanks
Deploying to a Virtual Directory should work just like it did in XP...with one minor change.
The default behavior in IIS7 is to use 'Integrated' Managed Pipeline Mode for your Application Pools. More than likely, you just need to change that to 'Classic' Managed Pipeline Mode (or switch your Web Service over to use the built-in 'Classic ASP.NET' App Pool).