tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amy Roh <amy...@apache.org>
Subject Re: Tomcat 4.1.x admin application comments and suggestions
Date Mon, 09 Sep 2002 21:32:28 GMT
Glenn Nielsen wrote:
> Attached are my comments and suggestions for the Tomcat 4.1.x admin 
> application.
> 
> It would be nice if we could move the admin application from beta to 
> near release
> quaility for the next Tomcat 4.1.x release.
> 
> Regards,
> 
> Glenn
> 
> 
> 
> ------------------------------------------------------------------------
> 
>         Comments and suggestions about the Tomcat 4.1.x admin application
> 
> 1.  Only a small subset of the Host attributes can be set.  The remaining
>     Host attributes should be added.

I have added a few more Host attributes that make sense to make editable 
from Host admin page.


> 
> 2.  The DefaultContext can be scoped to either the Engine or Host.
>     There is some support for the DefaultContext in the admin app,
>     but it is not complete.  There are many comments which mention
>     fixing this.
> 
Actually, there isn't much support for the DefaultContext in the admin 
app at all except it has a very simple description that uses default 
ClassNameMBean. DefaultContextMBean needs to be implemented similar to 
StandardContextMBean to handle various operations including managing 
resources.


> 3.  I have the following Resource defined in the DefaultContext for a Host.
> 
>       <!-- JNDI Resource for sending email using SMTP -->
>       <Resource name="mail/send" auth="CONTAINER"
>                 type="javax.mail.internet.MimePartDataSource"/>
>       <ResourceParams name="mail/send">
>         <parameter><name>factory</name>
>           <value>org.apache.naming.factory.SendMailFactory</value>
>         </parameter>
>         <parameter><name>mail.smtp.host</name>
>           <value>some.host</value>
>         </parameter>
>         <parameter><name>mail.smtp.user</name>
>           <value>someuser</value>
>         </parameter>
>         <parameter><name>mail.from</name>
>           <value>someuser@some.host</value>
>         </parameter>
>       </ResourceParams>
> 
>     When I try to access the Host Context Resource Mail Sessions I get
>     the following Exception:
> 
> javax.servlet.ServletException: Exception retrieving attribute 'mail.smtp.host'
>         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
>         at org.apache.jsp.listMailSessions_jsp._jspService(listMailSessions_jsp.java:585)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:202)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> <snip remainder of stack trace>
> 

As I mentioned earlier, DefaultContextMBean needs to be implemented to 
handle resources. The same mail resource definition works under Context.


> 4.  I have the following Resource defined in the DefaultContext for a Host.
> 
>       <!-- JNDI JDBC DataSource Resource for using MySQL dB -->
>       <Resource name="jdbc/data" auth="CONTAINER"
>                 type="javax.sql.DataSource"/>
>       <ResourceParams name="jdbc/data">
>         <parameter>
>           <name>factory</name>
>           <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>         </parameter>
>         <parameter>
>           <name>username</name>
>           <value>tomcat</value>
>         </parameter>
>         <parameter>
>           <name>password</name>
>           <value>password</value>
>         </parameter>
>         <parameter>
>           <name>driverClassName</name>
>           <value>org.gjt.mm.mysql.Driver</value></parameter>
>         <parameter>
>           <name>url</name>
>           <value>jdbc:mysql://localhost/data?autoReconnect=true</value>
>         </parameter>
>         <parameter>
>           <name>maxIdle</name>
>           <value>10</value>
>         </parameter>
>         <parameter>
>           <name>maxActive</name>
>           <value>50</value>
>         </parameter>
>         <parameter>
>           <name>maxWait</name>
>           <value>10000</value>
>         </parameter>
>         <parameter>
>           <name>logAbandoned</name>
>           <value>true</value>
>         </parameter>
>         <parameter>
>           <name>removeAbandoned</name>
>           <value>true</value>
>         </parameter>
>         <parameter>
>           <name>removeAbandonedTimeout</name>
>           <value>300</value>
>         </parameter>
>       </ResourceParams>
> 
>     When I try to access the Host Context Resource Mail Sessions I get
>     the following Exception:
> 
> javax.servlet.ServletException: Exception retrieving attribute 'driverClassName'
>         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
>         at org.apache.jsp.listDataSources_jsp._jspService(listDataSources_jsp.java:585)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:202)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> <snip remainder of stack trace>
> 
Same as #3. The same definition works fine under Context.

> 5.  It is unclear what the "Save", "Reset", or "Commit Changes" buttons do.
>     Add HELP for these to the interface.
> 
"Save" is to save the changes for this session. "Commit" saves the 
changes and rewrites server.xml so the changes are saved for when Tomcat 
is restarted. "Reset" resets all the entries in the html form. HELP or 
documentation might be helpful.

I think the following items are good "nice to have" ideas for admin 
webapp enhancement. We should add support for DefaultContext first. 
Adding it to my to do list. :-)

Amy


> 6.  Incorporate the tomcat-docs configuration reference into the admin
>     application so that the admin application can link to the docs for
>     the different componenets.   This will provide online help for
>     configuring Tomcat using the admin app.
> 
> 7.  Add support for configuring the global conf/web.xml.  Support could be
>     added for enabling/disabling SSI, CGI, and configuring Jasper.
> 
> 8.  When changes are committed XML configs for all Contexts is written out
>     to file. Even for Context's which may have been created dynamically
>     rather than configured in the orignal server.xml.  Add a flag to the
>     Context which indicates whether this Context originated from the
>     server.xml config and only write out XML for the config if it had
>     already been configured.  Add a flag for each Context which indicates
>     whether this Context was instantiated from the server.xml config or
>     dynamically.  Allow the option to add or remove the Context from
>     those which are saved to server.xml.
> 
> 9.  It would be nice if attributes were not written to file if the
>     attribute was set to the default value.
> 
> 10. It would be nice if the XML generated were better formatted. I noticed
>     this with XML elements which had a long list of attributes. Perhaps each
>     attribute for an element should be output to a separate line, or break
>     a line if it has multiple attributes and exceeds 80 characters.
> 
> 11. It is unclear to me what changes made would take effect immediately
>     on a Save and what changes require a context reload to take effect.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message