• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Custom tag with .tag files

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

is anyone reached to use custom tag with .tag files on websphere 6.X ?
I get always this error:

/index.jsp(13,2) --> JSPG0046E: JSPG0046E: Unable to locate tagfile for tag window

My files are under "/WEB-INF/tags" directory and I use tagdir property for using them: "<%@ taglib tagdir="/WEB-INF/tags/" prefix="mytags"%>"

By the way, the same code on Tomcat works great.

Any idea ?

Thanks.

Fixed problem of code not appearing.
[ April 02, 2008: Message edited by: Merrill Higginson ]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've been able to use tag files under websphere to some degree. I have deployed them in jars and in the WEB-INF/tags dir. The only difference seems to be that I didn't include the trailing slash in my tagdir attribute.



Cheers
Mark

fixed problem of code not appearing
[ April 02, 2008: Message edited by: Merrill Higginson ]
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wanou,

The display name you're currently using does not meet the guidelines in the JavaRanch Naming Policy, which specifies that your display name must be a first and last name, and must not be obviously fictitious. Please change it when you get a chance.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, if you ever get the following error message:

JSPG0133E: Parent of jsp:attribute must be either a standard or custom action

when trying to display a JSP with custom tags, make sure you don't have any tag libraries defined twice.

If you define tag libaries (with tagdir) two times in the same JSP (for instance, because you're using static imports, a global JSPF that you include everywhere, ...) websphere will throw the above JSP Exception.

In Tomcat, this will work, though, so it's tricky to notice.

Bottom line:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
<%@ taglib prefix="anotherC" uri="http://java.sun.com/jsp/jstl/core"; %>

will work in Tomcat AND Websphere.

but the following:

<%@ taglib prefix="util" tagdir="/WEB-INF/tags/util" %>
<%@ taglib prefix="anotherUtil" tagdir="/WEB-INF/tags/util" %>

will work in Tomcat BUT WILL NOT WORK IN WEBSPHERE.

Just to annoy all of you some headaches :-)
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had faced similar error

/index.jsp(13,2) --> JSPG0046E: JSPG0046E: Unable to locate tagfile for tag window



Better way to debug this to set the flag in Webpshere to save the generated source code (jsp:attribute keepgenerated=true)

Then it may give some hint about the error in that line.

In my case I was using a bean in the .tag file which Websphere cannot resolve its type during runtime. So I had to change the type to java.lang.Object
It worked for me. I faced this error in Websphere 6.0 and hoped that IBM might fix this in 6.1. But its still the same.

RAD 7.5 sucks because it cannot show context sensitivie help (enter a '.' after the bean name and see its attributes) with or without changing it to java.lang.Object.

 
    Bookmark Topic Watch Topic
  • New Topic