Java Message Service (JMS) Question:
Must I place all my class files in the WEB-INF folder and all JSP's outside?
Answers:
Answer #1The class files should place into WEB-INF/classes folder and the JSP files should place within a separate folder.
Answer #2Yes! 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.
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 #3Yes, class files is private resources, so you must store class in WEB-INF/classes folder.
JSP and HTML files should be placed outside.
JSP and HTML files should be placed outside.
Answer #4Class 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 #5Here 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)
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 #61. 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.
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 #7The 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
Previous Question | Next Question |
What is JMS? | What type messaging is provided by JMS? |