Peter A. Pilgrim wrote:
Well that ok because I am now official on holiday (vacation ;-)

As am I :)  I have plenty of work to do at home though!

Ok that makes sense then. Maybe when people switch Maven 2 then this
dependency issues can be worked out.

Maybe. I know *I* won't be switching to Maven any time soon, 1 *or* 2. Ant still serves my purposes just fine (did you notice the dependencies task in the JWP script? Ironic that it uses the Maven repository!)

Even with Maven, it would still be an external dependency though... if someone uses JWP in their project, they would still need to know that they need Commons Lang and Commons BeanUtils and so on, even if they are simply going to specify it in their Maven config and forget about it. I prefer not having those dependencies at all, hence the reason they got rolled in.

In order to build the type suggestion, what are the correct jars
to include. I thought it was ``javawebparts_core.jar'' and ``javawebparts_taglibs.jar''. Now I get a strange deployment error like Error: Could not load asds: weblogic.servlet.jsp.JspException: (line 6): Error in using tag library uri='/tags/javawebparts_ajaxtags.tld' prefix='ajax': cannot find tag class: 'javawebparts.taglib.ajaxtags.AjaxEventTag'



I downloaded the 1.0 beta release version. I found that the binary
release included *.class in the javawebparts_taglib.jar file.
Also, I checked the javawebparts_core.jar file. This was fine.

I think there is problem with the `make_jars' in the ant build. I found
that running that ant target (re-)created all the jars, but the `javawebparts_taglib.jar' contained only the TLD and Manifest.mf. Weird.

Not really weird I think, and this is actually a point Tamas, one of the other JWP developers, has been making to me... the Ant targets are not completely independent. What I mean is, the script should always just be executed by executing Ant with no target specification. You control what targets are executed by altering the build.properties file. I've always preferred it this way because it seems more programming-like to me, and you never have to worry about what targets you need to execute from the command line (us non-IDE guys like this because we can just point to a new directory in our macros and that's it). Tamas has been trying to convince me that this is atypical and maybe should be changed. He may be right! :)

However, in this case, I don't think it would have mattered anyway... if you haven't executed the compile target, then executing make_jar should result in exactly what you saw because there are no class files to include.

I am trying to add javawebparts to the current Struts project for my client at work. I am truying add to auto completion (Google Suggest) for a couple administration screen in the application. I followed the instructions in the JavaDoc for the taglib. Unfortunately I could not deploy the application to Weblogic because somehow the taglibs were not being found. Somehow the project does not find the Javawebparts classes at all. I tried various things yesterday like playing around with the URI. Making sure that it was maps a taglib in the web.xml. I checked the build WAR that both libraries javawebparts_{taglib,core}.jar were being included in WEB-INF/lib.

My only other suggestion would be to pull the TLD from the JAR and put it in WEB-INF and updated the definition on the page accordingly. That *should* eliminate any possible classloader/classpath problems. Then again, maybe not, since it looks like its the *class* that isn't being found. That I definitely don't understand. If you've checked the JAR yourself and the class is there, and is in the correct package structure, it's pretty clearly a classpath issue like your thinking it might be already.

Away from work I think this is classpath issue of some time. I bet
I have to set up the libraries in EAR as well, because of something
I found unusual in WebLogic 8.1 that my client uses. In Weblogic
that EAR classloader takes precedence over the WAR classloader.
So if there is class dependency in javawebparts that requires
a JAR loaded in the EAR classloader, then it fail of course.

Hehe... we're a Websphere shop... if you want to compare classloader issues, I guarantee you'll lose :) Websphere has got to have the most complex classloader in history. I can't tell you how many times we've had to mess with things like your describing. I have a situation now, probably not a classloader issue but still, where Websphere won't let me use JSTL and is complaining about no more tag prefix room available. Very annoying.

The other weird thing, at work I use MyEclipse 4.0 and Eclipse 3.1 and
MyEclipse could not recognise the <ajax:event> or <ajax:enable> custom tags and it flagged them as unknown tags. The Struts tags are unknown.
This should have been a big clue to me, that something was wrong.
MyEclipse is normally very good at picking up any custom TLD. However it just underlinedin yellow any <ajax:*> tags. Crap, I dont know what is wrong until I get back to work in January 2006.

Please do let me know what you find... if its something I can fix I definitely want to do so. I can tell you I have successfully used AjaxTags in a number of projects running on Tomcat, and have also used it in Resin and Websphere, and I know some others who have run it on those app servers as well. I don't know anyone who has used it in Weblogic, and I don't use an IDE so I can't say anything about the Eclipse problems... I haven't heard any similar complaints though.

Frank, Could you check your distribution release is correct in the meantime? Could you write a very simple HOWTO and how to incorporate
AjaxTags with Struts?

I just checked the 1.0beta1 distro and it looks good. The taglib jar has all the required files and they are all in the correct directory structure. FYI, I'm writing an app right now using the latest AjaxTags, and it is working as expected (under Tomcat though).

As for using it with Struts, it's no different than using it outside Struts... the version of AjaxTags in JWP is completely framework-agnostic. The only thing to be aware of that I can think of is if you have event handlers on your tags and you then add an AjaxTags event to it, your event handlers will be overwritten. This would break things like client-side validation. Other than that, it shouldn't matter if your using Struts or not, the steps defined in the documentation now would be exactly the same.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to