|Steven D. Wilkinson||Jan 29, 2001 7:21 am|
|Michael Mok||Jan 29, 2001 7:57 am|
|Chris Smith||Jan 29, 2001 8:26 am|
|Frederic BAGES||Jan 29, 2001 8:59 am|
|Steven D. Wilkinson||Jan 29, 2001 9:37 am|
|Frederic BAGES||Jan 29, 2001 9:48 am|
|Steven D. Wilkinson||Jan 29, 2001 10:14 am|
|Justin Kennedy||Jan 29, 2001 10:18 am|
|Frederic BAGES||Jan 29, 2001 10:18 am|
|Craig R. McClanahan||Jan 31, 2001 2:08 pm|
|Subject:||RE: JSP probleme - ms windows specific|
|From:||Frederic BAGES (fre...@in-fusio.com)|
|Date:||Jan 29, 2001 10:18:43 am|
Yes, it was what I would have done if i could, but i can't manage to make it fail now. Remeber that under windows (and dos i think) you don't really control how your names are stored. I've just tried under dos and all is written using upercase characters ... But you know, I'm a mad guy : I'm just programming under Win 98. Yes, I know, devil is my master ;-)
If you really really think it's a case problem, go to a dos window and check out the offending directory. dos won't hide the case from you.
Thank you Steven for your remarks. I had checked all of these before sending my first mail but it was not any of these. I've tried anything i had in mind and now it's working. I don't really know why but i think it can be a case (not all in uppercase ?) problem on the WEB-INF directory (I'm using a Win.. named OS that don't show the case in the file explorer).
You also said that struts 1.0 is comming soon but do you think it can be considered as an error-less version ? (i.e. can I use it on a production server ?)
Which version of struts are you using?
Note my answer is how you do it in struts 1.0 (actually form the 01-28-2001 source download) I'm not sure how to do it in 0.5. If you are just starting and trying to use 0.5, I suggest you start with one of the nightly source distributions because 1.0 should be released shortly. Just some bug fixes and documentation updates as I hear on the mail lists.
The tag library descriptors must be in your WEB-INF and registered in your web.xml and you must reference them properly in the JSP page.
<tomcat-home>/webapps/animation/WEB-INF/struts-bean.tld struts-html.tld struts-logic.tld struts-template.tld struts.tld In your web.xml <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app> .. other stuff here Note, refer to DTD about location of taglib. it's at the bottom if you are not using any ejb stuff. <!-- Struts Tag Library Descriptors --> <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib>
<taglib> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib>
<taglib> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib>
You only need to enter the ones that you are using. This is from the struts-example/WEB-INF/web.xml file.
Then in you JSP page put this... <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
Note, the file in the uri determines the name and location of the tlds. The prefix is upto you.
Good luck, Steve
Frederic BAGES wrote:
Hi all, i'm new to Struts and i have i problem that seems to concern Tomcat and Struts.
I've installed Strut and the two exemples WAR files under tomcat 3.2. the exemples are just running fine but when i try to run my own jsp file i have an error from the jsp compiler.
org.apache.jasper.compiler.CompileException: C:\jakarta-tomcat-3.2.1\webapps\animation\logon.jsp(1,0) Unable to open taglibrary /WEB-INF/struts.tld : Could not locate TLD META-INF/taglib.tld at
ntListener.java, Compiled Code) at
ener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled Code) at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code) at org.apache.jasper.compiler.Parser.parse(Parser.java:1042) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) .....
My JSP file and the corresponding classes (LogonForm and LogonAction) are just copies of the examples with some little changes.
Does anyone could help me ?
The JSP file is following :
<%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %>
<html> <head> <title>Titletitle> </head> <body bgcolor="white">
<struts:form action="logon.do" name="logonForm" focus="username" type="com.infusio.gamezilla.portal.LogonForm"> <table border="0" width="100%">
<tr> <th align="right"> User name : </th> <td align="left"> <struts:text property="username" size="16" maxlength="16"/> </td> </tr>
<tr> <th align="right"> Password : </th> <td align="left"> <struts:password property="password" size="16" maxlength="16"/> </td> </tr>
<tr> <td align="right"> <struts:submit property="submit" value="Submit"/> </td> <td align="left"> <struts:reset/> </td> </tr>