I have deployed a standard war file as an osgi bundle into equinox using bnd to create a war bundle. Whilst it deploys ok and I can run the app, I cannot see any images or css files. I have deployed catalina-start as an osgi bundle and am using spring-web-extender as the bridge. The image/css files are located at the root of the war file
root
|_images
|_css
|_META-INF
|_WEB-INF
I have seen others deploy images and css files in fragment bundles, but I would have thought this should just work.
Any help appreciated.
As alternative, you can try Eclipse Jetty Web engine 7.x [1] that was redesigned to support OSGi Web Application Bundles (OSGi Enterprise 4.2:128). I use Jetty and do not have any problems with WAR static resources (images, scripts etc.)
[1] - http://eclipse.org/jetty/
Regards,
Dmytro
Related
I can't see my WAR file in webapps folder of my Tomcat server directory.
My project is portal project and I am using Liferay portal technology hosted on Tomcat server.
For deploying, I am using Maven configured goal name 'deploy'.
When I deploy the portlet module it generated the war file and I can see the file in deploy folder of my Liferay server but when I start the tomcat server it should ideally generate/move WAR file in 'webapps' folder of tomcat server directory but it is not doing that.
I have tried multiple options like deleting and re-configuring the server, setting Dynamic web-module version to 3.0 from 2.5 (as suggested in one of the post at StackOverflow) but nothing works for me.
I am stuck in this issue for long time and any help will be a great help..
Thanks
I'm assuming that you're using Liferay 7 or Liferay DXP. As these versions are built on OSGi, they're transforming the WAR files into an OSGi bundle (so called WAB, Web Application Bundle) and do not deploy them to tomcat, as you observe.
Prior versions did this, but not the current one.
As you don't state what else you'd expect: This is your answer - you're right, it's not there.
If you don't use Liferay 7 or DXP: Elaborate.
I am learning how to create portlets on Liferay 7 CE GA 3 portal platform.
For this, I created few test portlets using maven, gradle, by following the tutorials given in liferay site.
But now, I need to remove those portlets from the server. Whenever I start the tomcat server given inside Liferay's bundle, those previously deployed portlets comes up on the web page. I have tried but I can't find the war files deployed inside tomcat, in order to delete them.
I tried deleting the portlets folder inside work directory of liferay and also clearing the temp directory, but that didn't helped.
PS: I was manually deploying the portlets by copying the war file to 'deploy' directory of liferay bundle.
I'm using Liferay 7.0 DXP bundled with tomcat 8.
I tried deleting/deactivating deployed modules from Control Panel using Admin credentials. That just worked for me in that instance, but If I restart the server again these modules were deployed on the server startup.
The below solution worked for me with the above-mentioned configurations.
{LIFERAY_HOME}/osgi/modules -- jar modules
{LIFERAY_HOME}/osgi/war -- war modules
{LIFERAY_HOME}/osgi/marketplace -- any .lpkg files that were downloaded from Liferay's Marketplace
As you don't state the version of Liferay that you're using:
In 6.x, you'll find the WAR files (or web applications) wherever your application server deploys them - e.g. in tomcat/webapps. You only need to undeploy them from Tomcat (or your appserver) and they will also be undeployed from Liferay.
In 7.0 and DXP, those files will be deployed to the OSGi runtime and the artifacts end up in Liferay's /osgi/ folder, most likely /osgi/war - or if you package as JAR bundles in /osgi/modules (otherwise search for known filenames in /osgi subdirectories
Go to Liferay Control panel -> App Manager -> Search 'Your portlet' and then uninstall in Liferay 7.4
After deploying Liferay war on WAS 7.0,
How to deploy any of the liferay plugins war?
I can deploy plugins war in a same way as I deployed Liferay portal war and it also shows that apllication is started and running but I can't see the portlet in Liferay's Add more option or any where.
Any Help is Appriciated.
Thanks.
You need to do it in two steps:
Copy the portlet WAR file into Liferay's autodeploy directory. Liferay will process the plugin configuration files and generate a new WAR into a destination directory.
Deploy this newly generated WAR using Websphere admin console.
The path where Liferay leaves the preprocessed WAR is configurable via the auto.deploy.* properties in the portal.properties file. Take a look there to see where to look for the file.
Hi can someone answer me how to deploy muleapp in tomcat?
I have packaged muleapp using Maven -mvn package war:war but before building and packaging it with Maven I had to manually add WEB-INF folder in muleapp cause the structure of muleapp is deferent to webapp.
is there any better way how to transform muleapp to webapp structure?
thank you so much in advance!!
Mule Application and Web Archive (WAR) are two different formats, and for this reason they are not interchangeable.
To create a web application that uses mule you should start from the maven war archetype and then following the instruction available here to configure your web.xml
Is it possible to have standard war deployment, which can be deployed on tomcat and also can be build as OSGi bundle and deployed with other bundles in OSGi container tomcat(i think virgo)?
Yes, there's a good deal of interoperability between WARs and WABs. Apache Aries and WebSphere Application Server will convert WARs to WABs on deployment. This is a good way to get up and running, but it's a better practice to use proper WABs in which you build in the OSGi metadata yourself. The extra OSGi headers won't interfere with the deployment in a normal Tomcat container, so the WAB has the greatest flexibility.
For your build, you have a number of options. For example, the maven bundle plugin can be configured to build WABs, or you can use Eclipse PDE's tooling support for OSGi metadata.
Pax-Url-War provides this functionality to containers like Apache Karaf. In brief, this allows you to import an URL like war:file:///path/to/myapp.war and Pax will wrap it as an OSGi bundle, optionally changing the URL root and other parameters on the fly.