You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by venu madhav <vy...@miraclesoft.com> on 2007/05/04 04:47:34 UTC

Please solve

 Hi rashmi,
                         Earlier you gave me a solution for using datagrid
with Apache taglib. The datagrid was designed to use with old servlet spec
and JSTL spec. Am trying to use the code fragment shown below

* <c:out value='<${sessionScope.data["pid"]}'/>*

 here data is a map object containing key value pairs. I kept it session
scope in a class. Am trying to display the data from map by passing key.
here data is Map object in session scope and pid is the key am passing to it
to request the value. But am not getting the desired output. The output is
*${sessionScope.data["pid"]}' *  as it is. Instead of printing value it is
displaying the expression as it is. Can you give me any solution for this.

-- 
Regards,

Venu madhav.Yelamanchili

Software Trainee

Miracle Software Systems

Email: vyelamanchili@miraclesoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Please solve

Posted by Rashmi Rubdi <ra...@gmail.com>.
Please provide *adequate relevant information* and a relevant title
for this thread, it will benefit you in terms of getting a proper
response in the shortest amount of time and others on the mailing list
to understand your problem and solve it and will also be meaningful
for future viewers of this thread.

Please don't address it directly to me or send me questions off-line,
if I'm unavailable you'll be wasting time waiting for a response.

Please read the guidelines http://jakarta.apache.org/site/mail.html
before posting.

Tomcat version ???
JSTL version ???
web.xml ???

-------------------------------------------------------------------------------------------------------
On Tomcat 5.5 , JSTL 1.1 web.xml version 2.4 the following works.
But it won't work in a web.xml using version 2.2
-------------------------------------------------------------------------------------------------------

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<jsp:useBean id="myMap" type="java.util.Map" class="java.util.HashMap"
scope="session"/>

<c:set var="keyVar" value="planet"/>
<c:set var="valueVar" value="Earth"/>
<c:set target="${myMap}" property="${keyVar}" value="${valueVar}"/>

${myMap[keyVar]}

--------------------------------------------------------------------------------------------------------


I mentioned before that DataGrid uses web.xml of version 2.2

but JSTL 1.1 Expression Language requires a web.xml of version 2.4

So you would need to compromise somewhere


1)  (from my understanding), you would need to probably downgrade to
the JSTL to  JSTL 1.0 or lower , research on which version of JSTL is
compliant with JSP 1.2 and what syntax is used in EL if you are taking
this route.

--- I only know EL syntax for JSP 2.0 (Tomcat 5.5.x) , I don't know if
the EL syntax is different for lower versions of JSP 1.2 etc.

-Rashmi

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org