A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
html:link causing exception
Joined: Jan 17, 2005
Mar 03, 2006 02:58:00
I'm a beginner in
. My index.jsp is causing a
when I use <html:link> to link to another
. This is the code I used.
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <html:html> <head> <html:base/> </head> <body> <html:link page="/success.jsp" >Customer Form </html:link> </body> </html:html>
If I replace the line containing html:link with
<a href="success.jsp" >Customer Form</a>
then it works fine. I tried removong the slash before success.jsp,
but still it is not working. Both the JSPs are in the same directory.
[ March 03, 2006: Message edited by: Sreedevi Vinod ]
Joined: Feb 08, 2006
Mar 03, 2006 07:44:00
Often, if standard html works then there is no reason to use one of the Struts custom tags. One thing I would say is to look at the source html generated ("view source" in your browser) and see what URL it is generating. It is correct? You could also try href instead of page. From the docs at
href - Use the value of this attribute unchanged.
page - Use the value of this attribute as a module-relative URI, and generate a server-relative URI by including the context path and module prefix.
BTW...I am not sure how the html:base tag fits into this. It depends a little on how your application is deployed and your directory structure.
I agree. Here's the link:
subject: html:link causing exception
For Struts developers
Cannot find message resources
"/tags/struts-logic" not found
problem in accessing a list through a iterate tag.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014