felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caspar MacRae <ear...@gmail.com>
Subject Re: Deploying war in felix, no errors but web context path doesn't work
Date Fri, 13 Apr 2012 12:39:25 GMT
Hi,

You must put a leading slash:   /gui

HTH,
Caspar

2012/4/13 Jesús García Sáez <blaxter@gmail.com>

> Hi,
>
> this is my first attempt in osgi world. I've been trying to deploy a
> war file (exactly a gwt hello world app) but no luck so far.
>
> I've been using mvn to generate a war file osgi-compatible (or at
> least I think it is). After that I run felix, install the generated
> war, and start the new bundle installed. No errors are shown but if I
> try to access to the context path I get 404 error. My generated
> MANIFEST.MF is:
>
> Manifest-Version: 1.0
> Archiver-Version: Plexus Archiver
> Created-By: Apache Maven Bundle Plugin
> Built-By: blaxter
> Build-Jdk: 1.6.0_26
> Bnd-LastModified: 1334310016750
> Bundle-ClassPath: WEB-INF/classes,.,WEB-INF/classes,WEB-INF/lib/gwt-se
>  rvlet-2.4.0.jar,WEB-INF/lib/org.osgi.compendium-1.4.0.jar,WEB-INF/lib
>  /org.osgi.core-1.4.0.jar,WEB-INF/lib/javax.servlet-1.0.0.jar,WEB-INF/
>  lib/org.osgi.foundation-1.2.0.jar
> Bundle-ManifestVersion: 2
> Bundle-Name: GWT Maven Archetype
> Bundle-SymbolicName: example
> Bundle-Version: 1.0.0.SNAPSHOT
> Embed-Dependency: *;scope=compile|runtime
> Embed-Directory: WEB-INF/lib
> Embed-Transitive: true
> Embedded-Artifacts: WEB-INF/lib/gwt-servlet-2.4.0.jar;g="com.google.gw
>  t";a="gwt-servlet";v="2.4.0",WEB-INF/lib/org.osgi.compendium-1.4.0.ja
>  r;g="org.apache.felix";a="org.osgi.compendium";v="1.4.0",WEB-INF/lib/
>  org.osgi.core-1.4.0.jar;g="org.apache.felix";a="org.osgi.core";v="1.4
>  .0",WEB-INF/lib/javax.servlet-1.0.0.jar;g="org.apache.felix";a="javax
>  .servlet";v="1.0.0",WEB-INF/lib/org.osgi.foundation-1.2.0.jar;g="org.
>  apache.felix";a="org.osgi.foundation";v="1.2.0"
> Export-Package: com.company.client;uses:="com.company.shared";version=
>  "1.0.0.SNAPSHOT",com.company.server;uses:="com.company.client,com.com
>  pany.shared";version="1.0.0.SNAPSHOT",com.company.shared;version="1.0
>  .0.SNAPSHOT"
> Import-Package: com.google.gwt.benchmarks;resolution:=optional,com.goo
>  gle.gwt.core.ext;resolution:=optional,com.google.gwt.core.ext.linker;
>  resolution:=optional,com.google.gwt.core.ext.typeinfo;resolution:=opt
>  ional,com.google.gwt.core.linker;resolution:=optional,com.google.gwt.
>  dev.cfg;resolution:=optional,com.google.gwt.dev.jjs;resolution:=optio
>  nal,com.google.gwt.dev.resource;resolution:=optional,com.google.gwt.d
>  ev.util.collect;resolution:=optional,com.google.gwt.dev.util.log;reso
>  lution:=optional,com.google.gwt.dev.util.log.speedtracer;resolution:=
>  optional,com.google.gwt.i18n.rebind.keygen;resolution:=optional,com.g
>  oogle.gwt.json.client;resolution:=optional,com.google.gwt.junit;resol
>  ution:=optional,com.google.gwt.lang;resolution:=optional,com.google.g
>  wt.thirdparty.guava.common.base;resolution:=optional,com.google.gwt.t
>  hirdparty.streamhtmlparser;resolution:=optional,com.google.gwt.uibind
>  er.rebind;resolution:=optional,com.google.gwt.uibinder.rebind.message
>  s;resolution:=optional,com.google.gwt.uibinder.rebind.model;resolutio
>  n:=optional,com.google.gwt.user.rebind;resolution:=optional,com.googl
>  e.gwt.user.rebind.rpc;resolution:=optional,com.google.gwt.util.tools;
>  resolution:=optional,javax.annotation.processing;resolution:=optional
>  ,javax.imageio;resolution:=optional,javax.imageio.metadata;resolution
>  :=optional,javax.imageio.stream;resolution:=optional,javax.lang.model
>  ;resolution:=optional,javax.lang.model.element;resolution:=optional,j
>  avax.lang.model.type;resolution:=optional,javax.lang.model.util;resol
>  ution:=optional,javax.security.auth.x500;resolution:=optional,javax.t
>  ools;resolution:=optional,javax.validation.bootstrap;resolution:=opti
>  onal,javax.validation.constraints;resolution:=optional,javax.validati
>  on.groups;resolution:=optional,javax.validation.metadata;resolution:=
>  optional,javax.validation.spi;resolution:=optional,javax.xml.parsers;
>  resolution:=optional,junit.framework;resolution:=optional,org.json;re
>  solution:=optional,org.w3c.css.sac;resolution:=optional,org.w3c.dom;r
>  esolution:=optional,org.w3c.flute.parser;resolution:=optional,sun.mis
>  c;resolution:=optional
> Tool: Bnd-1.50.0
> Web-ContextPath: gui
> Webapp-Context: gui
>
>
> And the web.xml is pretty simple:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE web-app
>    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>    "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>  <servlet>
>    <servlet-name>greetServlet</servlet-name>
>    <servlet-class>com.company.server.GreetingServiceImpl</servlet-class>
>  </servlet>
>
>  <servlet-mapping>
>    <servlet-name>greetServlet</servlet-name>
>    <url-pattern>/foobar/greet</url-pattern>
>  </servlet-mapping>
>
>  <welcome-file-list>
>    <welcome-file>foobar.html</welcome-file>
>  </welcome-file-list>
> </web-app>
>
> Once the bundle is running in felix console I can see it in a "lb" command
>   ...
>   47|Active     |    1|GWT Maven Archetype (1.0.0.SNAPSHOT)
>   ...
>
> I've read a lot of blog post about this topic (war files in felix) and
> the only explication to me is I have something wrong in my felix
> instance, "something" without configure.
> I have a github repo with all this [0] but it's a simple hello world.
> Any help would be appreciate, thanks!
>
>
> [0] https://github.com/blaxter/gwt-osgi-example
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message