My web.xml is

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

.........
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
         version="2.4">
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>

    <resource-ref>
       <description>DB Connection</description> 
       <res-ref-name>jdbc/AYS</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
    </resource-ref>
    <servlet>

      <servlet-name>action</servlet-name>
      <servlet-class>
         org.apache.struts.action.ActionServlet
      </servlet-class>
      <init-param>
         <param-name>config</param-name>
         <param-value>/WEB-INF/struts-config.xml</param-value>
      </init-param>
      <init-param>
        <param-name>application</param-name>
        <param-value>ApplicationResources</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
         <servlet-name>action</servlet-name>
         <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
         <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>

   <jsp-config>
    <taglib>
       <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
       <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
       <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
       <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
       <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
       <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
   <taglib>
     <taglib-uri>/WEB-INF/struts-menu</taglib-uri>
     <taglib-location>/WEB-INF/struts-menu.tld</taglib-location>
   </taglib>
  </jsp-config>

</web-app>

server.xml is

...
...
<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">

        <Context crossContext="true" debug="5" docBase="AtYourService"
path="/AtYourService" reloadable="true">
            <Resource auth="Container"
driverClassName="net.sourceforge.jtds.jdbc.Driver" 
                    maxActive="100" maxIdle="30" maxWait="10000" 
                    name="jdbc/AYS" password=""
type="javax.sql.DataSource"
url="jdbc:jtds:sqlserver://localhost/AtYourService?autoReconnect=true"
username="sa"/>
        </Context>
</Host>
.
.

Regards,
Vijaya

-----Original Message-----
From: Marc Farrow [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 07, 2006 6:11 PM
To: Tomcat Users List
Subject: Re: NetBeans 5.0 and Tomcat 5.5.16 ... Please Help (Problem
after migrating to tomcat 5.5.16 from tomcat 5.0.28)

It might be helpful to post your web.xml and context.xml (appname.xml or
the
server.xml if your context tag is still in there).



On 6/7/06, Vijaya <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I am sorry for being vague in my earlier mail. This is the background
of
> my problem.
>
> We developed the portal using Tomcat 5.0.28. In this version we
> connected to the database (SQL Server) without the JNDI lookup. I.e.
get
> the data source from the request object. Also we configured the
> struts-config.xml to have the db definitions. Everything worked okay
> till we moved the application to staging server.
>
> The staging server has tomcat 5.5.16 and when we deployed the
> application as it is, we got a 404 error (Servlet action not
available).
> So I downloaded tomcat 5.5.16 in my development machine as a
stand-alone
> tomcat and I deployed the application in my development machine.
>
> The 404 error was fixed when I connected to the DB using JNDI lookup
(by
> making changes to server.xml and application web.xml and the action
> coded to get the data source using the context). However, I am now
> getting a Nullpointer exception while connecting to database.
>
> Jtds is the third party jdbc driver used to connect to the SQL Server.
>
> I am totally frustrated with this problem and do not have a clue what
> could be wrong.
>
> Any help is greatly appreciated.
>
> Thanks in advance for all help.
>
> Regards,
> Vijaya
>
> --- Vijaya <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I downloaded NetBeans 5,0 and tomcat 5.5.16. I want
> > to connect to a
> > remote SQL Server. I am using jtds. I am not
> > successful in using both
> > NB50 and Tomcat 5.5.16 together. NB5.0 comes with
> > bundled tomcat 5.5.9
> > and if I use this, I get a '404 error' while
> > accessing the remote
> > sql*server.
> >
> > Can someone help me on this? Is there a problem with
> > NetBeans 5.0?
> >
> > Is there any other IDE can I use?
> >
> > Lastly, is there a tomcat user group in Bangalore,
> > India?
> >
> > Thanks in advance for your help.
> >
> > Vijaya
> >
>
> One, your question is terribly vague.  I get a 404
> when  accessing the remote sql server?  Are you trying
> to connect to a JSP page under your Tomcat?  Are you
> running the web application in Netbeans?  Did NB
> launch your external browser and point you to the
> running Tomcat instance address and port?  Are you
> running a different version of Tomcat then the one
> that shipped with it?  Are you actually running it in
> Netbeans?  Have you ever used JDBC and jTDS together
> and that is working fine?  Have you gotten it working
> in other web applications period?  I'm on both this
> list and the NB list.  You can ask your question
> there, but if it comes down to something with your
> configuration and Tomcat you might be directed back
> here.  Ask on [EMAIL PROTECTED] (you'll need to
> sign up for the list).  You'll need to provide some
> common sense basics though to help someone help you.
>
> Wade
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marc Farrow




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to