Additional Jeamlit features
So you've read all about Jeamlit's Basic concepts and gotten a taste of caching and Session State in Advanced concepts. But what about the bells and whistles? Here's a quick look at some extra features to take your app to the next level.
Pages
As apps grow large, it becomes useful to organize them into multiple pages.
This makes the app easier to manage as a developer and easier to navigate as a user. Jeamlit provides a
powerful way to create multipage apps using Jt.page
and Jt.navigation
.
Just create your pages and connect them with navigation as follows:
- Create an entry point class that defines and connects your pages
- Create separate Java classes for each page's content
- Use
Jt.page
to define your pages andJt.navigation
to connect them
Here's an example of a three-page app:
App.java
import io.jeamlit.core.Jt;
import io.jeamlit.core.Page;
import java.util.List;
public class App {
public static void main(String[] args) {
// register the pages
var currentPage = Jt.navigation(Jt.page(MainPage.class).title("Main Page").icon("š"),
Jt.page(Page2.class).title("Page 2").icon("āļø"),
Jt.page(Page3.class).title("Page 3").icon("š")).use();
// run the current page
currentPage.run();
}
// Page 1
public static class MainPage {
public static void main(String[] args) {
Jt.title("Main Page š").use();
Jt.markdown("Welcome to the main page!").use();
}
}
// Page 2
public static class Page2 {
public static void main(String[] args) {
Jt.title("Page 2 āļø").use();
Jt.text("This is the second page").use();
}
}
// Page 3
public static class Page3 {
public static void main(String[] args) {
Jt.title("Page 3 š").use();
Jt.markdown("This is the **third** page!").use();
}
}
}
Now run jeamlit run App.java
and view your shiny new multipage app! The navigation menu will automatically appear, allowing users to switch between pages.

Our documentation on Multipage apps teaches you how to add pages to your app, including how to define pages, structure and run multipage apps, and navigate between pages. Once you understand the basics, create your first multipage app!
Custom components
If you can't find the right component within the Jeamlit library, you can build your own with Jeamlit's components API. If you think a component should be part of the official Jeamlit library, reach out on the forum.
Static file serving
As you learned in Jeamlit fundamentals, Jeamlit runs a server that clients connect to. That means viewers of your app
don't have direct access to the files which are local to your app.
Most of the time, this doesn't matter because Jeamlit commands handle that for you.
When you use Jt.image(<path-to-image>)
your Jeamlit server will access the file and handle the necessary
hosting so your app viewers can see it. However, if you want a direct URL to an image or file you'll need to
host it.
In Standalone mode, this requires creating a directory named static
next to your app class.
For example, your project could look like:
your-project/
āāā static/
ā āāā my_hosted-image.png
āāā YourApp.java
In Embedded mode, this requires creating a directory named static
in your resources
folder.
For example, your maven project could look like:
your-project/
āāā static/
ā āāā my_hosted-image.png
āāā src/
ā āāā main
ā āāā java
ā āāā YourApp.java
ā āāā resources
ā āāā static
ā āāā my_hosted-image.png
āāā pom.xml
To learn more, read our guide on Static file serving.
App testing
Good development hygiene includes testing your code. Automated testing allows you to write higher quality code, faster! Jeamlit has a built-in testing utilities. Learn more in our guide to App testing.
Still have questions?
Go to our discussions forum for helpful information and advice from Jeamlit experts.