Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2006, 07:36 AM
Registered User
 
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default JSP2 EL/JSTL being ignored

After reading 'Beginning Java Server Pages'
I recently upgraded from j2sdk 1.4 to j2se 1.5.0_06
and Tomcat from 4.0 to 5.5.15
I am still using j2sdkee 1.3

I have built a system to the MVC architecture and now want to write all new JSP using EL/JSTL.

As a test I wrote the following jsp2Test.jsp and it appears the core tags are ignored. Then I added ...

    <jsp-config>
      <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <el-enabled>true</el-enabled>
        <scripting-enabled>true</scripting-enabled>
      </jsp-property-group>
    </jsp-config>

... to my deployment descriptor, which resulted in no change.

In this jsp2Test.jsp file only the last two lines(+) of template data are output as follows without any EL translation, with or without a request param:

buyer = ${buyer}
param.buyer is ... [${param.buyer}]

I imagine JSP is bundled with j2ee and not j2se.
Do I need to upgrade my j2ee ????
or am I missing something else.
Would appreciate some help here.
Ron...

<!--
  File: jsp2Test.jsp
  Author: Ron Masters
  Date: 22-Feb-2006
  Description: test JSP 2, EL & core taglib
               under Tomcat 5.5 and J2SE 1.5.0_06
-->

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title></title></head>
<body>


 <c:if test="${empty param.buyer}">
   test.jsp - param.buyer is empty
   <br> setting pageScope param buyer to "Ron"
   <c:set var="buyer" value="Ron" />
 </c:if>

 <c:if test="${empty buyer}">
   test.jsp - previous set pageScope param buyer is empty ... setting to "Alan"
   <c:set var="buyer" value="Alan" />
 </c:if>

buyer = ${buyer}
<br>param.buyer is ... [${param.buyer}]

</body>
</html>






Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP2 EL / JSTL ignored ronMasters BOOK: Beginning JavaServer Pages 2 November 6th, 2008 07:09 AM
Problem with EL in JSP IronStar JSP Basics 1 January 31st, 2007 11:54 PM
EL Syntax error savoym JSP Basics 0 November 2nd, 2006 04:48 PM
About EL motofree Java Basics 0 March 1st, 2006 05:07 AM
BEGINNING JSP2.0 sourav_banerjee JSP Basics 1 September 14th, 2004 01:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.