This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Customizing the included content with jsp:param.

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • 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>
 
Osama Hasan
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I have changed include2.jsp to custom2.jsp but i am still getting java EL as output
 
Jingh Yi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • 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" %>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic