How are you declaring your web.xml file. If you are declaring with the servlet 2.3 DTD, you won't be able to use the ${} operators available in the JSP 2 spec. Use the 2.4 schema instead.

<?xml version="1.0" encoding="ISO-8859-1"?>

<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”>


--David

[EMAIL PROTECTED] wrote:

Hi There,
i've build an app with jsp pages which use a bean and calls java classes. This works fine & dandy, outside of a war file.


However, i've placed the app within a war file under webapps, removed the original directories etc & and restarted tomcat.

Now when i load my jsp page, the tag libs dont seem to work, ie i have the following code in my jsp page:

<%@ taglib prefix="c" uri="_http://java.sun.com/jsp/jstl/core_ (http://java.sun.com/jsp/jstl/core) " %>
<jsp:useBean id="nc" class="hall.CheckStandAlone" scope="page" />
<jsp:setProperty name="nc" property="phone" value="${param['phone']}" />


using a war file it logs:
INFO Check - number:${param['phone']}

instead of logging:

INFO Check - number:01215554455

So, basically the same code works ok outisde of the war container, but fails within the war container. Inside the war container the jsp page does not seem to be able to interpret the ${param['phone']} to an actual value.

Any suggestions on what is wrong here? I am using Tomcat version 5.5.7, java version 1.5








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



Reply via email to