struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AbelMacAdam <abel.maca...@gmail.com>
Subject Re: Taglib not seen, no text fields?
Date Thu, 20 Dec 2007 15:20:46 GMT

PS. I do not know if my answering the questions in the way I do it breaks it
for the readers of the mailinglist. I read and respond on the Nabble
mailinglist archive. If my way of answering breaks it for the readers of the
mailinglist, say so. I will stop this at once.

Abel


AbelMacAdam wrote:
> 
> Hi Alberto,
> 
> Thanks for taking the time for this extensive answer. I will try to answer
> the questions you pose
> 
> Alberto A. Flores wrote:
>> 
>> How are you building your application? It sounds like you are not using 
>> maven (I highly recommend it so you avoid many problem). Now, a couple 
>> of things about this post:
>> 
> Sorry, I'm bootstrapping. I have seen maven mentioned, but are too new to
> *also* include maven. I might have maven installed, but am not actively
> using it.
> 
> 
> - The error you are referring, is it an error in Eclipse or during 
>> deployment? Two BIG different things.
> The error I mentioned is the one I see in Eclipse. The result I describe
> (no text fields or submit button) is what I observe in Tomcat. The
> relation between the two is made by myself.
> 
> 
> - If Eclipse doesn't recognize the struts 2 tag, it's because you have 
>> not included the strut2-*.jar files in the classpath.
> It could very well be that I forgot to add the Struts-specific jar files
> to the classpath. As I threw the diretory away after I continued with
> following examples I now have a hard time to recreate the problem.
> 
> 
>  Please check the 
>> documentation of Eclipse if you are not familiar how to do that. Since 
>> the way URI resolution has changed through out the different JSP 
>> versions, Eclipse will resolve the URI according to the following 
>> heuristic (see link - 
>> http://www.eclipse.org/webtools/jst/components/jsp/designs/taglibindex/taglibindex.html)
>> 
> Will do. the document is now rolling off the printer. 
> 
> 
> 
>> Please keep in mind that the fact that it resolves in Eclipse is no 
>> indication that it will resolve during deployment (unless you have a 
>> good development environment that mimics your deployment jars)
>> 
> No such luck. The error message is gone in Eclipse, but the input boxes
> and submit button are still gone in Tomcat. 
> 
> 
> 
>> - Depending on the container that you are using, you don't need to use 
>> web.xml at all (tld file should be within the jar file and the container 
>> should know where to look for it)
>> 
> Strangely enough, the taglib was not in web.xml, but in a jsp. 
> 
> 
> 
>> - What jars have you included? At a minimum you shouls have: 
>> struts-core-x.jar, xwork-x.jar, ognl-x.jar, freemarker-x.jar (x refers 
>> to the release, which may not be the same). These releases are easy to 
>> obtain if you use maven. If you don't then, when you download the struts 
>> 2 distribution, these should come. If you are learning, just copy *all* 
>> and learn what breaks as you take jar by jar off the lib directory.
>> 
> As I had to recreate the example, I can not say what I had. But what you
> say is sound advice. Put all eggs in the basket, and throw out all
> extraneous ones until the last one breaks the application.
> 
> 
> - If the textfield doesn't show, there may be many reasons for that to 
>> happen. Have you consider? (i) Not having all jars in the lib directory, 
>> (ii) your struts tag having a "name" attribute mapping to an unknown 
>> property. (iii) Have you looked at the produced HTML? (iv) Have you 
>> checked all logs?
>> 
> So many places to check. As a newbie, I do not know where to check. But
> hopefully in the future I will know (as a matter of fact, I already look
> in the different log files of Tomcat and Apache, but can't find any
> interesting tidbits pointing me to profound knowledge. But that's being a
> starter, I think). 
> On your question of not having all jars in (Tomcats/)the lib directory:
> No. Should I copy everything to Tomcat?
> On your second question of my struts tag having an attribute to an unknown
> property. I don't know. I think this is not the case, as I use the code of
> the author and think this code is flawless (*famous last words of a
> newbie*).
> 
> But as I said, the next example is not broken. So I will ponder on. But
> thanks for your answer.
> Abel
> 
> AbelMacAdam wrote:
>> 
>> AbelMacAdam wrote:
>>> Hi,
>>>
>>> I'm learning to work with Struts. (FWIW, I use Eclipse Europa, and
>>> Apache/Tomcat). Now I have my first example with a tld-file. First of
>>> all,
>>> I noticed the following error in Eclipse on a jsp:
>>> Cannot find the tag library descriptor for /tags/struts-html 
>>>
>>> The first line of the jsp with the error is:
>>> <%@ taglib uri="/tags/struts-html" prefix="html" %> 
>>>
>>> My WEB-INF/web.xml contains the following lines:
>>> <taglib>
>>>   <taglib-uri>/tags/struts-html</taglib-uri>
>>>   <taglib-location>/WEB-INF/struts_html.tld</taglib-location>
>>> </taglib>
>>>
>>> And the same WEB-INF directory also contains the struts_html.tld file.
>>>
>>> So far the background. If I run this example in Tomcat I get a page
>>> without textfields and a submit button. So this example clearly does not
>>> work. Do you know what I need to do to get this example working? Am I
>>> right in assuming I get not textfields/buttons because the tag library
>>> descriptor is not found?
>>>
>>> TIA,
>>> Abel
>>>
>> 
>> What version of Struts 1 are you using?
>> 
>>> None. I actually use 2.0.11.
>> 
>> Easy way to check: unpack the jar and see if the META-INF directory
>> contains the tld. It could very well be an incorrectly built jar. 
>> 
>>> Struts.jar contains struts-html.tld
>> 
>> And strangely enough, the next example did not show the error, and was
>> displayed correctly. I even added Struts to the first example. But it
>> still
>> does not work. If no one else has an explanation I write it off to earth
>> rays.
>> 
>> Abel
> 
> -- 
> 
> Alberto A. Flores
> http://www.linkedin.com/in/aflores
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



-- 
View this message in context: http://www.nabble.com/Taglib-not-seen%2C-no-text-fields--tp14433671p14438443.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message