• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Help on one interview question

 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
During one interview, the interviewwer asked me 'How to test JSP?'
Normally I write a JSP and directly test it on Tomcat. But he said it is a wrong and lengthy method to track any error from tomcat. Is there any other way?
Also suggest me ways of testing EJB?
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also ineterested to know how to test a JSP other than bring it up in a browser?
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can't test JSP, was a trick question.
He was bullshitting you, The Enterprise Arch.
and my job always tells us not to place heavy code inside JSP, but in Servlets because you can only test a JSP at Deploy time.
OR, You have a JSP tester inside your IDE
that will run and debug the JSP for you.
EJB? same as above, you have a reference or developer version of the App Server on your local machine that is controlled from within the IDE
So the IDE loads, invokes and debugs the EJB or JSP for you(IN A WAY)
thats it
IF he was talking about adding the jasper engine to you build and actually invoking it without a Servlet Container, He must have been nuts.
That was an unfair and useless question.
A more important question would be how do you
handle and test for JSP Exceptions?
How do you force JSP Exceptions to be handled/debugged to facilitate testing?
Everybody knows that the achilles heel of JSP
and EJB is deployability.
 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know next to nothing about JSPs (I've read the specs and other documentation about 3 years ago, but have never used them). Nonetheless, I would assume that, because it creates a display , you can do some type of GUI testing. I can imagine a robot which enters text in text fields, and clicks buttons, just to insure that such widgets are present in the display. It may be semantics whether this is JSP testing or GUI testing, but I would think this type of test would be possible.
Of course, he was probably hoping to hear an answer along the lines of Cactus.
--Mark
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TagUnit is a utility to do unit testing for JSP tags.
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think he was probably shooting for an answer like httpUnit(just to validate the output) or Cactus.
 
Grishma Dube
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually i came across this question 3-4 times during interviews. And all of them told me that, there is one tool available for testing and debugging jsp, we have to download that tool.
 
reply
    Bookmark Topic Watch Topic
  • New Topic