• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

tag libs

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Therakom
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic