You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Philip Eskelin <ph...@eskelin.com> on 2000/06/26 11:06:11 UTC

DatabaseServlet

Now that I'm up and running with Orion and Struts, I've run into another
issue -- it doesn't seem to be saving new user or subscription information
into database.xml for the struts-example project.  How and where does this
mapping occur?  Without looking at Struts source, I cannot tell.

Any help will be appreciated.

Thanks,
Philip Eskelin


RE: DatabaseServlet

Posted by Philip Eskelin <ph...@eskelin.com>.
Did you need to move database.xml out of the WEB-INF directory?  Based on
Kevin Duffey's message Orion doesn't allow access in that directory.

I'll see if I can help you out too -- thanks for the response.

Viel Grusse,
Philip

> -----Original Message-----
> From: Klaus Thiele [mailto:kth@pi-ag.com]
> Sent: Monday, June 26, 2000 5:35 AM
> To: struts-user@jakarta.apache.org
> Subject: Re: DatabaseServlet
>
>
> Hi Philip,
>
> > Now that I'm up and running with Orion and Struts, I've run into another
> > issue -- it doesn't seem to be saving new user or subscription
> information
> > into database.xml for the struts-example project.  How and
> where does this
> > mapping occur?  Without looking at Struts source, I cannot tell.
>
> ... because it gets an exception.
>
> i changed "DatabaseServlet.java":
> ---------------->
>     public void init() throws ServletException {
>
> 	this.pathname = getServletConfig().getInitParameter("userdb");
>             [...]
> <---------------
>
> and "web.xml":
> ---------------->
>   <!-- Database Initialization Servlet Configuration -->
>   <servlet>
>         [...]
>     <init-param>
>       <param-name>userdb</param-name>
>       <param-value>/opt/orion/config/userdb.xml</param-value>
>     </init-param>
> <---------------
>
> and then it works for me (with tomcat and resin) :(
> (please look at my previous posting, perhaps you can help me)
>
> i think, there is a problem in the "unload()"method of the
> DatabaseServlet.
> perhaps the call to "pathname()" fails because the
>    "getServletContext().getRealPath("/")" is no more available in the
> "destroy()" method!
>
> hope that helps
>   klaus
>
> --
> Klaus Thiele - Personal & Informatik AG
> mailto:kth@pi-ag.com
>
>  "There's got to be more to life than compile-and-go."


Re: DatabaseServlet

Posted by Klaus Thiele <kt...@pi-ag.com>.
Hi Philip,

> Now that I'm up and running with Orion and Struts, I've run into another
> issue -- it doesn't seem to be saving new user or subscription information
> into database.xml for the struts-example project.  How and where does this
> mapping occur?  Without looking at Struts source, I cannot tell.

... because it gets an exception.

i changed "DatabaseServlet.java":
---------------->
    public void init() throws ServletException {

	this.pathname = getServletConfig().getInitParameter("userdb");
            [...]
<---------------

and "web.xml":
---------------->
  <!-- Database Initialization Servlet Configuration --> 
  <servlet> 
        [...]
    <init-param> 
      <param-name>userdb</param-name> 
      <param-value>/opt/orion/config/userdb.xml</param-value> 
    </init-param> 
<---------------

and then it works for me (with tomcat and resin) :(
(please look at my previous posting, perhaps you can help me)

i think, there is a problem in the "unload()"method of the DatabaseServlet.
perhaps the call to "pathname()" fails because the
   "getServletContext().getRealPath("/")" is no more available in the
"destroy()" method!

hope that helps
  klaus

--
Klaus Thiele - Personal & Informatik AG
mailto:kth@pi-ag.com

 "There's got to be more to life than compile-and-go."