• 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
Posts: 65664
129
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: 9597
36
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!