Web tier: servlets, JSP, Web frameworks: useBean : providing class dynamically

  1. useBean : providing class dynamically (1 messages)

    I want to achieve something like this:

    // This would finally come from Config class after reading the propoperties file
    String classToLoad = "com.hidhaval.layout.pageTemplate"

    <jsp:useBean id="PAGE" scope="session" class="<%= classToLoad %>" />

    This does not work .. I m using Tomcat 3.2 / jdk1.3
  2. This field is not runtime, it's supposed to be set on compilation stage. You'll have to use some java scriptlet to achieve needed effect