File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes tag libs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tag libs" Watch "tag libs" New topic

tag libs

sojan chandy

Joined: Mar 18, 2007
Posts: 24
i have added

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib-uri="/WEB-INF/strut-html.tld" prefix="html"%>
<%@taglib-uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

in the jsp file. and i also have added


in web.xml

and i have added the jar file strut.jar in classpath.

my class path


but in browser it shows error 500

can anybody help me .....thanks in advance

this is my jsp file


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib-uri="/WEB-INF/strut-html.tld" prefix="html"%>
<%@taglib-uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<html:form action="/submitCustomerForm">
<bean:message key="prompt.customer.firstname"/>:
<html:text property="firstname" size="16" maxlength="16"/>
<bean:message key="prompt.customer.lastname"/>:
<html:text property="lastname" size="16" maxlength="16"/>
<bean:message key="button.Save"/>
<bean:message key="button.Cancel"/>
[ March 29, 2007: Message edited by: sojan chandy ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63839

Please take the time to choose the correct forum for your posts. This forum is for questions on Servlets.

This post has been moved to a more appropriate forum.

[Asking smart questions] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
First of all, the run-time class path is determined by the application server that you're using, not by a classpath environment variable. The important thing is to make sure that all the jar files that came with the Struts download are included in the WEB-INF/lib directory. It's not enough just to include the struts.jar file.

Once you've included all the jar files, redeploy and retest. If you still get an error, please look at the log files and show us the specific error along with the first few lines of the stack trace. "Error 500" is a very generic message and tells us nothing about what's going wrong.

Consultant, Sima Solutions
sojan chandy

Joined: Mar 18, 2007
Posts: 24
still its not working..shows
org.apache.jasper.JasperException: /customerDetails.jsp(1,1) Unterminated <%@ taglib tag
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The problem is with your taglib declarations. There should be no "-" after the word taglib, and the word is "struts", not "strut". Change:


[ March 30, 2007: Message edited by: Merrill Higginson ]
I agree. Here's the link:
subject: tag libs
jQuery in Action, 3rd edition