• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Customizing the included content with jsp:param.

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
According to page 408 i have 3 jsp(custom1.jsp,custom2.jsp,custom3.jsp) .When i open custom1.jsp and click on submit button i get java EL as output on my browser, whereas i am expecting this is funny. Have i got wrong somewhere or i have mis-understood the concept.pls help!

N C

custom1.jsp
----------
<html>

<form action="custom3.jsp">

<input type="text" name="textname" value="java EL">
<br>
<input type="submit" name="submit" value="submit">

</form>
</html>

custom2.jsp
-----------
<em><strong> ${param.textname} </strong></em>

custom3.jsp
-----------

<html>

<jsp:include page="include2.jsp">
<jsp aram name="textname" value="this is funny" />
</jsp:include>

${param.textname}

</html>
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
You are including "include2.jsp" instead of "custom2.jsp". When you include "custom2.jsp" you will get the following output.


this is funny
Java EL

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have changed include2.jsp to custom2.jsp but i am still getting java EL as output
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try putting this line on the top of custom2.jsp and custom3.jsp and you will be fine:

<%@ page isELIgnored ="false" %>
 
I need a new interior decorator. This tiny ad just painted every room in my house purple.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic