Upgrating Struts 1.1 to 1.2.4 - "servlet is unavailable"

Hi every expert,

Ive been experiencing annoying problems with my upgrating struts from 1.1 to 1.2.4
Should be not the "new URL of tlds" or some "new EL tags" problems...


1. Plaese have a look of the log file:

2004-11-04 11:01:15 StandardContext[/bioinfo]Marking servlet controller as unavailable
2004-11-04 11:01:15 StandardContext[/bioinfo]Servlet /bioinfo threw load() exception
javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
      at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:782)
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:331)
      at javax.servlet.GenericServlet.init(GenericServlet.java:211)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
      at org.apache.catalina.core.StandardService.start(StandardService.java:480)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

2004-11-04 11:01:22 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2004-11-04 11:02:44 StandardWrapperValve[controller]: Servlet controller is currently unavailable


2. Here is the struts-config.xml (I use struts-config_1_2.dtd):

    <data-sources>
        <data-source type="org.apache.commons.dbcp.BasicDataSource">
            <set-property property="description" value="xxx"/>
            <set-property property="driverClass" value="com.mysql.jdbc.Driver"/>
            <set-property property="url"         value="jdbc:mysql://xxx.xxx.xxx.xxx/xxx"/>
            <set-property property="user"        value="xxx"/>
            <set-property property="password"    value="xxx"/>
            <set-property property="autoCommit"  value="false"/>
        </data-source>
    </data-sources>


3. And the web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.3"
    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_3.xsd">

    <display-name>Struts deployment descriptor</display-name>

    <servlet>
        <servlet-name>controller</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

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


Is there any change in these 2 files since Struts 1.2.x?? me is using Tomcat 5.0.28 as the front end


Please help,
George
tsunpoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tsunpoAuthor Commented:
HTTP Status 404 - Servlet controller is not available

Thanks in advance!!
George
0
TimYatesCommented:
Can you try:

    <data-sources>
        <data-source type="org.apache.commons.dbcp.BasicDataSource">
            <set-property property="description" value="xxx"/>
            <set-property property="driverClassName" value="com.mysql.jdbc.Driver"/>
            <set-property property="url"         value="jdbc:mysql://xxx.xxx.xxx.xxx/xxx"/>
            <set-property property="user"        value="xxx"/>
            <set-property property="password"    value="xxx"/>
            <set-property property="autoCommit"  value="false"/>
        </data-source>
    </data-sources>
0
TimYatesCommented:
ie:  driverClassName instead of driverClass
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

TimYatesCommented:
actually:  username instead of user and defaultAutoCommit instead of autoCommit

    <data-sources>
        <data-source type="org.apache.commons.dbcp.BasicDataSource">
            <set-property property="description"   value="xxx"/>
            <set-property property="driverClassName" value="com.mysql.jdbc.Driver"/>
            <set-property property="url"                 value="jdbc:mysql://xxx.xxx.xxx.xxx/xxx"/>
            <set-property property="username"     value="xxx"/>
            <set-property property="password"     value="xxx"/>
            <set-property property="defaultAutoCommit"  value="false"/>
        </data-source>
    </data-sources>

see:  http://struts.apache.org/faqs/database.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tsunpoAuthor Commented:
hi pal,

u know what??? u just save my life  :)
wicked!!!!!! how stupid am i~~~

i saw the light, i saw the light  :p
george
0
TimYatesCommented:
:-D  Cool!  That worked then I take it ;-)

Hee hee!

Good luck with it all!

Glad I coul help :-)

Tim
0
tsunpoAuthor Commented:
One more thing, Tim...

I've noticed and am now busy in modifying the EL tag...
from
<tiles:put name="content" value="/intranet/${param.mode}.jsp"/>
to
<tiles-el:put name="content" value="/intranet/${param.mode}.jsp"/>

Is that I cannot simply use ${w.well} in the jsp file, sth like:
<td>${w.subWell}</td>
What should I used, then....


one more question, please~~~
:P
0
TimYatesCommented:
> <td>${w.subWell}</td>

What is "w"?

How is it passed to the tile?

And have you looked at:

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21193428.html

Apparently, to use the new EL stuff in JSP, you need to put:

<%@ page isELIgnored="false" %>

At the top of the jsp...

then

${w.subWell}

might work :-)

Tim
0
tsunpoAuthor Commented:
It works perfectly like baby...  :D

Thank u so so so much, splendid!! now I can leave office earily finally  :p

Will buy me a Guinness for celebration tonight...
If I were still in Bristol, will definitely rush to Manchester and buy u a drink  :p


Now I am back in Taiwan,
George
0
TimYatesCommented:
Hehe, that's a bit far to go ;-)

Have a cool drink!! Wish I was there!  Not least for the drink ;-)

Good luck with it!

Tim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.