Interviewer And Interviewee Guide

Java Message Service (JMS) Interview Question:

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

Submitted by: Administrator
The class files should place into WEB-INF/classes folder and the JSP files should place within a separate folder.
Submitted by: Administrator

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.
Submitted by: Administrator

Yes, class files is private resources, so you must store class in WEB-INF/classes folder.
JSP and HTML files should be placed outside.
Submitted by: Administrator

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.
Submitted by: Administrator

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)
Submitted by: Administrator

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.
Submitted by: Administrator

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
Submitted by: Administrator

Read Online Java Message Service (JMS) Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.