Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.

You are not logged in. [Login] Main Index · Search · Active Topics
New user · Who's Online · FAQ · Calendar · User List


Pages: 1
AthenAdministrator
journeyman

Reged: 06/05/07
Posts: 77
Loc: San Francisco, CA
Adopting Struts 2.0
      #55999 - 10/16/07 12:11 AM
Edit post Edit   Reply to this post Reply   Reply to this post Quote   Quick Reply Quick Reply  

Posted reader feedback, David wrote:

This is a side point, but I try to point out this misunderstanding every time I see it.

For a very long time, it has not been necessary to have "taglib" elements in your web.xml, nor has it been necessary to store TLD files separately from the taglib jar file. If the taglib directive in the JSP references the URI specified in the TLD contained in the taglib jar file, the taglib element is not required in the web.xml, nor is the separate TLD file necessary.

It's ironic that in your comparison of the web.xml in Struts 1 and Struts 2, you use the taglib elements in the Struts 1 example, but not the Struts 2 example. What's worse is that your taglib directives in the Struts 2 JSP likely don't use the URI specified in the encapsulated TLD, so I don't even think this would work.

Article: Adopting Struts 2.0
http://www.javaworld.com/javaworld/jw-10-2007/jw-10-adoptingstruts2.html

Post Extras: Print Post   Remind Me!   Notify Moderator  
raghavendra sai
Unregistered

Re: Adopting Struts 2.0 [Re: Athen]
      #56082 - 10/16/07 11:18 PM
Edit post Edit   Reply to this post Reply   Reply to this post Quote   Quick Reply Quick Reply  

Yes, what david said is exactly true, I tried the example given, and it didn't work!! have you checked it before posting the example, whether it is working or not?

Post Extras: Print Post   Remind Me!   Notify Moderator  
Sangeetha S
Unregistered

Re: Adopting Struts 2.0 [Re: Athen]
      #56282 - 10/19/07 07:44 AM
Edit post Edit   Reply to this post Reply   Reply to this post Quote   Quick Reply Quick Reply  

David,

I Agree with your statement. If the taglib jar file is available, no need to include the taglib element in the web.xml. While comparing web.xml for Struts 1 and Struts 2, the focus was on the elements of the servlet mapping and filter mapping and hence the taglib details have been missed out. If the following taglib element is added to web.xml, the code will work fine.

<taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>

Thanks for pointing this out.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Sangeetha S
Unregistered

Re: Adopting Struts 2.0 [Re: raghavendra sai]
      #56283 - 10/19/07 07:48 AM
Edit post Edit   Reply to this post Reply   Reply to this post Quote   Quick Reply Quick Reply  

All the examples here have been tried before they are posted. Copy the struts-tags.tld to the WEB-INF directory and add a taglib element to the web.xml, the code will work fine.

<taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>

Post Extras: Print Post   Remind Me!   Notify Moderator  

Unregistered

Re: Adopting Struts 2.0 [Re: Athen]
      #56412 - 10/21/07 06:26 AM
Edit post Edit   Reply to this post Reply   Reply to this post Quote   Quick Reply Quick Reply  

Struts 2.0 is about 5-10x slower than Struts 1.x.

Post Extras: Print Post   Remind Me!   Notify Moderator  

Unregistered

Re: Adopting Struts 2.0 [Re: raghavendra sai]
      #57940 - 10/26/07 10:11 AM
Edit post Edit   Reply to this post Reply   Reply to this post Quote   Quick Reply Quick Reply  

Can you please qualify your statement with facts, more information? I am interested in Struts 2.0 and speed would be a factor. But your post is useless without some more details.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 0 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 3269

Rate this topic

Jump to

Powered by UBB.threads™ 6.5.5



You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser