• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JSTL 3 while migration causing issues

 
Ranch Hand
Posts: 458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following code in a JSP file for the tags which is included in all of my JSP files at the top:


Since I recently migrated from Spring 5.X to Spring 6, I've changed the above to the following as per jakarta specification of 3.0 listed here(https://jakarta.ee/specifications/tags/3.0/jakarta-tags-spec-3.0):



However, I still keep on getting following error while accessing a JSP page.




Here are few relavent things from my pom.xml:




I'm using Tomcat 10.1.45 here to start the above app. Is there anything I'm missing?
 
Saloon Keeper
Posts: 28325
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't used Struts since I moved to JSF, but the thing that strikes me is that you're using all those taglib declarations in snippet form.

As a general rule, we've moved on to using XML schemas these days. For example (JSF):

You might want to check the latest Struts docs.
 
Jack Tauson
Ranch Hand
Posts: 458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I haven't used Struts since I moved to JSF, but the thing that strikes me is that you're using all those taglib declarations in snippet form.

As a general rule, we've moved on to using XML schemas these days. For example (JSF):

You might want to check the latest Struts docs.



I should have mentioned it but we have stopped using struts in this app but remnants are still there so I didn't bother removing it unless I figure out this issue.
 
Tim Holloway
Saloon Keeper
Posts: 28325
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd check to make sure that no Struts tags are being used on that page and then remove them. I'd also check to make sure that no Struts libraries are being included in the build. It looks like Struts is doing something and it thinks you're using the old pre-jakarta JEE.
 
Jack Tauson
Ranch Hand
Posts: 458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I'd check to make sure that no Struts tags are being used on that page and then remove them. I'd also check to make sure that no Struts libraries are being included in the build. It looks like Struts is doing something and it thinks you're using the old pre-jakarta JEE.



Yeah, there are lot of Struts tags in use like logic iterate and logic Empty etc so I'm in the process of replacing logic iterate with c:foreach of JSTL , and logic empty with c:if test of JSTL. Probably, I will try to get rid of all of these tags from a page and see if it works. There are also <bean:write/> tags so getting these replaced with <c:out of JSTL. >

I also noticed a comtag.tld file sitting inside WEBINF folder which has the following contents:



any idea what this might be for? Also, what might be the JSTL 3.0 compatible version for this?
 
Bartender
Posts: 224
7
Android Python Oracle Postgres Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jack Tauson wrote:

I also noticed a comtag.tld file sitting inside WEBINF folder which has the following contents:



any idea what this might be for? Also, what might be the JSTL 3.0 compatible version for this?



Makes it a difference to increase tlibversion to 1.1? Otherwise, to my surprise the TLD content should be still ok for Jakarta but it's an awfully long time ago I wrote some taglib POC/playground code.

 
Roland Mueller
Bartender
Posts: 224
7
Android Python Oracle Postgres Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Following this URL brings me to Displaytags page at Sourceforge where I can download the freshest version from year 2008.

The project was then move to - hard to guess :-) -  Github and latest release 3.0.2 claims to support Jakarta namespaces.
 
Jack Tauson
Ranch Hand
Posts: 458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roland Mueller wrote:

Jack Tauson wrote:

I also noticed a comtag.tld file sitting inside WEBINF folder which has the following contents:



any idea what this might be for? Also, what might be the JSTL 3.0 compatible version for this?



Makes it a difference to increase tlibversion to 1.1? Otherwise, to my surprise the TLD content should be still ok for Jakarta but it's an awfully long time ago I wrote some taglib POC/playground code.



I am assuming that "comtag.tld" won't be needed since I am getting rid of all the Struts tags. Please correct me if anyone thinks otherwise and explain.  Not sure if there's anything I need to do in JSTL to compensate for the removal of this file.
 
Tim Holloway
Saloon Keeper
Posts: 28325
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't find any docs on "com.web.tag". This may be an in-house custom tag library, as "com.web" is a questionable package name. And it's likely designed to work with Struts so assuming you can't find equivalents you may have to re-design it.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic