You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by maya <ma...@yahoo.com> on 2006/08/22 02:55:17 UTC
downloading JSTL..
hi,
am a bit confused about JSTL.. when on this pg,
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
it says, about half-way down, "Download the Standard Tag Library Release
from an Apache Jakarta Project Mirror" when I click on "Apache Jakarta
Project Mirror" I get taken to
http://jakarta.apache.org/site/downloads/index.html
don't know what I'm supposed to download from this page...
I click on "taglibs" get taken to a page with yet another long list..
http://jakarta.apache.org/site/downloads/downloads_taglibs.html..
what do I download here? I thought "JSTL" meant all taglibs in one
package..
thank you..
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: downloading JSTL..
Posted by maya <ma...@yahoo.com>.
Wendy Smoak wrote:
>> Wendy, thank you very much for your help.. I'm using Tomcat 5, so I
>> figured had to use JSTL 1.1..
>
> No. The version of JSTL to use depends on what version of the Servlet
> spec your webapp is configured to use, not what version of Tomcat
> they're running in.
>
>
>> my Servlet API is 2.4.. so looking on pg you pointed out, put this on
>> top of web.xml:
>>
>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>> version="2.4">
>>
>> also changed URI for JSTL 1.1 like you said, so now in JSP have:
>>
>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>> <c:out value="Congratulations, JSTL is working!"/>
>>
>> still, get exact same error.. oh brother, I don't get this..
>
> The error you're getting has to do with parsing an XML file, probably
> web.xml. It's complaining that:
>
>> SEVERE: Parse Fatal Error at line 3 column 6: The processing instruction
>> target matching "[xX][mM][lL]" is not allowed.
>
> Delete the two lines above, and any spaces before, the <?xml
> version="1.0"?> (or similar) which is on line 3. It has to be the
> very first thing in the file.
>
>> (actually the guy says in book he's using Tomcat 5.5 (which I know is
>> for java sdk 1.5, I'm using tomcat 5.0.23 or something, and sdk 1.4, but
>> since am on Tomcat 5 figured JSTL 1.1 would be ok..)
>
> Yes, it should be fine.
>
>> (this pg refers to Struts, though.. I'm not using Struts, have never
>> used Struts..
>
> ... which is why I said, "Ignore the Struts-related parts." :)
>
oh my gosh, I don't believe it!! that's what it was!! I had blank
lines at top of web.xml.. I have been using Tomcat for 2 years now,
have tons of webapps in there, and I didn't know this.. go figure...
(of course I looked @ web.xml's for other webapps.. they all have no
blank lines..)
thank you so much.. always learn something new..... (sigh.. ;)
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: downloading JSTL..
Posted by Wendy Smoak <ws...@gmail.com>.
> Wendy, thank you very much for your help.. I'm using Tomcat 5, so I
> figured had to use JSTL 1.1..
No. The version of JSTL to use depends on what version of the Servlet
spec your webapp is configured to use, not what version of Tomcat
they're running in.
> my Servlet API is 2.4.. so looking on pg you pointed out, put this on
> top of web.xml:
>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> version="2.4">
>
> also changed URI for JSTL 1.1 like you said, so now in JSP have:
>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
> <c:out value="Congratulations, JSTL is working!"/>
>
> still, get exact same error.. oh brother, I don't get this..
The error you're getting has to do with parsing an XML file, probably
web.xml. It's complaining that:
> SEVERE: Parse Fatal Error at line 3 column 6: The processing instruction
> target matching "[xX][mM][lL]" is not allowed.
Delete the two lines above, and any spaces before, the <?xml
version="1.0"?> (or similar) which is on line 3. It has to be the
very first thing in the file.
> (actually the guy says in book he's using Tomcat 5.5 (which I know is
> for java sdk 1.5, I'm using tomcat 5.0.23 or something, and sdk 1.4, but
> since am on Tomcat 5 figured JSTL 1.1 would be ok..)
Yes, it should be fine.
> (this pg refers to Struts, though.. I'm not using Struts, have never
> used Struts..
... which is why I said, "Ignore the Struts-related parts." :)
--
Wendy
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: downloading JSTL..
Posted by maya <ma...@yahoo.com>.
Wendy Smoak wrote:
> On 8/21/06, maya <ma...@yahoo.com> wrote:
>
>> yes, that helped, thank you very much... I managed to figure out which
>> one to download here,
>> http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
>
> ... so you're using JSTL 1.1
>
>> followed all instructions in my book (created webapp "jstltest", created
>> web.xml acc. to instructions, put .tld's where they belong, plus the
>> jars (jstl.jar, standard.jar, which I put in tomcat/common/lib (I usu.
>> put all jars in tomcat/common/lib,
>
> In general, unless you have a good reason to use the common/shared
> directories, placing jars *only* in WEB-INF/lib is a better choice.
>
>> but in this case put also in
>> jstltest/WEB-INF/lib because am getting error as described below, just
>> in case, but that did not help..).. created test.jsp, as instructed
>> (contains just
>>
>> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
>> <c:out value="Congratulations, JSTL is working!"/>
>> )
>
> That isn't the right uri for JSTL 1.1. It should be:
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>
>> however, when start tomcat, get this error for this webapp:
>
> I think you're mixing and matching Servlet and JSTL versions incorrectly.
>
> What are the first few lines of your web.xml?
>
> There are some notes here to help people sort out which version of
> JSTL to use... ignore the Struts-related parts and see if it helps:
> http://wiki.apache.org/struts/StrutsAndJSTL
>
> HTH,
Wendy, thank you very much for your help.. I'm using Tomcat 5, so I
figured had to use JSTL 1.1..
first lines of web.xml are as follows:
<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
(as per instructions in book..)
my Servlet API is 2.4.. so looking on pg you pointed out, put this on
top of web.xml:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
also changed URI for JSTL 1.1 like you said, so now in JSP have:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:out value="Congratulations, JSTL is working!"/>
still, get exact same error.. oh brother, I don't get this..
(actually the guy says in book he's using Tomcat 5.5 (which I know is
for java sdk 1.5, I'm using tomcat 5.0.23 or something, and sdk 1.4, but
since am on Tomcat 5 figured JSTL 1.1 would be ok..)
(this pg refers to Struts, though.. I'm not using Struts, have never
used Struts.. )
again, thank you very much..
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: downloading JSTL..
Posted by Wendy Smoak <ws...@gmail.com>.
On 8/21/06, maya <ma...@yahoo.com> wrote:
> yes, that helped, thank you very much... I managed to figure out which
> one to download here,
> http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
... so you're using JSTL 1.1
> followed all instructions in my book (created webapp "jstltest", created
> web.xml acc. to instructions, put .tld's where they belong, plus the
> jars (jstl.jar, standard.jar, which I put in tomcat/common/lib (I usu.
> put all jars in tomcat/common/lib,
In general, unless you have a good reason to use the common/shared
directories, placing jars *only* in WEB-INF/lib is a better choice.
> but in this case put also in
> jstltest/WEB-INF/lib because am getting error as described below, just
> in case, but that did not help..).. created test.jsp, as instructed
> (contains just
>
> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
> <c:out value="Congratulations, JSTL is working!"/>
> )
That isn't the right uri for JSTL 1.1. It should be:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
> however, when start tomcat, get this error for this webapp:
I think you're mixing and matching Servlet and JSTL versions incorrectly.
What are the first few lines of your web.xml?
There are some notes here to help people sort out which version of
JSTL to use... ignore the Struts-related parts and see if it helps:
http://wiki.apache.org/struts/StrutsAndJSTL
HTH,
--
Wendy
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: downloading JSTL..
Posted by maya <ma...@yahoo.com>.
Wendy Smoak wrote:
> On 8/21/06, maya <ma...@yahoo.com> wrote:
>
>> I click on "taglibs" get taken to a page with yet another long list..
>> http://jakarta.apache.org/site/downloads/downloads_taglibs.html..
>> what do I download here? I thought "JSTL" meant all taglibs in one
>> package..
>
> From that page you either want Standard 1.0 or Standard 1.1, depending
> on what version of JSTL you want to use (which depends on what version
> of the Servlet spec you're configuring your webapp for.)
>
> In general,
> Tomcat 5 -> Servlet 2.4 -> JSTL 1.1
> Tomcat 4 -> Servlet 2.3 -> JSTL 1.0
>
> (However, Tomcat 5 can run apps written to earlier versions of the
> servlet spec, so check your web.xml to see what version you're
> *really* using.)
>
> And no, JSTL isn't "all" the taglibs, it's the "Standard" taglib and
> there are lots of other ones, as you can see from that page. (And
> those are only the ones distributed by the Jakarta Taglib project.)
>
> HTH,
yes, that helped, thank you very much... I managed to figure out which
one to download here,
http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
followed all instructions in my book (created webapp "jstltest", created
web.xml acc. to instructions, put .tld's where they belong, plus the
jars (jstl.jar, standard.jar, which I put in tomcat/common/lib (I usu.
put all jars in tomcat/common/lib, but in this case put also in
jstltest/WEB-INF/lib because am getting error as described below, just
in case, but that did not help..).. created test.jsp, as instructed
(contains just
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<c:out value="Congratulations, JSTL is working!"/>
)
however, when start tomcat, get this error for this webapp:
INFO: Installing web application at context path /jstltest from URL
file:C:\tomcat\webapps\jstltest
Aug 21, 2006 9:31:38 PM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 3 column 6: The processing instruction
target matching "[xX][mM][lL]" is not allowed.
org.xml.sax.SAXParseException: The processing instruction target
matching "[xX][mM][lL]" is not allowed.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
at org.apache.xerces.impl.XMLScanner.scanPIData(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknow
n Source)
at org.apache.xerces.impl.XMLScanner.scanPI(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch
(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn
lots more...
pls what does this mean?
don't get this... get this error only for this webapp.. all other
webapps working fine.. thank you very much...
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: downloading JSTL..
Posted by Wendy Smoak <ws...@gmail.com>.
On 8/21/06, maya <ma...@yahoo.com> wrote:
> I click on "taglibs" get taken to a page with yet another long list..
> http://jakarta.apache.org/site/downloads/downloads_taglibs.html..
> what do I download here? I thought "JSTL" meant all taglibs in one
> package..
>From that page you either want Standard 1.0 or Standard 1.1, depending
on what version of JSTL you want to use (which depends on what version
of the Servlet spec you're configuring your webapp for.)
In general,
Tomcat 5 -> Servlet 2.4 -> JSTL 1.1
Tomcat 4 -> Servlet 2.3 -> JSTL 1.0
(However, Tomcat 5 can run apps written to earlier versions of the
servlet spec, so check your web.xml to see what version you're
*really* using.)
And no, JSTL isn't "all" the taglibs, it's the "Standard" taglib and
there are lots of other ones, as you can see from that page. (And
those are only the ones distributed by the Jakarta Taglib project.)
HTH,
--
Wendy
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org