- This topic has 8 replies, 2 voices, and was last updated 18 years ago by Riyad Kalla.
-
AuthorPosts
-
harivenkatMemberHello,
I am using Myeclipse workbench
Version: 5.0.1 GA
Build id: 20060810-5.0.1-GATomcat 5 as my web server.
I created a webproject to work on JSTL, i wrote a simple html file as follows
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html><head>
<title>This is the HP.html page
</title>
</head><body>
<form method=post
action= ‘H.jsp’>
<input type=text name=’text1′>
<input type=submit value=’Enter a name’>
</form>
</body>
</html>==============
wrote a JSP file as follows:<%@ page language=”java” import=”java.util.*” pageEncoding=”ISO-8859-1″%>
<%@ taglib prefix=”c” uri=”http://java.sun.com/jstl/core” %><html>
<body>
<c:set var=”s” value=”${param.text1}”/ >We welcome<br>
<c:out value=”${s}” />
</body>
</html>=======================
In the JSP page I am getting 2 errors :Multiple annotations found at this line:
– Unknown tag (c:set).
– Missing end tag “c:set”I just ingorned them as I already closed the c:set
I tried running the html page, i got the following error:::According to TLD or attribute directive in tag file, attribute value does not accept any
expressionsCan anyone help me out with this.
I tried changing uri=”http://java.sun.com/jstl/core” to uri=”http://java.sun.com/jstl/core-rt”
even then I am getting errors.
Thanks ahead.
Riyad KallaMemberFrom the snippet above, your c:set is not closed, you have
/[SPACE]>
There shouldn’t be any space between the slash and greater than sign, that’s why it’s complaining. Also if you ar egetting unknown tag errors, chances are you forgot to add JSTL libs to your project or if you did, you are using the wrong URI given the version you are using (1.0 and 1.1 use different URIs).
Lastly, the core and core-rt are 1.0 JSTL impls, and I think choosing the -rt was the right thing to do, I don’t recall. I’d suggest you use JSTL 1.1.
harivenkatMemberHello Riyad,
Thanks for telling me the correction. Now I am not getting that error, but a different one
====attribute “}” has no value
can u help me out with this issue.
Thanks once again
Hari
Riyad KallaMemberIs this a runtime error? What does the source look like for your page?
harivenkatMember<%@ taglib prefix=”c” uri=”http://java.sun.com/jstl/core” %>
<html>
<body>
<c:set var=”s” value=”${param.text1}” />
We welcome<br>
<c:out value=”${s}” />
</body>
</html>I am getting that error in the jsp page itself, not a run time error. I got it
in the same line—–<c:set var=”s” value=”${param.text1}” />
I am getting a red line near the }—-that says attribute “}” has no value error.Ur reply is really appreciated.
Thanks,
Hari
Riyad KallaMemberHari,
Unfortunately I cannot reproduce this. The example you gave, when I pasted it into a JSP in a project with the JSTL 1.1 libs, compiles without any error markers.Can you try that locally? Creating a new web project, adding JSTL 1.1 to it, and pasting in the contents you gave me above?
harivenkatMemberHello Riyad,
Thanks for the quick response.
This is how I am doing the project. I created a file–newproject–myeclipse–j2eeproject–webproject.
I gave a name for a project–Hello. Checked the option add jstl1.1 libraries to web-inf/lib.
I got a project structure, where in I see jstl.jar and standard.jar—–the jars required for JSTL.
I also see all the tlds in the webroot–web-inf/lib.
I even added JSTL capabilties again.I rightclicked on the project, created a new JSP page, removed the default content given and wrote the above lines, and I am getting the error–attribute “}” has no value
Do u think it is the problem with Tomcat or my creation of my webproject. I even added jars in the tomcat manually and also the tlds, even then I am facing the same error in the JSP page and when I compile the same error i get the web browser—According to TLD or attribute directive in tag file, attribute value does not accept any expressions
What do u mean my trying it locally?
Pls let me know how else to make JSTL work.
Thanks,
Hari
Riyad KallaMemberHari,
This is very strange. Can you go to File > Export > Archive, and export tihs project to an archive them send it to support@genuitec.com ATTN Riyad with a link to this thread so I know why I’m getting it?
Riyad KallaMemberHair,
I got your project, imported it, and rebuilt it and it compiled fine without errors. If you had a chance, would you be able to redownload Eclipse 3.2.1 SDK from http://www.eclipse.org, and MyEclipse 5.0.1 from our site, then reinstall them to new directories, create a new workspace and try your test again? I just can’t reproduce any sort of problem on my end (your code looks fine) so I think it might be an install issue. -
AuthorPosts