permaculture playing cards*
The moose likes JSP and the fly likes please solve this EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "please solve this EL" Watch "please solve this EL" New topic
Author

please solve this EL

Prashanth reddy
Greenhorn

Joined: Aug 17, 2005
Posts: 18
HI,
I have two jsp pages.
index.jsp,errorpage.jsp.
In index.jsp am calling <jsp:include page="errorpage.jsp"/> meantime i am passing a parameter to display on errorpage.jsp.

Here is the sample code for
index.jsp:
----------
<BODY>
<P>
<jsp:include page="errorpage.jsp">
<jsp:param name="subtitle" value="Page Not Found........."/>
</jsp:include>
</P>
</BODY>

errorpage.jsp:
---------------
<BODY>
<P>Error Message:</P>
<EM><STRONG>${param.subtitle}</STRONG></EM>
</BODY>

Expected output is:
-------------------
Error Message:Page Not Found.........

output am getting is:
---------------------
Error Message:${param.subtitle}


Please help me to get the expected output...
Is there any mistake ??/
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Is the EL working elsewhere in your app?

If not, the most likely problem is that your app is not set up correctly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Prashanth reddy
Greenhorn

Joined: Aug 17, 2005
Posts: 18
Hi,
Thanks for ur response.
yes,EL expressions are not working....
Can You tell me how to setup to work it properly..
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What container are you using?
What version?
What version of the JSP spec does it support?
What does the top of your web.xml file look like? (cut and paste the first half dozen lines).


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Prashanth reddy
Greenhorn

Joined: Aug 17, 2005
Posts: 18
Hi man...
here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp">
<display-name>Sample</display-name>
<context-param>
<param-name>company</param-name>
<param-value>NetXert Inc</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/application-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-application.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/page-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-page.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/request-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-request.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/response-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-response.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/session-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-session.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>jspsql</taglib-uri>
<taglib-location>/WEB-INF/lib/jspsql.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/i18n-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/i18n.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/datetime-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-datetime.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/string-1.0.1</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-string.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/utility</taglib-uri>
<taglib-location>/WEB-INF/lib/utility.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/mailer-1.1</taglib-uri>
<taglib-location>/WEB-INF/lib/taglibs-mailer.jar</taglib-location>
</taglib>
</web-app>


am using J2EE level 1.3.
Prashanth reddy
Greenhorn

Joined: Aug 17, 2005
Posts: 18
am using WSAD 5.0
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Does WSAD 5.0 support Servelts 2.4 and JSP 2.0?
Prashanth reddy
Greenhorn

Joined: Aug 17, 2005
Posts: 18
Yes It is....if u use J2EE 1.4 level.
Prashanth reddy
Greenhorn

Joined: Aug 17, 2005
Posts: 18
Am really sorry...there is no J2EE 1.4 in WSAD 5.0....(only 1.2 and 1.3)
May be it wont support....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

That explains it.

In order to use the EL with JSP 1.2, you need to use it in conjunction with the JSTL 1.0.

In your example, you'd need to use the <cut> tag.

(Note: JSTL 1.0 not 1.1 with JSP 1.2)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: please solve this EL
 
Similar Threads
Customizing the included content with <jsp:param>
EL not displaying
using jsp:param
jspf not working with <jsp:include> and <jsp:param>
Exception: c:catch doubt