Baranj, Baal wrote:
JSP version is 1.1, J2EE 1.4, Eclipse 3.0 with MyEclipse 3.8.3, Weblogic
8.1.
I have defined the filter in the web.xml as follows:
<filter>
<filter-name>BreadcrumbFilter</filter-name>
<filter-class>test.BreadcrumbFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>BreadcrumbFilter</filter-name>
<servlet-name>*.do</servlet-name>
</filter-mapping>
the tag library is also defined in web.xml as follows:
taglib>
<taglib-uri>mytaglib</taglib-uri>
<taglib-location>/WEB-INF/myTag.tld</taglib-location>
</taglib>
Firstly, note that filters and tags are independent; one has nothing to do
with the other...
In my jsp:
<%@ taglib uri="mytaglib" prefix="p" %>
<html>
<% out.print("<p><b>HOME </b>"); %><br>
<p:mytaglib/></font> <br>
This looks suspicious... you're using the taglib URI, 'mytaglib', as the
tag name. Does your TLD actually define a tag named 'mytaglib' in the
taglib named 'mytaglib'?
<a
href="electronics.jsp?link=Electronics&level=top&navAction=jump">Electronics
</a> </font><br>
<a
href="computers.jsp?link=Computers&level=top&navAction=jump">Computers</a>
<br>
</html>
I am getting the following error message:
Tag Insert : No value found for attribute 'mytaglib'.
at
org.apache.struts.taglib.tiles.InsertTag.processAttribute(InsertTag.java:688
)
at
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:476
)
at
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:436)
This error is coming from Tiles which, again, is unrelated to tags or
filters. You didn't include the relevant parts of your struts-config and
tiles-defs config files, so it's hard to know what's going on here.
I have already searched the mailing list archive for similar problems with
no luck. My question is : Is it possible to use the tiles, struts and the
servlet filter together? Are they compatible?
Absolutely, they will work together or independently.
I can see the init of the filter getting called when the server comes up. It
executes the Struts MyAction class and then chokes at the custom tag in the
jsp (it never executes the doStartTag method). Any pointers on what I am
doing wrong?
Try removing the custom tag from your JSP and check you have everything
else working correctly. I suspect the problem with the tag is what I
mentioned above: you're using the taglib name instead of the tag name in
your JSP.
Try breaking things down so you're only trying one thing at a time (your
filter, tiles, your taglib) to figure out where you're going wrong.
L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]