Tất Cả Khoá Học
Frontend
Học HTML5 - CSS3
Học Bootstrap
Học JS
Học JQuery
AngularJS
ReactJS
Java
Java Basic
Java Advanced
JSP Servlet
Java Web + EJB (EAD)
Java Web + WebService
Java Web + EA
Spring MVC
Mobile
Lập Trình Android Java
Lập Trình Flutter
CSDL
SQL Server/MySQL
Khác
Lập Trình C
C Sharp
Học PHP
Học Laravel
Git/Github
Blog
Phỏng Vấn
Jobs & Lập Trình Thời AI
Tin Tức & Công Nghệ
Review Công Nghệ
Phần Mềm & Tiện Ích
Trắc Nghiệm & Học Sinh
Thông Tin Hữu Ích
Quiz
Tools
Thiết Kế Web
Liên Hệ
Đăng nhập
QL - Bài Tập & Khoá Học
Tiếp Thị Liên Kết
Thoát
Light
Dark
Auto
Menu
Bài Tập
Bài Tập - Đăng Ký & Đăng Nhập - Lập trình JSP/Servlet - WCD
Bài tập - Tra cứu thông tin cá nhân - lập trình Java Web - JSP/Servlet
Bài tập ôn luyên EL & JSTL trong JSP/Servlet - Lập trình JSP/Servlet
Bài tập quản lý sản phẩm sử dụng Session, JSTL, JavaBean trong lập trình JSP/Servlet
Dự án quản lý sinh viên + CSDL - Database SQL Server - MySQL - Lập trình JSP/Servlet
Thiết kế web tin tức - lập trình JSP/Servlet
Bài tập - Thiết kế website bán đồ điện tử - Lập trình JSP/Servlet
Bài tập - viết flow đăng nhập - Lập trình JSP/Servlet
Bài tập - Thiết kế website bán hàng lưu niệm - giỏ hàng, thanh toán - Lập trình JSP Servlet
Bài tập - Quản lý sách & tác giả - Lập trình JSP/Servlet
Bài tập - Hiển thị thông tin sinh viên - fake dữ liệu - truyền dữ liệu từ Servlet tới JSP - Lập trình JSP/Servlet
Bài Tập - Đăng Ký & Đăng Nhập - Ứng dụng session servlet - Lập trình JSP/Servlet
Bài tập - Quản lý sản phẩm sử dụng Session - Lập trình JSP/Servlet
Bài Tập Thiết Kế Calculator Online - Lập trình JSP/Servlet
Bài tập - quản lý sinh viên sửa dụng session - Lập trình JSP/Servlet
Bài Tập - Giải phương trình bậc 2 & lưu log xử lý - Lập trình JSP/Servlet
Bài tập - Phân layout trong JSP - Tìm hiểu đối tượng mặc định trong JSP - Lập trình JSP Servlet
Quản lý sách - Khoá học lập trình JSP/Servlet
Trắc Nghiệm
Trắc Nghiệm Ôn Tập JSP / Servlet
JSP Servlet
Trắc Nghiệm Ôn Tập JSP / Servlet
Previous
Next
Câu hỏi 1: Which of the following is an advantage of Web applications mentioned in the document?
A: Platform independence
B: Higher maintenance costs
C: Restricted visibility
D: Difficult access to information
Đáp án: A
Câu hỏi 2: Which protocol offers 'Reduced Lag' and 'Stronger Security' compared to its predecessors?
A: HTTP/1.0
B: HTTP/1.1
C: HTTP/2
D: HTTP/3
Đáp án: D
Câu hỏi 3: What is the primary role of a Web container in a Java Web application?
A: To design visually appealing Web pages
B: To manage servlets and provide a runtime environment
C: To act as a database server
D: To provide client-side scripting support
Đáp án: B
Câu hỏi 4: In the Web application workflow, which component processes the request and generates the response?
A: Request Object
B: Servlet
C: Web Server
D: Browser
Đáp án: B
Câu hỏi 5: Which file extension is used to package Java Web applications for deployment?
A: .jar
B: .war
C: .exe
D: .zip
Đáp án: B
Câu hỏi 6: Which HTTP method is typically used to retrieve data from a server?
A: POST
B: PUT
C: GET
D: DELETE
Đáp án: C
Câu hỏi 7: What was the previous name of the Jakarta EE platform?
A: Java SE
B: Java EE
C: Jakarta JS
D: Java ME
Đáp án: B
Câu hỏi 8: Which Jakarta EE profile contains Core, Web services, plus Mail and Messaging?
A: Web Profile
B: Platform Profile
C: Core Profile
D: Micro Profile
Đáp án: B
Câu hỏi 9: What is a disadvantage of using Jakarta EE for small applications?
A: Lack of scalability
B: Complexity
C: Platform dependence
D: Proprietary solutions
Đáp án: B
Câu hỏi 10: Which Apache Tomcat responsibility involves executing and unloading servlet classes?
A: Designing HTML pages
B: Managing database tables
C: Servlet management
D: Writing Java code
Đáp án: C
Câu hỏi 11: Which directory in a Web application structure contains the 'web.xml' file?
A: src
B: WEB-INF
C: lib
D: bin
Đáp án: B
Câu hỏi 12: Which servlet lifecycle method is called exactly once when the servlet is first loaded?
A: service()
B: destroy()
C: init()
D: doGet()
Đáp án: C
Câu hỏi 13: Which HTTP status code indicates 'Resource not found'?
A: 500
B: 401
C: 404
D: 301
Đáp án: C
Câu hỏi 14: Which technique for session tracking involves adding data to the end of a URL?
A: Cookies
B: URL rewriting
C: Hidden form fields
D: HttpSession
Đáp án: B
Câu hỏi 15: What is the purpose of the 'invalidate()' method in HttpSession?
A: To create a new session
B: To destroy data in a session for security
C: To refresh the page
D: To store a cookie
Đáp án: B
Câu hỏi 16: Which JSP element is used to embed Java code within HTML?
A: Expression
B: Scriptlet
C: Directive
D: Declaration
Đáp án: B
Câu hỏi 17: Why do servlets generally run faster than JSP pages during initial execution?
A: JSP is not Java-based
B: JSP takes time to compile into servlets
C: Servlets do not use a container
D: Servlets use only HTTP/3
Đáp án: B
Câu hỏi 18: Which JSP directive is used to insert content of another resource at runtime?
A: page
B: taglib
C: include
D: forward
Đáp án: C
Câu hỏi 19: What is a 'filter chain' in Jakarta Servlets?
A: A list of database queries
B: More than one filter existing between client and servlet
C: A series of HTML tags
D: Sequence of JSP lifecycle methods
Đáp án: B
Câu hỏi 20: Which technology is an ORM that persists entities in a database?
A: JDBC
B: JPA
C: JSON
D: JSF
Đáp án: B
Câu hỏi 21: What is the main advantage of the DAO pattern?
A: Faster page rendering
B: Separates business logic from database access
C: Automatic HTML generation
D: Increases network lag
Đáp án: B
Câu hỏi 22: In asynchronous processing, what happens to a servlet thread waiting for a resource?
A: It is terminated immediately
B: It is returned to the thread pool
C: It blocks all other threads
D: It creates a new JSP page
Đáp án: B
Câu hỏi 23: Which JSP implicit object represents the output stream sent to the client?
A: request
B: session
C: out
D: config
Đáp án: C
Câu hỏi 24: In the MVC architecture, which component typically acts as the controller?
A: JSP Page
B: Servlet
C: Database
D: HTML File
Đáp án: B
Câu hỏi 25: Which operator is used in JSP EL to access the value of a variable?
A: Dot operator (.)
B: Plus operator (+)
C: Arrow operator (->)
D: Colon operator (:)
Đáp án: A
Câu hỏi 26: What does the 'isThreadSafe' option in a JSP page identify?
A: If the page is encrypted
B: If the page can process multiple threads simultaneously
C: If the database is secure
D: If the JSP is using taglib
Đáp án: B
Câu hỏi 27: Which HTTP method is used to update an existing resource?
A: GET
B: PUT
C: DELETE
D: HEAD
Đáp án: B
Câu hỏi 28: What is the primary technology used for communication on the Web?
A: HTML and HTTP
B: Java and C++
C: SQL and Oracle
D: XML and JSON
Đáp án: A
Câu hỏi 29: Which component manages mapping URLs to specific servlets?
A: Web Server
B: Web Container
C: Database Server
D: Client Browser
Đáp án: B
Câu hỏi 30: The Microservices architecture is characterized as being:
A: A single-block application
B: Modular and lightweight
C: Purely client-side
D: Based only on raw data logs
Đáp án: B
Câu hỏi 31: Which Jakarta EE profile is tailored for Web application services?
A: Core Profile
B: Platform Profile
C: Web Profile
D: Persistence Profile
Đáp án: C
Câu hỏi 32: Which IDE is frequently used for Java, Ruby, and Python development?
A: Visual Studio
B: Eclipse IDE
C: IntelliJ IDEA
D: NetBeans
Đáp án: B
Câu hỏi 33: What is the default port for Apache Tomcat mentioned in the guide?
A: 80
B: 443
C: 8080
D: 3306
Đáp án: C
Câu hỏi 34: What is the primary function of the 'web.xml' file?
A: To store database passwords
B: To describe deployment details of the application
C: To provide CSS styles
D: To compile Java classes
Đáp án: B
Câu hỏi 35: Which package contains classes for HTTP-specific servlets?
A: jakarta.servlet
B: jakarta.servlet.http
C: jakarta.enterprise
D: java.sql
Đáp án: B
Câu hỏi 36: Which method retrieves a specific initialization parameter for a servlet?
A: getInitParameterNames()
B: getInitParameter(String name)
C: setAttribute()
D: getWriter()
Đáp án: B
Câu hỏi 37: What does HTTP status code 500 indicate?
A: Bad Request
B: Unauthorized
C: Internal Server Error
D: Moved Permanently
Đáp án: C
Câu hỏi 38: How are 'Hidden Form Fields' implemented in HTML?
A: Using encrypted tags
B: Using
C: Stored only on the server
D: Blocked by firewalls
Đáp án: B
Câu hỏi 39: What is a 'Cookie' in web development?
A: A small Java program
B: Information sent by server and stored by browser
C: A database table
D: An error code
Đáp án: B
Câu hỏi 40: Which setting prevents cookie access by client-side scripts?
A: setSecure()
B: setHttpOnly(true)
C: invalidate()
D: setMaxInactiveInterval()
Đáp án: B
Câu hỏi 41: What does JSON stand for?
A: Java Server Object Notation
B: JavaScript Object Notation
C: Java Simple Output Network
D: Java Standard Object Node
Đáp án: B
Câu hỏi 42: Which JSP phase converts the page into a Servlet?
A: Execution
B: Translation
C: Destruction
D: Request
Đáp án: B
Câu hỏi 43: A 'scriptlet' in JSP contains:
A: CSS blocks
B: Java code within HTML
C: SQL statements only
D: JavaScript functions
Đáp án: B
Câu hỏi 44: Which JSP directive links the page to custom tags?
A: page
B: include
C: taglib
D: action
Đáp án: C
Câu hỏi 45: Which component intercepts requests between client and servlet?
A: Servlet
B: Filter
C: Listener
D: Context
Đáp án: B
Câu hỏi 46: What is an 'annotation' in Servlet API?
A: Database index
B: Metadata attached to code elements
C: Visual theme
D: Security certificate
Đáp án: B
Câu hỏi 47: Which annotation is used for file upload configuration?
A: @WebServlet
B: @MultipartConfig
C: @WebFilter
D: @Entity
Đáp án: B
Câu hỏi 48: What does JDBC stand for?
A: Java Database Connection
B: Java Database Connectivity
C: Joint Database Core
D: Java Data Binding Code
Đáp án: B
Câu hỏi 49: In JPA, a persistent object (POJO) is called an:
A: Servlet
B: Entity
C: Context
D: Filter
Đáp án: B
Câu hỏi 50: Which mechanism uses XMLHttpRequest for asynchronous updates?
A: SQL
B: AJAX
C: JPA
D: JDBC
Đáp án: B
Câu hỏi 51: What is a key difference between HTTP 1.0 and 1.1?
A: 1.1 is stateless
B: 1.1 supports persistent connections
C: 1.1 only works with JSPs
D: There is no difference
Đáp án: B
Câu hỏi 52: Which JSP implicit object provides access to all others?
A: pageContext
B: application
C: session
D: response
Đáp án: A
Câu hỏi 53: In MVC, which component handles presentation?
A: Controller
B: Model
C: View
D: Service
Đáp án: C
Câu hỏi 54: JSP Model II is an implementation of which pattern?
A: Singleton
B: MVC
C: DAO
D: Factory
Đáp án: B
Câu hỏi 55: Which EL operator represents logical 'AND'?
A: ||
B: &&
C: !
D: ==
Đáp án: B
Câu hỏi 56: What is the purpose of a TLD file?
A: To style the page
B: To map function names to EL
C: To encrypt the database
D: To define project name
Đáp án: B
Câu hỏi 57: Which method sets an attribute in application scope?
A: getAttribute()
B: setAttribute()
C: removeAttribute()
D: setInitParameter()
Đáp án: B
Câu hỏi 58: What does 'beginRequest()' do in JDBC 4.3?
A: Closes connection
B: Informs driver a request is starting
C: Executes SQL
D: Creates table
Đáp án: B
Câu hỏi 59: Which interface supports asynchronous processing in Servlets?
A: AsyncContext
B: AsyncListener
C: ServletContext
D: HttpServlet
Đáp án: A
Câu hỏi 60: What information does a Response Header typically contain?
A: User passwords
B: Metadata like file size and type
C: HTML body content
D: Database table list
Đáp án: B
Câu hỏi 61: Which corporation managed Java EE after Sun Microsystems?
A: Microsoft
B: Oracle Corporation
C: Google
D: IBM
Đáp án: B
Câu hỏi 62: The Jakarta EE Web Profile is intended for:
A: Foundational Services only
B: Web Applications Services
C: Batch Processing
D: Mobile Development
Đáp án: B
Câu hỏi 63: Eclipse IDE feature for annual updates and plug-ins is:
A: Perspective
B: Software Update
C: Code Completion
D: Workspace
Đáp án: B
Câu hỏi 64: The 'lib' folder in a WAR file is used to store:
A: HTML files
B: Compiled .class files
C: JAR library files
D: Deployment descriptors
Đáp án: C
Câu hỏi 65: Which lifecycle method is called when a servlet is taken out of service?
A: init()
B: service()
C: destroy()
D: stop()
Đáp án: C
Câu hỏi 66: What does a '302 Found' status code represent?
A: Permanent move
B: Temporary replacement/redirect
C: Success
D: Server down
Đáp án: B
Câu hỏi 67: Which session tracking technique is described as 'Lowest priority'?
A: Cookies
B: URL rewriting
C: Hidden form fields
D: JSON Binding
Đáp án: B
Câu hỏi 68: What is 'JSON Serialization'?
A: Decoding string to object
B: Converting Java objects to JSON string
C: Deleting a JSON file
D: Formatting HTML
Đáp án: B
Câu hỏi 69: Which JSP tag outputs simple values or calculation results?
A: Scriptlet
B: Expression
C: Declaration
D: Directive
Đáp án: B
Câu hỏi 70: A listed demerit of using Servlets is:
A: Platform dependence
B: Extensive knowledge required
C: High infrastructure cost
D: Slow execution
Đáp án: B
Câu hỏi 71: Which MVC component contains business logic functions?
A: View
B: Controller
C: Model
D: Dispatcher
Đáp án: C
Câu hỏi 72: What does the 'taglib' directive specify?
A: CSS location
B: Custom tag library description
C: Page encoding
D: Error logs
Đáp án: B
Câu hỏi 73: The Filter API includes which interfaces?
A: ServletConfig
B: Filter, FilterConfig, FilterChain
C: JDBC Driver
D: AsyncContext
Đáp án: B
Câu hỏi 74: What is 'Server Push' in Servlet 6.0?
A: Client sending data
B: Server sending resources pre-emptively
C: Deleting database records
D: Error handling
Đáp án: B
Câu hỏi 75: Which listener monitors session creation/destruction?
A: ServletContextListener
B: HttpSessionListener
C: ServletRequestListener
D: HttpSessionAttributeListener
Đáp án: B
Câu hỏi 76: Which JSP implicit object shares data across the entire application?
A: session
B: application
C: request
D: page
Đáp án: B
Câu hỏi 77: In JSP EL, 'Coercion' refers to:
A: Deleting variables
B: Automatic type conversion
C: Encrypting URLs
D: Private method calls
Đáp án: B
Câu hỏi 78: Which component manages servlet lifecycle and access rights?
A: Browser
B: Web Container
C: SQL Driver
D: HTML Validator
Đáp án: B
Câu hỏi 79: Platform independence in Web apps means:
A: No internet needed
B: Cross-OS access via browser
C: Auto data entry
D: Lower security risks
Đáp án: B
Câu hỏi 80: Which JSP element provides page-wide info during translation?
A: Expression
B: Directive
C: Scriptlet
D: Comment
Đáp án: B
DEV
My Quiz
Developer Toolbox
×
INPUT AREA
➜
⬅
OUTPUT AREA
TEXT CASE
UPPER
lower
Capitalize
Title Case
FORMAT & CLEAN
Trim
Slug
Strip HTML
Reverse
ENCODE & DECODE
B64 Enc
B64 Dec
URL Enc
URL Dec
JSON & CRYPTO
JSON Beauty
JSON Mini
MD5
SHA256
Nhấn ESC để thoát
Đã sao chép!!!
Hotline: 0967025996