Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tag libs

 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

<taglib>
<taglib-uri>strut-html.tld</taglib-uri>
<taglib-location>/WEB-INF/strut-html.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
in web.xml



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

my class path

C:\Tools\apache-tomcat-5.5\common\lib\servlet-api.jar;C:\Tools\apache-tomcat-5.5\common\lib\jsp-api.jar;
C:\Tools\apache-tomcat-5.5\webapps\test\WEB-INF\lib\struts.jar;
C:\Tools\apache-tomcat-5.5\webapps\test\WEB-INF\lib\struts-el.jar



but in browser it shows error 500


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

this is my jsp file

customerDetails.jsp

<%@ 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:html>
<head>
<html:base/>
</head>
<body>
<html:errors/>
<html:form action="/submitCustomerForm">
<bean:message key="prompt.customer.firstname"/>:
<html:text property="firstname" size="16" maxlength="16"/>
<BR>
<bean:message key="prompt.customer.lastname"/>:
<html:text property="lastname" size="16" maxlength="16"/>
<BR>
<html:"submit">
<bean:message key="button.Save"/>
</html:Submit>
 
<html:cancel>
<bean:message key="button.Cancel"/>
</html:cancel>
</html:form>
</body>
</html:html>
[ March 29, 2007: Message edited by: sojan chandy ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still its not working..shows
org.apache.jasper.JasperException: /customerDetails.jsp(1,1) Unterminated <%@ taglib tag
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is with your taglib declarations. There should be no "-" after the word taglib, and the word is "struts", not "strut". Change:

to

[ March 30, 2007: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic