Hi Rommain. Thanks for report it.
2013/5/22 Romain Manni-Bucau <[email protected]> > FYI https://issues.apache.org/jira/browse/MYFACES-3726 > > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* > > > > 2013/5/22 Romain Manni-Bucau <[email protected]> > > > that's a MyFaces issue, i didn't check all place but > > basically > org.apache.myfaces.shared.application.DefaultViewHandlerSupport#calculateActionURL > > doesn't care if context is "/" and always prefixes the url by the context > > (so you get //index.xhtml instead of /index.xhtml which induces the > > behavior you get) > > > > i think there is another place where it is done > > > > i'll open a jira about it > > > > *Romain Manni-Bucau* > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > *Github: https://github.com/rmannibucau* > > > > > > > > 2013/5/22 José Luis Cetina <[email protected]> > > > >> Here you have a simple example with the error: > >> https://github.com/maxtorzito/tomee-codi.git > >> > >> You can just package using the pom.xml and then mvn tomee:run on > >> ear-codi-ear/pom.xml > >> > >> Open your browser and type: localhost:8080/ then you can follow the > >> instructions in the page. > >> > >> Please let me know if have any trouble or questions. > >> Thanks @Rommain > >> > >> > >> 2013/5/21 José Luis Cetina <[email protected]> > >> > >> > @Rommain, im creating a simple ear project for do this more easy to > >> test. > >> > I will notify here when its done. > >> > > >> > Thanks. > >> > > >> > > >> > 2013/5/21 Romain Manni-Bucau <[email protected]> > >> > > >> >> Shouldnt be mandatory at all. > >> >> > >> >> @José: if you handle to reproduce it on github with a simple mvn > >> package; > >> >> mvn tomee:run -N; Ill try to look soon > >> >> Le 21 mai 2013 23:01, "Helge Waastad" <[email protected]> a écrit : > >> >> > >> >> > I might be wrong, > >> >> > But if you're making your wars skinny you probably have to make > sure > >> the > >> >> > META-INF are correct. > >> >> > > >> >> > PS, had som issues with the source level on your shared library. > 1.6 > >> >> > should work by adding maven compiler plugin. > >> >> > > >> >> > Anyhow, I can guarantee that codi works on tomee 1.6.0-SNAPSHOT > Plus > >> >> > using skinny wars. > >> >> > > >> >> > -- > >> >> > plugin> > >> >> > <artifactId>maven-war-plugin</artifactId> > >> >> > <configuration> > >> >> > > >> >> > <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes> > >> >> > <archive> > >> >> > <manifest> > >> >> > > <addClasspath>true</addClasspath> > >> >> > > >> >> > <classpathPrefix>lib/</classpathPrefix> > >> >> > </manifest> > >> >> > </archive> > >> >> > </configuration> > >> >> > </plugin> > >> >> > -- > >> >> > > >> >> > br hw > >> >> > > >> >> > > >> >> > ti., 21.05.2013 kl. 13.27 -0500, skrev José Luis Cetina: > >> >> > > >> >> > > If i add the CODI dependencies to ear pom.xml and then mark as > >> >> provided > >> >> > the > >> >> > > CODI dependencies in each webapp then CODI stop working, the > >> >> managedbeans > >> >> > > annotated with @ViewAccessScoped (CODI annotation) never is > called. > >> >> > > > >> >> > > > >> >> > > 2013/5/21 José Luis Cetina <[email protected]> > >> >> > > > >> >> > > > Rommain, im doing tests, and i can confirm that the CODI > >> dependency > >> >> is > >> >> > the > >> >> > > > issue ( i dont know why) if you just comment or remove (you > will > >> not > >> >> > have > >> >> > > > compilation errors) the CODI dependencies in myenterprise-web2 > >> >> pom.xml > >> >> > > > (from line 38 to 62) the redirect do the expected behavior. > >> >> > > > > >> >> > > > Can you give a try with just removing CODI dependencies? > >> >> > > > Thanks. > >> >> > > > > >> >> > > > > >> >> > > > > >> >> > > > > >> >> > > > 2013/5/21 José Luis Cetina <[email protected]> > >> >> > > > > >> >> > > >> i could just remove the dependencies if you want > >> >> > > >> > >> >> > > >> > >> >> > > >> 2013/5/21 Romain Manni-Bucau <[email protected]> > >> >> > > >> > >> >> > > >>> Think youll need to do a sample with no dep to ease the issue > >> >> > research > >> >> > > >>> Le 21 mai 2013 19:23, "José Luis Cetina" < > [email protected]> > >> a > >> >> > écrit > >> >> > > >>> : > >> >> > > >>> > >> >> > > >>> > @John i had *.xhtml only but i add *.jsf for test your > >> >> > > >>> recommendation. I > >> >> > > >>> > only use *.xhtml. > >> >> > > >>> > > >> >> > > >>> > Rommain, yes it is on trunk. > >> >> > > >>> > > >> >> > > >>> > > >> >> > > >>> > 2013/5/21 Romain Manni-Bucau <[email protected]> > >> >> > > >>> > > >> >> > > >>> > > Hi > >> >> > > >>> > > > >> >> > > >>> > > Is it still on trunk? > >> >> > > >>> > > Le 21 mai 2013 19:15, "José Luis Cetina" < > >> >> [email protected]> > >> >> > a > >> >> > > >>> écrit > >> >> > > >>> > : > >> >> > > >>> > > > >> >> > > >>> > > > I will try now, but i have this mapping > >> >> > > >>> > > > > >> >> > > >>> > > > <servlet-mapping> > >> >> > > >>> > > > <servlet-name>Faces Servlet</servlet-name> > >> >> > > >>> > > > <url-pattern>*.xhtml</url-pattern> > >> >> > > >>> > > > </servlet-mapping> > >> >> > > >>> > > > > >> >> > > >>> > > > > >> >> > > >>> > > > 2013/5/21 John D. Ament <[email protected]> > >> >> > > >>> > > > > >> >> > > >>> > > > > Did you try swapping your form-login-page and > >> >> form-error-page > >> >> > > >>> from > >> >> > > >>> > > > > /foo.xhtml to /foo.jsf ? (or whatever you map the > faces > >> >> > servlet > >> >> > > >>> to) > >> >> > > >>> > > > > > >> >> > > >>> > > > > > >> >> > > >>> > > > > On Tue, May 21, 2013 at 1:08 PM, José Luis Cetina < > >> >> > > >>> > > [email protected] > >> >> > > >>> > > > > >wrote: > >> >> > > >>> > > > > > >> >> > > >>> > > > > > Hi. I have a problem since i move from war to ear > >> >> (since 4 > >> >> > > >>> months > >> >> > > >>> > ago > >> >> > > >>> > > > > > aprox.), but i didn't have any chance to report it. > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > I have a security constraint with a based-form > >> login, i > >> >> > have > >> >> > > >>> > defined > >> >> > > >>> > > my > >> >> > > >>> > > > > > form-login-page to an xhtml let say a login.xhtml, > >> but > >> >> when > >> >> > > >>> > somebody > >> >> > > >>> > > > > tries > >> >> > > >>> > > > > > to access to private content without be login, the > >> >> > redirect of > >> >> > > >>> the > >> >> > > >>> > > > > > form-login-page is wrong, i mean tomee try to > >> redirect > >> >> to > >> >> > > >>> > > > > > http://login.xhtmlinstead of > >> >> > > >>> > > > > > http://myexampleurl.com/login.xhtml > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > Here is the part of my web.xml > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > <security-constraint> > >> >> > > >>> > > > > > > >> >> > <display-name>PRIVATE_CONTENT_CONSTRAINT</display-name> > >> >> > > >>> > > > > > <web-resource-collection> > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > > >> >> > > >>> > >> <web-resource-name>PRIVATE_CONTENT_CONSTRAINT</web-resource-name> > >> >> > > >>> > > > > > <url-pattern>/private/*</url-pattern> > >> >> > > >>> > > > > > </web-resource-collection> > >> >> > > >>> > > > > > <auth-constraint> > >> >> > > >>> > > > > > <description/> > >> >> > > >>> > > > > > <role-name>tomee-admin</role-name> > >> >> > > >>> > > > > > <role-name>manager-gui</role-name> > >> >> > > >>> > > > > > <role-name>manager-script</role-name> > >> >> > > >>> > > > > > </auth-constraint> > >> >> > > >>> > > > > > </security-constraint> > >> >> > > >>> > > > > > <login-config> > >> >> > > >>> > > > > > <auth-method>FORM</auth-method> > >> >> > > >>> > > > > > <form-login-config> > >> >> > > >>> > > > > > > >> >> <form-login-page>/index.xhtml</form-login-page> > >> >> > > >>> > > > > > > >> >> <form-error-page>/index.xhtml</form-error-page> > >> >> > > >>> > > > > > </form-login-config> > >> >> > > >>> > > > > > </login-config> > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > I could reproduce this behavior easily in this > github > >> >> > project > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > https://github.com/maxtorzito/tomee > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > For use, clean and install from parent project > >> pom.xml, > >> >> > then > >> >> > > >>> tomee > >> >> > > >>> > > run > >> >> > > >>> > > > > from > >> >> > > >>> > > > > > ear's pom.xml > >> >> > > >>> > > > > > then access to mymailing2.com:8080 (dont forget to > >> add > >> >> > this in > >> >> > > >>> > your > >> >> > > >>> > > > > > /etc/hosts) then you will > >> >> > > >>> > > > > > see 1 link and 2 buttons. First try to access to > the > >> >> > private > >> >> > > >>> > content > >> >> > > >>> > > > > using > >> >> > > >>> > > > > > the link (a href) you will see what i report here, > >> tomee > >> >> > tries > >> >> > > >>> to > >> >> > > >>> > > > > redirect > >> >> > > >>> > > > > > the relative path like absolute path. > >> >> > > >>> > > > > > If you login an then try to access to the "private > >> >> content" > >> >> > > >>> > > everything > >> >> > > >>> > > > is > >> >> > > >>> > > > > > fine. The problem is "just" the redirect. > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > The github project run with tomee plugin, you only > >> have > >> >> to > >> >> > add > >> >> > > >>> the > >> >> > > >>> > > host > >> >> > > >>> > > > > to > >> >> > > >>> > > > > > your hosts file. > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > After this i will report, in other thread a CODI > >> issue > >> >> > using > >> >> > > >>> > > @InitView > >> >> > > >>> > > > > > annotation. > >> >> > > >>> > > > > > > >> >> > > >>> > > > > > >> >> > > >>> > > > > >> >> > > >>> > > > > >> >> > > >>> > > > > >> >> > > >>> > > > -- > >> >> > > >>> > > > > >> >> > ------------------------------------------------------------------- > >> >> > > >>> > > > *SCJA. José Luis Cetina* > >> >> > > >>> > > > > >> >> > ------------------------------------------------------------------- > >> >> > > >>> > > > > >> >> > > >>> > > > >> >> > > >>> > > >> >> > > >>> > > >> >> > > >>> > > >> >> > > >>> > -- > >> >> > > >>> > > >> >> ------------------------------------------------------------------- > >> >> > > >>> > *SCJA. José Luis Cetina* > >> >> > > >>> > > >> >> ------------------------------------------------------------------- > >> >> > > >>> > > >> >> > > >>> > >> >> > > >> > >> >> > > >> > >> >> > > >> > >> >> > > >> -- > >> >> > > >> > >> ------------------------------------------------------------------- > >> >> > > >> *SCJA. José Luis Cetina* > >> >> > > >> > >> ------------------------------------------------------------------- > >> >> > > >> > >> >> > > > > >> >> > > > > >> >> > > > > >> >> > > > -- > >> >> > > > > >> ------------------------------------------------------------------- > >> >> > > > *SCJA. José Luis Cetina* > >> >> > > > > >> ------------------------------------------------------------------- > >> >> > > > > >> >> > > > >> >> > > > >> >> > > > >> >> > > >> >> > > >> >> > > >> >> > >> > > >> > > >> > > >> > -- > >> > ------------------------------------------------------------------- > >> > *SCJA. José Luis Cetina* > >> > ------------------------------------------------------------------- > >> > > >> > >> > >> > >> -- > >> ------------------------------------------------------------------- > >> *SCJA. José Luis Cetina* > >> ------------------------------------------------------------------- > >> > > > > > -- ------------------------------------------------------------------- *SCJA. José Luis Cetina* -------------------------------------------------------------------
