aspose file tools*
The moose likes Websphere and the fly likes Custom tag with .tag files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Custom tag with .tag files " Watch "Custom tag with .tag files " New topic
Author

Custom tag with .tag files

wanou
Greenhorn

Joined: Mar 03, 2008
Posts: 1
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 ]
Mark Thomsit
Greenhorn

Joined: Apr 01, 2008
Posts: 5
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 ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
Dieter Hubau
Greenhorn

Joined: Apr 14, 2010
Posts: 2
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 :-)
Babji Reddy
Ranch Hand

Joined: Jan 24, 2006
Posts: 106
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom tag with .tag files