After reading some manuals and tutorials I still did not find out how to access 
jsp pages at the documentroot.

I copied a example jsp file to my apache document root and want to execute it.
Now I want to access the jsp with http://host/test.jsp but I only get a static 
page without a hello world line.

I tried to mount this file from the /etc/apache2/2.2/conf.d/jk.conf
I tried to change <Host appBase=""> to the apache documentroot.
I tried to add a <Context ...> directive that points to the documentroot.

Apache now executes the jsp (after I pressed the browsers refresh button) but 
it gives me a exception.
org.apache.jasper.JasperException: /test.jsp(22,0) The value for the useBean 
class attribute dates.JspCalendar is invalid.
        org.apache.jasper.compiler.DefaultErrorHandler.jspError(Unknown Source)
        org.apache.jasper.compiler.ErrorDispatcher.dispatch(Unknown Source)
        org.apache.jasper.compiler.ErrorDispatcher.jspError(Unknown Source)
        org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Unknown 
Source)
        org.apache.jasper.compiler.Node$UseBean.accept(Unknown Source)
        org.apache.jasper.compiler.Node$Nodes.visit(Unknown Source)
        org.apache.jasper.compiler.Node$Visitor.visitBody(Unknown Source)
        org.apache.jasper.compiler.Node$Visitor.visit(Unknown Source)
        org.apache.jasper.compiler.Node$Root.accept(Unknown Source)
        org.apache.jasper.compiler.Node$Nodes.visit(Unknown Source)
        org.apache.jasper.compiler.Generator.generate(Unknown Source)
        org.apache.jasper.compiler.Compiler.generateJava(Unknown Source)
        org.apache.jasper.compiler.Compiler.compile(Unknown Source)
        org.apache.jasper.compiler.Compiler.compile(Unknown Source)
        org.apache.jasper.compiler.Compiler.compile(Unknown Source)
        org.apache.jasper.JspCompilationContext.compile(Unknown Source)
        org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
        org.apache.jasper.servlet.JspServlet.service(Unknown Source)
        javax.servlet.http.HttpServlet.service(Unknown Source)

What am I doing wrong?

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

<Server port="8005" shutdown="SHUTDOWN">

  <!-- Comment these entries out to disable JMX MBeans support used for the 
       administration web application -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener 
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>

  <!-- Global JNDI resources -->
  <GlobalNamingResources>

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />

  </GlobalNamingResources>

  <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" 
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />

    <Engine name="Catalina" defaultHost="localhost">

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <Host name="localhost" appBase="/var/apache2/2.2/htdocs"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

        <Listener className="org.apache.jk.config.ApacheConfig"
                modJk="/usr/apache2/2.2/libexec/mod_jk.so"
                workersConfig="/etc/apache2/2.2/conf.d/workers.properties"/>
        <Context path="" docBase="/var/apache2/2.2/htdocs" debug="0" 
reloadable="true"/>

      </Host>

    </Engine>

  </Service>

</Server>


------------------jk.conf-------------------------------
<IfDefine 64bit>
LoadModule jk_module libexec/amd64/mod_jk.so
</IfDefine>
<IfDefine !64bit>
LoadModule jk_module libexec/mod_jk.so
</IfDefine>

<IfModule mod_jk.c>
   JkWorkersFile /etc/apache2/2.2/conf.d/workers.properties
   # Where to put jk shared memory
   # Update this path to match your local state directory or logs directory
   JkShmFile     /var/apache2/2.2/logs/mod_jk.shm
   # Where to put jk logs
   # Update this path to match your logs directory location (put mod_jk.log next
 to access_log)
   JkLogFile     /var/apache2/2.2/logs/mod_jk.log
   # Set the jk log level [debug/error/info]
   JkLogLevel    info
   # Select the timestamp log format
   JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
   # Send everything for context /examples to worker named worker1 (ajp13)
   JkMount  /servlets-examples/* worker1
   JkMount  /jsp-examples/* worker1
   JkMount /var/apache2/2.2/htdocs/*
</IfModule>

Greets Louis Hoefler.
-- 
This message posted from opensolaris.org

Reply via email to