• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:setProperty question on ENthuware com.enthuware.ets.scwcd.v5.2.450

 
Conor S D'Arcy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'll be giving the SCWCD a go tomorrow. I've got the enthuware mock exams and got this question and answers:
Identify two statements that are doing the same task.
1. <%= ticket.price %>
2. <%= ticket.getPrice() %>
3. <jsp.getProperty name="ticket" property="price" />
4. <% ticket.getPrice() %>
5. <%= ticket.getPrice(); %>

I chose 2 and 3, but the answer given is 1 and 3. I tried building a test page and option 1 wouldn't compile for me (albeit on Tomcat 6 rather than 5). Am I missing something at this late stage (gulp!) or is the answer given wrong?

Thanks very much,
ConorD

test jsp page:


test Ticket class
 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't worry answer will be 2 and 3 only

but
3. <jsp.getProperty name="ticket" property="price" />
this shall be

3. <jsp:getProperty name="ticket" property="price" />

you have put a dot in place of colon
3. <jsp.getProperty name="ticket" property="price" />
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Conor, welcome to javaranch.

Your answer is right, it should be 2 and 3. Don't stress yourself too much before the exam. Relax, you'll do great in the exam. Best of luck
 
Conor S D'Arcy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Parth and Ankit
- That was my typo, Enthuware has jsp:property rather than the jsp.property that I had typed. However, the original point still stands that answer 1 wouldn't compile... after reading your replies I'll award myself an extra % for that question :-)

Thanks again and Take care,
ConorD
 
Patrick Flood
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let us know how you get on. You were getting slightly higher Enthuware results than me so I will be interested to know if you passed. Mine is on Friday.
 
Conor S D'Arcy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I got through yesterday with 89% Thanks all for your encouragement :wink:
Good luck tomorrow Patrick!
I got caught a bit on Java basics, e.g. in a Servlet where out is correctly declared


- would that print
x text is: null
or throw an NPE?
I simply couldn't remember in the exam - paralysis by analysis!

Take care & thanks again,
Conor
 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that would print null

And congrats,, all the best Patrick..

regards,,
Parth
 
Patrick Flood
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fair play Conor, great result!
 
Conor S D'Arcy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Parth!

I hope Friday was a happy day for you Patrick!

Best Regards,
Conor
 
Patrick Flood
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was Conor! I got 80%. Absolutely delighed. In Berlin celebrating with some of their fine beers
 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats Patrick
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3711
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Conor,
Congratulations on passing the exam!

I just looked at the question you've mentioned and it shows options 2 and 3 (and not 1 and 3) as the right options, which is correct

thank you,
Paul.
 
Conor S D'Arcy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Patrick, well done! You picked a great place to celebrate in - Berlin ist einfach klasse :beerchug: I celebrated in Kilkenny :)

Thanks for checking on the question Paul. I thought my copy had 1 & 3 marked...it could have been nervousness/lack of sleep at that stage.

Regards all,
Conor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic