Thursday, September 24, 2026

Asus eee pc 1215b dual boot (debian and windows), downgrade windows 10 to windows 7 pro x64

the disk of system used mbr/dos partition. there are 2 option to install windows 7 pro:

  1. using usb and rufus in mbr mode
  2. using cd/dvd rom
for systen with mbr/dos partition, using cd/dvd is easier. 

the installation is straight forward. yoy format c:/ contains windows 10 , and select this disk as target your windows 7 pro x64. it takes 30 minutes to insta windows 7 pro x64 from dvd.

you need to install driver for vga, wifi and usb. my system uses broadcom bcm4313 combo bluetooth. drives is not exist in official website for asus eee pc 1215b, but exis asus support. alternative, downloas bcm4313 from windowa catalog. you can uses your existing debian to download driver after you repair grub boot.

to repair your existinf grub follow these steps:
  1. boot from any debian media 
  2. enter rescue mode, debian will load any components require.
  3. choose your root system 
  4. choose execute a shell 
  5. run 
# grub-install /dev/sda/
# update-grub

after you restart to your syatem and find no windows option at grub screen, enter into your debian. then at root shell execute 

# update-grub

microsoft has closed any support to windows 7, click on windows update will useless.

Note: your internet explorer will rejected by seach engine because it is too old. the option is using supermium browser.

open your internel explorer and type https://www.supermium.net/. download and install it. dont use internet to open or search supermium, the most search engine server will reject your internet explorer.

if you are not sure about supermium security, use your debian 13 with icewn to browse sensitive application like email or banking.  

Friday, September 18, 2026

Debian 13: jakarta tomcat create servlet manually

under directory WEB-INF create 2 folder

  1. src
  2. classes 

under src, we place servlet and java code.

for package com.dedetok, create folder ~/WEB-INF/src/com/dedetok/ and write 2 files

MyWorld.java

package com.dedetok;

public class MyWorld {

    public String getMessage() {
        return "hello world";
    }
}

HelloServlet.java 

package com.dedetok;

import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

public class HelloServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest request,
                          HttpServletResponse response)
            throws IOException {

        MyWorld world = new MyWorld();

        response.setContentType("text/plain");
        response.getWriter().println(world.getMessage());
    }
} 

We map our servlet, edit ~/WEB-INF/web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
                             https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd"
         version="6.1">

    <display-name>My Application</display-name>

    <servlet>
        <servlet-name>Hello Anything</servlet-name>
        <servlet-class>com.dedetok.HelloServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Hello Anything</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>
</web-app>

Note: <servlet-name> between <servlet> and <servlet-mapping> must match.

compile your java, go it ~/WEB-INF/ folder and run

$ javac   -cp <your_path_to_jakarta_tomcat>/apache-tomcat-11.0.26/lib/servlet-api.jar   -d ./classes   ./src/com/dedetok/*.java 

restart your jakarta tomcat and try servlet http://localhost:8080/myapp/hello. hello comes from <servlet-mapping>

It is not practicable to map every servlet, there is other way

now at directory ~/WEB-INF/src/com/dedetok/  create HelloServlet2.java

package com.dedetok;

import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import jakarta.servlet.annotation.WebServlet;

@WebServlet("/hello2")
public class HelloServlet2 extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest request,
                          HttpServletResponse response)
            throws IOException {

        MyWorld world = new MyWorld();

        response.setContentType("text/plain");
        response.getWriter().println(world.getMessage()+" 2");
    }
}  

we use  @WebServlet("/hello2") to map url. do not forget to import  jakarta.servlet.annotation.WebServlet.

compile it, and restart your jakarta tomcat. you can access it via http://localhost:8080/myapp/hello2.

To use MyWorld class into jsp, at directory ~/myapp/ (upper directory from WEB-INF) , create file callservlet.jsp

<%@ page import="com.dedetok.MyWorld" %>

<%
    MyWorld world = new MyWorld();
%>

<html>
<body>
    <h1><%= world.getMessage() %></h1>
</body>
</html> 

or use wildcard for import="com.dedetok.*"  

Now you can directly build your application. MVC model can be used if you like. happy coding.  

 

Thursday, September 17, 2026

Debian 13: jakarta tomcat add application myapp manually without war (part 2)

It this part, we will: 

  1. Add myapp
  2. Add mariadb library

Add myapp

  1. under folder <home>/webapps/ create folder myapp
  2. under folder <home>/webapps/myapp/  create folder WEB-INF
  3. optional, at folder <home>/webapp/myapp> write index.html e.g  
<!DOCTYPE html>
<html lang="en">
<body>
    <h1>Hello, World!</h1>
</body>
</html>

Restart your jakarta tomcat, and myapp appear in list of application. Test your index.html, url http://localhost:8080/myapp/.

Add mariadb 

  1. Under folder  <home>/webapps/myapp/WEB_INF, create folder lib.
  2. download jconnect from https://mariadb.org/connector-java/all-releases/, and put it in <home>/webapps/myapp/WEB_INF/lib, i.e. <home>/webapps/myapp/WEB-INF/lib/mariadb-java-client-3.5.3.jar

Under folder  <home>/webapps/myapp/ write test.jsp

<%
try {
    Class.forName("org.mariadb.jdbc.Driver");
    out.println("MariaDB JDBC driver FOUND");
} catch (ClassNotFoundException e) {
    out.println("MariaDB JDBC driver NOT FOUND");
}
%>

restart your jakarta tomcat and test it http://localhost:8080/myapp/test.jsp.

if you have mariadb running, you can extend test.jsp to this

<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>

<%
try {
    Class.forName("org.mariadb.jdbc.Driver");
    out.println("MariaDB JDBC driver FOUND<br>");

    Connection conn = DriverManager.getConnection(
        "jdbc:mariadb://localhost:3306/mydb", // change to your db name
        "admin", // change to your user
        "admin" // change to your password
    );

    out.println("Connected to MariaDB!<br>");

    conn.close();

} catch (ClassNotFoundException e) {
    out.println("MariaDB JDBC driver NOT FOUND<br>");
    out.println(e);

} catch (Exception e) {
    out.println("Database connection FAILED<br>");
    out.println(e);
}
%> 

 

 

 

Debian 13: jakarta tomcat & openjdk 21 installation (part 1)

Assume openjdk 21 installed, it is lts verssion.

Download latest jakarta tomcat from https://tomcat.apache.org/download-11.cgi, i.e. version 11.0.26 (currently).

extract it into your home (user) directory

change permission to start jakarta tomcat

$ cd apache-tomcat-11.0.26/bin/
$ chmod 744 *.sh

Directory structure is:

  • bin
  • conf
  • lob
  • logss
  • temps
  • webapps
  • work 

You must add user to manage your jakarta tomcat. User rules are:

  1. manager-gui - allows access to the HTML GUI and the status pages
  2. manager-script - allows access to the text interface and the status pages
  3. manager-jmx - allows access to the JMX proxy and the status pages
  4. manager-status - allows access to the status pages only 

Edit <tomcat_home>/conf/tomcat-users.xml

<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
...
  <role rolename="manager-gui"/>
  <user username="admin" password="admin" roles="manager-gui"/>
</tomcat-users> 

To run jakarta tomcat

$ ./startup.sh&
[1] 6430
~/apache-tomcat-11.0.26/bin$ Using CATALINA_BASE:   <home>/apache-tomcat-11.0.26
Using CATALINA_HOME:   <home>/apache-tomcat-11.0.26
Using CATALINA_TMPDIR: <home>/apache-tomcat-11.0.26/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       <home>/apache-tomcat-11.0.26/bin/bootstrap.jar:<home>/apache-tomcat-11.0.26/bin/tomcat-juli.jar
Using CATALINA_OPTS:   
Tomcat started.

[1]+  Done                    ./startup.sh

Open your browser and open url http://localhost:8080/. 

To shutdown, run $ ./shutdown.sh.

Your application will on <home>/webapps and root for http://localhost:8080 is on <home>/webapps/ROOT/

For production, go to "List Application", Undeploy any unused applications.  

 

Friday, July 10, 2026

Debian 13: installing mysql-workbench-community

Download apt configuration from https://dev.mysql.com/downloads/repo/apt/ , current version is mysql-apt-config_0.8.39-1_all.deb

here is configuration for non cluster only target to mysql workbench

  • MySql Server & Cluster: mysql 8.4 lts
  • MySql Connector: non/disable -> enable if you need MySql connector e.g. jConnector

# dpkg -i mysql-apt-config_0.8.39-1_all.deb 
Selecting previously unselected package mysql-apt-config.
(Reading database ... 232081 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.39-1_all.deb ...
Unpacking mysql-apt-config (0.8.39-1) ...
Setting up mysql-apt-config (0.8.39-1) ...

mysql-workbench-community is not available for Debian 13  

credit: online html escape https://www.freeformatter.com/html-escape.html#before-output