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

JSTL display browser specific

 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried this code in JSP and tomcat 5


when I ran it in Firefox it displays


and page source shows


when i ran it in IE it displays

in browser

and page source same as firefox.

I think if you do not mention taglib for actions such as c:out then it is sent as template text i.e html. Then why is firefox not displaying it?

Source is q.63 page 858 HF mock exam
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65337
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your syntax is hosed. When that happens, the browsers will do whatever it is they do.
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As bear said, your syntax of c:out is wrong. As you can see from the output HTML the c:out tag makes it to the browser, while it should be executed on the server. Check the c:out tag again to see what you are missing...
 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and thanks Bear I understand that result is browser specific . J2EE did its work by hosing it as html.


Hi Ankit,
I know its wrong ,it does not have a jstl taglib declaration.

I kept it wrong so that I can get it to reach the browser,

my question is if its plain html then why didn't firefox dislay it? where IE displayed it as html.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic