So I am playing a little bit with the struts2 features and try to integrate them in little example projects. I also use Maven because it is a nice feature to make depencies. But I don't know why my Application doesn't work.
OGNL 3 has a javassist dependency; if you search this forum you'll see another discussion about this exact topic. One of the POMs (I forget which) declares it as a provided resource or something... I forget what I was told when I asked another S2 dev about this.
So finally did it. After one whole day...crap! (now I will dream of tiles definitions and struts2 )
My error was that I must not load a template file (layout.jsp) as a welcome site (at first).
Another thing what I found out was when you build a struts2-tiles webapp that you have to depend on javassist even when you use ognl 3.0!
My solution was to create an index.jsp which I declared as my welcome site which immediatly redirects to my SayHelloAction, which then loads the template file:
When anybody needs my working version (also in .war available) than contact me: zeiler.matthias(at)gmx.at
David Newton wrote:OGNL 3 has a javassist dependency; if you search this forum you'll see another discussion about this exact topic. One of the POMs (I forget which) declares it as a provided resource or something... I forget what I was told when I asked another S2 dev about this.
I had to declare it as "compile", because only "provided" had not implemented it. I don't know if that is a bug, and also don't think it is logic, since "provided" implements the depency when it doesn't exist?
That's why I said OGNL 3 has a dependency on Javassist. "Provided" means that it's assumed the dependency will exist at runtime--it's not necessary at compile time, since you're not compiling OGNL itself.
Actually, I mis-spoke--I don't know if OGNL has a compile-time dependency on jassist, but I *do* know it has a run-time dependency. I forget which pom it is, but one of them assumes javassist will be provided at run-time. Not sure about compile time.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop