가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

모의 시험

홈페이지로 설정

이 페이지 북마크

이메일 주소 구독

Tomcat 면접 질문과 답변

관련 차이점

Jboss vs Tomcat

Ques 6. How will you load properties file?

  • Use a ResourceBundle. See the Java docs for the specifics of how the ResourceBundle class works. Using this method, the properties file must go into the WEB-INF/classes directory or in a jar file contained in the WEB-INF/lib directory. 
  • Another way is to use the method getResourceAsStream() from the ServletContext class. This allows you update the file without having to reload the webapp as required by the first method. Here is an example code snippet, without any error trapping: 
// Assuming you are in a Servlet extending HttpServlet
// This will look for a file called "/more/cowbell.properties" relative
// to your servlet Root Context
InputStream is = getServletContext().getResourceAsStream("/more/cowbell.properties");
Properties p = new Properties();
p.load(is);
is.close();

도움이 되었나요? Add Comment View Comments
 

Ques 7. What is different between webserver and application server?

The basic difference between a web server and an
application server is Webserver can execute only web applications i,e servlets and JSPs and has only a single container known as Web container which is used to interpret/execute web
applications.
Application server can execute Enterprise application, i,e (servlets, jsps, and EJBs) it is having two containers
1. Web Container(for interpreting/executing servlets and jsps)
2. EJB container(for executing EJBs). it can perform operations like load balancing , transaction demarcation etc.

도움이 되었나요? Add Comment View Comments
 

Ques 8. How do you create multiple virtual hosts?

If you want tomcat to accept requests for different hosts e.g. www.myhostname.com then you must

  • Create ${catalina.home}/www/appBase , ${catalina.home}/www/deploy, and ${catalina.home}/conf/Catalina/www.myhostname.com
  • Add a host entry in the server.xml file 
  • Create the the following file under conf/Catalina/www.myhostname.com/ROOT.xml 
  • Add any parameters specific to this hosts webapp to this context file 
  • Put your war file in ${catalina.home}/www/deploy 
  • When tomcat starts, it finds the host entry, then looks for any context files and will start any apps with a context.
To add more sites just repeat and rinse, all webapps can share the same war file location and appbase.

도움이 되었나요? Add Comment View Comments
 

Ques 9. Can I set Java system properties differently for each webapp?

No. If you can edit Tomcat's startup scripts, you can add "-D" options to Java. But there is no way to add such properties in web.xml or the webapp's context.

도움이 되었나요? Add Comment View Comments
 

Ques 10. How do I configure Tomcat to work with IIS and NTLM?

Follow the standard instructions for when the isapi_redirector.dll

  • Configure IIS to use "integrated windows security"
  • In server.xml, make sure you disable tomcat authentication: 
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" tomcatAuthentication="false" />

도움이 되었나요? Add Comment View Comments
 

Most helpful rated by users:

Copyright © 2026, WithoutBook.