File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

tag libs

sojan chandy
Greenhorn

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

<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

Joined: Jan 10, 2002
Posts: 61603
    
  67

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] [Bear's FrontMan] [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.


Merrill
Consultant, Sima Solutions
sojan chandy
Greenhorn

Joined: Mar 18, 2007
Posts: 24
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

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:

to

[ March 30, 2007: Message edited by: Merrill Higginson ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tag libs