John,

Another David here.  I'm learning how to use the Expression Language 'stuff'
in Tomcat 5.0.X (.28 actually) under Struts v1.2.4 and I'm NOT using
Struts-El.  I don't need it.  I'm not sure about HashMaps as I haven't used
them yet, but I can access my variables without Struts-el this way:

My actual for in struts-config.xml is named "uploadForm".  I'm sorry about
the stupid field called "name" but hey, I'm playing around with it! In my
upload.jsp page, I can access the members of the uploadForm either the old
way:

*** Keep in mind I still have a tag
*** <html:form action="/upload"> so the
*** below html:text tag works properly
*** and pulls the form bean in that is
*** associated with the /upload action.

<html:text property="name" />

OR I can do it using the JSP 2.0 expression language syntax:
<input type="text" name="name" value="${uploadForm.name}" />

Again, I DO NOT use Struts-el, just the stock struts.  I do have one change
in my WEB-INF/web.xml file.  Instead of having:

<webapp>

I changed it to:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"; version="2.4">

That change, after restarting my webapp, allowed me to use expression
language variables in any of my JSP files.

I hope this information helps you.

Regards,
David

-----Original Message-----
From: John C Cartwright [mailto:[EMAIL PROTECTED]
Sent: Friday, September 24, 2004 7:19 PM
To: Struts Users Mailing List
Subject: Re: error in strutsel-exercise-taglib


Thanks for your reply, David.  I'm not sure that I understand though.  I
am using tomcat 5.0.x and JSP2.0. However, when I change the taglib
directive to:

<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"%>

and try something like:

<html:img src="${images["iconClosed"]}" height="16" width="16"/>

(where images is a HashMap in request scope), I get an error.  Indeed,
the documentation for the html:img taglib specifies a RTExpr.

Can you clarify for me?

Thanks!

-- john


Karr, David wrote:
> You don't need to use Struts-EL with Tomcat 5, if you're using JSP 2.0.
> In fact, it won't work.  I don't know what this particular exception is,
> but you can avoid this situation entirely by just not doing it.

--
=====================================================
John Cartwright
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6284
[EMAIL PROTECTED]
=====================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to