RE: [OT] JavaWebParts and Struts / Ajax integration

2006-01-09 Thread Frank W. Zammetti
You know Peter, I think we've gotten away from Struts for the most part
here, and I'm not sure we should continue this discussion on this list,
probably isn't appropriate... if you aren't already, could you jump on the
JWP mailing list and repost this latest message there?  This would have
the additional benefit of getting in front of the other JWP developers'
eyes, and they may have some answers I don't :)

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

On Mon, January 9, 2006 4:03 am, Pilgrim, Peter said:

 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 Sent: 06 January 2006 18:49
 To: Struts Users Mailing List
 Cc: 'Struts Users Mailing List'
 Subject: RE: [OT] JavaWebParts and Struts / Ajax integration


 On Fri, January 6, 2006 1:27 pm, Pilgrim, Peter said:
  Me too. I developing on the old Service Pack 1 of WLS.
 Production has
  the latest SP4 and SP5 better. May be it was me, Eclipse,
 My Eclipse,
  and combination of all. Either way I rewrite tag library definitions
  in web.xml and my JSP by hand, just to make sure I wasn't
 going crazy!

 Usually its Websphere driving me nuts like that :)

  Actually I forgot to saw that the JSP page itself is
  `/asds/secured/showContactDetails.jsp'
  where `/asds' is the context root.

 Hmm... the target should match whatever the mapping for the
 servlet is...
 which I *think* is just typeAheadSuggestions... I'll have to try and
 replicate what your seeing because it seems like it should be
 working.
 Does the sample webapp work as-is (after you change the TLD)?

 The sample webapp, both cookbook examples worked in WebLogic
 without alteration. I just had to wrap everything in a WAR file
 myself and then custom deploy to WebLogic Server using the
 administration console.


  I thought of that before heading home, but I wanted to wait
 for response,
  because what I would really need is access the `contextRoot' as
  a variable. I could write something like this
 
  target%contextPath%/typeAheadSuggestions/target

 Yeah, that definitely won't work.  IIRC, *not* having a
 leading slash will
 *almost* in effect do what you want though, calculate it
 relative to the
 location of the requesting resource (which is I think what
 your seeing).
 How about this... change the servlet mapping to
 secure/typeAheadSuggestions.


 Yes that will work. But it will only work for pages under `secure/*',
 won't it? If you want to use the same servlet under a different
 page directory just for the sake of file organisation, then
 we are stumped here.


 So I think you need to modify the ajax part to
 either allow keyword token substitution or specify another
 target resource beginning with / is made context relative.


  ... ( No it does not work) Sorry
 
  127.0.0.1 - auth1 [06/Jan/2006:18:21:41 +] GET
  /typeAheadSuggestions?enteredText=xassureUnique=1
 HTTP/1.1 404 1214
  127.0.0.1 - auth1 [06/Jan/2006:18:21:44 +] GET
  /typeAheadSuggestions?enteredText=xaassureUnique=2
 HTTP/1.1 404 1214

 Yeah, that confirms what I said above... you will need to not have the
 leading slash, which will cause it to be calculated relative to the
 requesting resource, so if you change the servlet mapping to match it
 should work.  I'm not sure that is the most convenient answer, but it
 looks like things are actually doing what they are supposed to, so it
 might be the right answer.

  The ajax submission is now missing the context path completely.
  Can you cut a release of the javawebparts to fix the bug or
 tell me where
  I can patch it please.

 Give that a shot first... I don't think this is really a bug
 in AjaxTags,
 although it might be something of an enhancement (i.e., maybe add some
 attribute to the target element to tell how you want the URL to be
 calculated: contextRelative, resourceRelative or absolute).


 That would be better. Keyword sustitution might be a good thing here.
 For example you can do this with these keywords

 (1)
   %context%
   %hostname%
   %port%
   %servletPath%
   %requestPath%

 Or maybe allow JSF or Spring kind of interface that allows
 pluggable variable resolution. E.g provide a default resolver
 ``DefaultAjaxPartTargetVariableResolver''
 that does (1) that conforms to ``IAjaxPartTargetVariableResolver''
 interface but allow others to override with a plug in point.

 In some type of initialisation servlet

   AjaxParts.getInstance( request /*HttpServletRequest*/
 ).setTargetVariableResolver( new MyCustomVariableResolver() )


  How do you discern in the Servlet what field is being query?

 Hmm, good one, you got me!  That's *definitely* an enhancement
 across-the-board, you *should* get at least the ajaxRef passed in with
 every AJAX request, and at least for the standard handlers I
 can add that.

 For now, what I think you can do, although I haven't tried
 it, is add a
 parameter

