• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment environment can only have complied file?

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True/False:

Is it must to compile Servlet before deploy?

Is it must to compile JSP before deploy?

My guesses are: True and True

Please comments.

Thanks.
 
pooja jain
greenhorn
Ranch Hand
Posts: 213
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, they can be compiled on first request.
 
Nazneen Shaikh
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say it is 1) true and 2) is false
 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by pooja jain:
No, they can be compiled on first request.


I think, you are confusing between compiling and loading...

Nazneen,

Why false for JSP...
Thanks.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on the container, it is possible to pre-compile the JSPs, otherwise they get created and compiled when they are first accessed. While the time for this is negligable considering the life of the JSP, it is sometimes desirable or necessary to precompile JSPs when deploying.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets has to be compiled and placed(deployed) in web-inf/classes folder. Container will load the servlet .class files from here.

For jsp files Jasper(or) Jsp Container will do all the work of translating the jsp source code to .java files and compiling it to servlet .class files.

You can find the container generated .java and .class files of your jsp page in tomcat/work folder.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vishnu Prakash:
Servlets has to be compiled and placed(deployed) in web-inf/classes folder. Container will load the servlet .class files from here.


Some containers will compile servlet code on demand.
I know Resin and Orion can do this.
Check your container's documentation.
 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the final answer is False and False. Because question is: is it must to compile....

Right?
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

So the final answer is False and False. Because question is: is it must to compile....


final answer would be "Based on Container "
 
Amarender Reddy
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
final answer should be True and Based on Container

cheers
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the answer is that it's not a True/False question.
Some containers can compile servlets on demand and others can't.
 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
No, the answer is that it's not a True/False question.
Some containers can compile servlets on demand and others can't.


Yes, But if it is true/false question then final answer would be false and false.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rathi ji:
Yes, But if it is true/false question then final answer would be false and false.


If it is about true/false then I wouldn't attempt it, no matter what would be the result.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic