Java Message Service (JMS) Question:
Download Questions PDF

Must I place all my class files in the WEB-INF folder and all JSP's outside?

Answers:

Answer #1
The class files should place into WEB-INF/classes folder and the JSP files should place within a separate folder.

Answer #2
Yes! Otherwise the web server/ application server cannot access the .jsp files and classes.
The java class files can be placed either in WEB-INF/lib or WEB-INF/classes. But it is recommended to put the class files in WEB-INF/classes. The server will load the files from the classpath so it just will not matter where the class is.

Answer #3
Yes, class files is private resources, so you must store class in WEB-INF/classes folder.
JSP and HTML files should be placed outside.

Answer #4
Class files inside web-inf cannot be access by browsers, while the JSP files are meant for accessible by browsers so, it may be strictly place outside the web-inf only.

Answer #5
Here is structure of web app.
web (this folder is Accessible from www)
Store all your JSP and HTML files here
WEB-INF (this folder is not Accessible )
classes (store your classes here, classes you are using in jsp
lib (store 3rd party jars)

Answer #6
1. Class files - Either they must be in WEB-INFclasses directory OR you can package them as JAR and put in WEB-INFlib
2. JSP files - Depends how do you design your arch. If you have controller/delegator that can forward requests to JSPs, you can keep them under WEB-INF directory also. If not, you have to keep them outside WEB-INF.

Answer #7
The Java Message Service (JMS) API is a messaging standard that allows application components based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous

Download Java Message Service (JMS) Interview Questions And Answers PDF

Previous QuestionNext Question
What is JMS? What type messaging is provided by JMS?