RE: [OT] JavaWebParts and Struts / Ajax integration

2006-01-06 Thread Pilgrim, Peter

Hi Frank 


 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
==== 
 
 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!
 

I am back from vacation, and I solved the issue with taglibs. I had to
downgrade the taglib DTD version from 1.2 to 1.1 for some reason,
and the application deployed to WebLogic 8.1

I have a couple of questons. I am getting a 404 because the target URL
in the Ajax JavaScript is wrong. How do I set the right target and make
it context relative? E.g. the web context is `asds'

Weblogic access.log

127.0.0.1 - auth1 [06/Jan/2006:17:26:12 +] GET 
/asds/secured/typeAheadSuggestions?enteredText=peassureUnique=2 HTTP/1.1 404 
14169 
127.0.0.1 - auth1 [06/Jan/2006:17:26:15 +] GET 
/asds/secured/typeAheadSuggestions?enteredText=petassureUnique=3 HTTP/1.1 404 
14169 
127.0.0.1 - auth1 [06/Jan/2006:17:26:18 +] GET 
/asds/secured/typeAheadSuggestions?enteredText=peteassureUnique=4 HTTP/1.1 
404 14169 


My ajax_config.xml is

ajaxConfig
  !-- Define a single form. --
form ajaxRef=ContactDetailsForm
  !-- Only the textbox is Ajax-enabled. --
element ajaxRef=enteredTextChange
  !-- Any time a key is pressed (released actually), fire an event. --
event type=onkeyup
  !-- Just going to submit a simple query string with a single --
  !-- parameter, enteredText, that will take the value of the --
  !-- enteredTextbox element of the form. --
requestHandler type=std:QueryString method=get
targettypeAheadSuggestions/target

parameterenteredText=search.contact.contactName/parameter
/requestHandler
!-- When we get back, just insert the returned results into 
the --
!-- div named suggestions on the page, which contains the --
!-- matching suggestions. --
responseHandler type=std:InnerHTML

parametersearch_contact_contactName_suggestions/parameter
/responseHandler
/event
/element
/form
/ajaxConfig

Assuming I get this working for one control. How do expand this example so that
it support multiple fields submit to the same suggestion servlet?

Thanks in advance

  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.
 

====

--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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



RE: [OT] JavaWebParts and Struts / Ajax integration

2006-01-06 Thread Frank W. Zammetti
On Fri, January 6, 2006 12:41 pm, Pilgrim, Peter said:
 I am back from vacation, and I solved the issue with taglibs. I had to
 downgrade the taglib DTD version from 1.2 to 1.1 for some reason,
 and the application deployed to WebLogic 8.1

Hmm, weird.  Ok, well, it's a solution :)

 I have a couple of questons. I am getting a 404 because the target URL
 in the Ajax JavaScript is wrong. How do I set the right target and make
 it context relative? E.g. the web context is `asds'

Looking at the access log, I'm not clear as to what's wrong... is it the
/secured/ portion that you don't expect to see?  If the context is asds,
then I would expect to see /asds/typeAheadSuggestions, is that your
expectation as well?  I don't want to put forth any answer until I hear
your answer to that, just so I know we're trying to get to the same place
:)

Actually, I guess I will take a stab at it first... try putting a leading
slash before the target URL?

 Assuming I get this working for one control. How do expand this example so
 that
 it support multiple fields submit to the same suggestion servlet?

You should just need to create an entry for the other fields in the config
file and throw an ajax:event tag after them... just point them all at
the same target URL, it should work fine.  Should be as easy as copying
the config that is there now and changing the element's ajaxRef.

 Thanks in advance


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



RE: [OT] JavaWebParts and Struts / Ajax integration

2006-01-06 Thread Pilgrim, Peter

 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 Sent: 06 January 2006 18:03
 To: Struts Users Mailing List
 Cc: 'Struts Users Mailing List'
 Subject: RE: [OT] JavaWebParts and Struts / Ajax integration
 
 
 On Fri, January 6, 2006 12:41 pm, Pilgrim, Peter said:
  I am back from vacation, and I solved the issue with 
 taglibs. I had to
  downgrade the taglib DTD version from 1.2 to 1.1 for some reason,
  and the application deployed to WebLogic 8.1
 
 Hmm, weird.  Ok, well, it's a solution :)
 

Me too. I developing on the old Service Pack 1 of WLS. Production has 
the latest SP4 and SP5 better. May be it was me, Eclipse, My Eclipse,
and combination of all. Either way I rewrite tag library definitions
in web.xml and my JSP by hand, just to make sure I wasn't going crazy!

  I have a couple of questons. I am getting a 404 because the 
 target URL
  in the Ajax JavaScript is wrong. How do I set the right 
 target and make
  it context relative? E.g. the web context is `asds'
 
 Looking at the access log, I'm not clear as to what's 
 wrong... is it the
 /secured/ portion that you don't expect to see?  If the 
 context is asds,
 then I would expect to see /asds/typeAheadSuggestions, is that your
 expectation as well?  I don't want to put forth any answer 
 until I hear
 your answer to that, just so I know we're trying to get to 
 the same place
 :)

Actually I forgot to saw that the JSP page itself is 
`/asds/secured/showContactDetails.jsp'
where `/asds' is the context root. 

 
 Actually, I guess I will take a stab at it first... try 
 putting a leading
 slash before the target URL?
 

I thought of that before heading home, but I wanted to wait for response,
because what I would really need is access the `contextRoot' as
a variable. I could write something like this

target%contextPath%/typeAheadSuggestions/target

But I will give it shot now and see what happens 

requestHandler type=std:QueryString method=get
target/typeAheadSuggestions/target

parameterenteredText=search.contact.contactName/parameter
/requestHandler

... ( No it does not work) Sorry 

127.0.0.1 - auth1 [06/Jan/2006:18:21:41 +] GET 
/typeAheadSuggestions?enteredText=xassureUnique=1 HTTP/1.1 404 1214 
127.0.0.1 - auth1 [06/Jan/2006:18:21:44 +] GET 
/typeAheadSuggestions?enteredText=xaassureUnique=2 HTTP/1.1 404 1214 

The ajax submission is now missing the context path completely.
Can you cut a release of the javawebparts to fix the bug or tell me where
I can patch it please.

  Assuming I get this working for one control. How do expand 
 this example so
  that
  it support multiple fields submit to the same suggestion servlet?
 
 You should just need to create an entry for the other fields 
 in the config
 file and throw an ajax:event tag after them... just point 
 them all at
 the same target URL, it should work fine.  Should be as easy 
 as copying
 the config that is there now and changing the element's ajaxRef.
 

How do you discern in the Servlet what field is being query?

I had a look at the source of the page, there is a JavaScript
variable called `debugAjax'. Is there anywhere to switch on or off
via the javawebparts custom tags? I looked at ajax:enable/, but
the tag description says it an empty tag. You might want to allow
this feature.

  Thanks in advance
 

This is where I pause for the weekend in London.  *PAUSE*


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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



RE: [OT] JavaWebParts and Struts / Ajax integration

2006-01-06 Thread Frank W. Zammetti
On Fri, January 6, 2006 1:27 pm, Pilgrim, Peter said:
 Me too. I developing on the old Service Pack 1 of WLS. Production has
 the latest SP4 and SP5 better. May be it was me, Eclipse, My Eclipse,
 and combination of all. Either way I rewrite tag library definitions
 in web.xml and my JSP by hand, just to make sure I wasn't going crazy!

Usually its Websphere driving me nuts like that :)

 Actually I forgot to saw that the JSP page itself is
 `/asds/secured/showContactDetails.jsp'
 where `/asds' is the context root.

Hmm... the target should match whatever the mapping for the servlet is...
which I *think* is just typeAheadSuggestions... I'll have to try and
replicate what your seeing because it seems like it should be working. 
Does the sample webapp work as-is (after you change the TLD)?

 I thought of that before heading home, but I wanted to wait for response,
 because what I would really need is access the `contextRoot' as
 a variable. I could write something like this

 target%contextPath%/typeAheadSuggestions/target

Yeah, that definitely won't work.  IIRC, *not* having a leading slash will
*almost* in effect do what you want though, calculate it relative to the
location of the requesting resource (which is I think what your seeing). 
How about this... change the servlet mapping to
secure/typeAheadSuggestions.

 ... ( No it does not work) Sorry

 127.0.0.1 - auth1 [06/Jan/2006:18:21:41 +] GET
 /typeAheadSuggestions?enteredText=xassureUnique=1 HTTP/1.1 404 1214
 127.0.0.1 - auth1 [06/Jan/2006:18:21:44 +] GET
 /typeAheadSuggestions?enteredText=xaassureUnique=2 HTTP/1.1 404 1214

Yeah, that confirms what I said above... you will need to not have the
leading slash, which will cause it to be calculated relative to the
requesting resource, so if you change the servlet mapping to match it
should work.  I'm not sure that is the most convenient answer, but it
looks like things are actually doing what they are supposed to, so it
might be the right answer.

 The ajax submission is now missing the context path completely.
 Can you cut a release of the javawebparts to fix the bug or tell me where
 I can patch it please.

Give that a shot first... I don't think this is really a bug in AjaxTags,
although it might be something of an enhancement (i.e., maybe add some
attribute to the target element to tell how you want the URL to be
calculated: contextRelative, resourceRelative or absolute).

 How do you discern in the Servlet what field is being query?

Hmm, good one, you got me!  That's *definitely* an enhancement
across-the-board, you *should* get at least the ajaxRef passed in with
every AJAX request, and at least for the standard handlers I can add that.

For now, what I think you can do, although I haven't tried it, is add a
parameter to the target URL.  So, in the config file, for each element,
your target might be:

targettypeAheadSuggestions?field=1/target

...and so on.  Actually, I have a feeling that won't work... I don't think
the code in the request handler currently is smart enough to see that
there is already a query string (that's another definite enhancement).

The other alternative is to take the Javascript for the request handler
you are using and create your own custom handler based on it, adding the
capability you need.  In most cases, if you can't get what you want from
the standard handlers, that's the right answer.

In this case though, what your asking for is something that will probably
be pretty common, so I'll definitely add that as an enhancement.

 I had a look at the source of the page, there is a JavaScript
 variable called `debugAjax'. Is there anywhere to switch on or off
 via the javawebparts custom tags? I looked at ajax:enable/, but
 the tag description says it an empty tag. You might want to allow
 this feature.

Yes, this was added by the new developer on the project and I already
mentioned to him it should probably be an option.  For now, you can simply
throw this in the head of your page:

scriptdebugAjax=true;/script

That should do the trick.

 This is where I pause for the weekend in London.  *PAUSE*

Sounds good, let me know how it goes on Monday and I'll help however I
can.  FYI, I am planning on cutting a new release Sunday night, so you may
want to grab that first thing, just in case any of this is fixed by that
(I don't think so, but just in case).

Frank

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



Re: [OT] JavaWebParts and Struts / Ajax integration

2005-12-23 Thread Peter A. Pilgrim

Frank W. Zammetti wrote:
Sorry to not reply sooner Peter... my web host has been under a major 
DoS attack today, my mail just came back up a minute or so ago.




Well that ok because I am now official on holiday (vacation ;-)


Pilgrim, Peter wrote:


Hi Frank et Al

I am not sure if the latest 1.0 current version of JavaWebPart
actually distributes the right libraries.
If looks like ``javawebparts_core.jar'' has the wrong base dir.

It contains strangs paths that look incorrect e.g 
`javawebparts\core\org\apache\commons\beanutils'.

I would have thought it should have been `

`org\apache\commons\beanutils''



Those paths actually *are* correct... a few releases back we rolled in 
some Commons code so that there would be no external dependencies 
(except for Commons Logging, which we left external to try and alleviate 
any classloaded issues that might arise).  To do this, the packages were 
modified so that org/apache/commons/* is under javawebparts/core.




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



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.






That's right, only the core (which is always required) and the taglib 
jars should be required.


Yes I had a look at the cookbook examples (both of them). I deployed
them both to Weblogic and there both worked no problem at all. I think
I had to manually create a WAR files for both examples using `jar'.



I'm confused though... are you trying to build the cookbook apps or the 
sample app, or your own app?  It *looks* like a simple classpath issue, 
the taglib jar doesn't look to be found by Weblogic.  You can also take 
a look in your server logs... Every class in JWP does a dependency check 
at classload and will report via System.err any dependencies (outside 
the JDK) that it can't find.  I actually burned myself a week or so ago 
trying to use the Chain implementation and forgot to include the code 
JAR, and for a few hours my webapp was just silently not starting up, no 
errors or anything.  I finally figured it out (D'oh!) and decided *that* 
wasn't going to happen again :)


Frank



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.



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.

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.


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?

--
Peter Pilgrim
   __ _ _ _
  / //__  // ___// ___/   +  Serverside Java
 / /___/ // /__ / /__ +  Struts
/ // ___// ___// ___/ +  Expresso Committer
 __/ // /__ / /__ / /__   +  Independent Contractor
/___///////   +  Intrinsic Motivation
On Line Resume
   ||
   \\===  `` 

Re: [OT] JavaWebParts and Struts / Ajax integration

2005-12-23 Thread Frank W. Zammetti

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 

Re: [OT] JavaWebParts and Struts / Ajax integration

2005-12-22 Thread Frank W. Zammetti
Sorry to not reply sooner Peter... my web host has been under a major 
DoS attack today, my mail just came back up a minute or so ago.


Pilgrim, Peter wrote:

Hi Frank et Al

I am not sure if the latest 1.0 current version of JavaWebPart
actually distributes the right libraries. 


If looks like ``javawebparts_core.jar'' has the wrong base dir.

It contains strangs paths that look incorrect e.g 
	
	`javawebparts\core\org\apache\commons\beanutils'. 


I would have thought it should have been `

`org\apache\commons\beanutils''


Those paths actually *are* correct... a few releases back we rolled in 
some Commons code so that there would be no external dependencies 
(except for Commons Logging, which we left external to try and alleviate 
any classloaded issues that might arise).  To do this, the packages were 
modified so that org/apache/commons/* is under javawebparts/core.



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'


That's right, only the core (which is always required) and the taglib 
jars should be required.


I'm confused though... are you trying to build the cookbook apps or the 
sample app, or your own app?  It *looks* like a simple classpath issue, 
the taglib jar doesn't look to be found by Weblogic.  You can also take 
a look in your server logs... Every class in JWP does a dependency check 
at classload and will report via System.err any dependencies (outside 
the JDK) that it can't find.  I actually burned myself a week or so ago 
trying to use the Chain implementation and forgot to include the code 
JAR, and for a few hours my webapp was just silently not starting up, no 
errors or anything.  I finally figured it out (D'oh!) and decided *that* 
wasn't going to happen again :)


Frank




-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: 04 December 2005 04:18
To: Sonali Kulkarni; Struts User
Subject: Re: Integrating Struts in DWR??


Sorry about that, I obviously screwed up in QC... the latest build of 
AjaxChat IS NOT A PROPER WEBAPP.  My build script is obviously not 
working right as far as the distro task goes, and I didn't notice. 
Please use the v1.0 alpha, NOT alpha2, which is, AFAIK, correct.  It 
does have some bugs, but they shouldn't bother you if you are just 
checking the AJAX stuff out.


I will correct the latest version tomorrow and cut a new 
release... it 
is ready to be called 1.0 GA at this point anyway, so it's 
just as well. 
 Alternatively, you could check out from CVS HEAD right now, which 
should work fine, but you'll have to compile first.


Frank

Sonali Kulkarni wrote:


Hi Frank,

I downloaded ajaxchat.zip from 
link 


http://sourceforge.net/project/showfiles.php?group_id=49385pa
ckage_id=171010release_id=375018 


http://sourceforge.net/project/showfiles.php?group_id=49385p
ackage_id=171010release_id=375018



But I could not find abt jsp files in the zip, Hence cannot run the 
application.
I am planning to run it in Tomcat. Where can I get the 


complete source code


for the application, that I can run, and study.

Thanks,
Sonali


On 12/3/05, *Frank W. Zammetti* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


   Some of the questions you ask here are really more for 


you to decide...

   there aren't any canned answers.  That being said, I'll 


do my best...

   To begin with, I highly suggest checking out the 


numerous articles on

   AJAX out there to get a firm grasp on what it really 


is, and if I may be


   so bold, start with my own:

   http://www.omnytex.com/articles

   This will show one way AJAX can be integrated with 


Struts.  You can also

   check out my AjaxChat example app on the Struts Apps 


SourceForge site:


   http://struts.sourceforge.net

   The short answer is that AJAX, generically, is nothing 


but an HTTP

   request.  As far as whatever is on the server is 


concerned, be it a

   Struts apps or something else, it doesn't look any 


different than any

   other request.  Well, I suppose more accurately, it 


doesn't *have* to

   look any different.  If you simply pass simple 


parameters from the


   client and forego XML, then to Struts there's no difference.

   If you want to use XML and Struts, then you will at 


this point have to

   do your own parsing.  With Struts 1.3, it would be 


trivial to add a

   Command to the processing chain to parse an incoming 


XML message and

   translate it to request parameters... come to think of 


it, that exists


   already:

   http://sourceforge.net/projects/strutsws

   Although that's for Web Services, the underlying theory 


is