Introduction

Many different tools and approaches can be used to build a website. Pages authored in HTML, CSS and JavaScript are typically served to users via a server-side language — most commonly PHP, C# (ASP/.NET), or Java (JSP/Servlet, JSF).

Most ready-made web publishing platforms today are built on PHP. If you don't know PHP, or if you'd rather leverage a powerful language like Java, your options narrow quickly. That's where Java Basic Content Adviser (JBCA) comes in: a complete, ready-to-use web infrastructure built on Java, HTML5, JavaScript, Bootstrap and related technologies.

The rest of this article walks through how JBCA can be used to manage website content and serve pages to visitors via JSP/Servlet — step by step.

Page Design

Bootstrap is an excellent choice for building web page layouts. You can design the pages yourself or bring in a graphic designer for professional results. Either way, the output — HTML files, JavaScript, stylesheets and image assets — needs to be ready as files before you begin loading content into JBCA.

📷 01 — Project file structure overview
Project file structure

Saving Page Content

HTML pages are saved to the database through the JBCA page management interface. This centralises content changes and ensures every page is served from a consistent, controlled structure.

📷 02 — Saving HTML content via JBCA page manager
Page save screen

Theme Management

Themes define the central content area of a page together with its header, footer, navigation and sidebar sections. By editing a theme fragment rather than every individual page, sitewide layout changes become a single operation.

📷 03 — Theme configuration screen
Theme management

Creating a link record allows JSP to assemble the page's main content area together with any associated sidebar sections and deliver them all to the visitor in a single response.

📷 04 — Link record creation screen
Link record

Pages connected to themes are mapped and identified within the theme configuration.

📷 05 — Theme-to-page mapping screen
Theme-page mapping

A dedicated management screen handles navigation menus. Menu content can be updated as raw HTML text, or loaded from a file upload. Menus are bound to a theme and therefore automatically applied to all pages using that theme.

📷 06 — Menu management screen
Menu management

CSS & JavaScript Code Management

Dedicated code management screens let you store CSS stylesheets, JavaScript files and other browser-side scripts directly in the database alongside your page content.

📷 07 — Code (CSS/JS) management screen
Code management screen

Binary File Management

Binary files saved to the database can be retrieved, downloaded and deleted at any time, providing a complete file lifecycle management loop within the same interface.

📷 08 — Binary file management screen
File management

Contact Messages

The contact screen lists and displays all messages submitted through the website's contact form, keeping visitor enquiries in one accessible place.

📷 09 — Contact messages screen
Contact messages

Eclipse — Project Structure

An overview of the project as it appears in the Eclipse IDE.

📷 10 — Eclipse project overview
Eclipse project structure

A closer look at the JSP files inside the WebContent folder.

📷 11 — WebContent / JSP file listing
JSP files

Assembling HTML Fragments in JSP

As an example, hizmetler.jsp assembles multiple HTML fragments on the server and delivers the complete, composed page to the visitor.

📷 12 — hizmetler.jsp — HTML fragment assembly
JSP HTML assembly
📷 13 — hizmetler.jsp — continued
JSP code continued

LinPageBean — Fetching HTML from the Database

LinPageBean is the class responsible for retrieving HTML fragments and code segments from the database for JSP page composition.

📷 14 — LinPageBean class
LinPageBean

After the initial values are set, the getLinPage(String linkName) method retrieves the linked main page and its associated theme information.

📷 15 — getLinPage() method
getLinPage method

The individual HTML page sections are then fetched from the database using getThemePage(String position).

📷 16 — getThemePage() method
getThemePage method

Finally, the navigation menu section is retrieved via the getMenuStr() method.

📷 17 — getMenuStr() method
getMenuStr method
💡 JBCA (Java Basic Content Adviser) provides a fast and reliable content management infrastructure through a straightforward code structure and database-backed HTML page sections. With Java skills alone, you gain a powerful web development solution that stands as a strong alternative to PHP-based CMS platforms.