tsunpo
asked on
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]M arking servlet controller as unavailable
2004-11-04 11:01:15 StandardContext[/bioinfo]S ervlet /bioinfo threw load() exception
javax.servlet.UnavailableE xception: Initializing application data source org.apache.struts.action.D ATA_SOURCE
at org.apache.struts.action.A ctionServl et.initMod uleDataSou rces(Actio nServlet.j ava:782)
at org.apache.struts.action.A ctionServl et.init(Ac tionServle t.java:331 )
at javax.servlet.GenericServl et.init(Ge nericServl et.java:21 1)
at org.apache.catalina.core.S tandardWra pper.loadS ervlet(Sta ndardWrapp er.java:10 29)
at org.apache.catalina.core.S tandardWra pper.load( StandardWr apper.java :862)
at org.apache.catalina.core.S tandardCon text.loadO nStartup(S tandardCon text.java: 4013)
at org.apache.catalina.core.S tandardCon text.start (StandardC ontext.jav a:4357)
at org.apache.catalina.core.C ontainerBa se.start(C ontainerBa se.java:10 83)
at org.apache.catalina.core.S tandardHos t.start(St andardHost .java:789)
at org.apache.catalina.core.C ontainerBa se.start(C ontainerBa se.java:10 83)
at org.apache.catalina.core.S tandardEng ine.start( StandardEn gine.java: 478)
at org.apache.catalina.core.S tandardSer vice.start (StandardS ervice.jav a:480)
at org.apache.catalina.core.S tandardSer ver.start( StandardSe rver.java: 2313)
at org.apache.catalina.startu p.Catalina .start(Cat alina.java :556)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:58 5)
at org.apache.catalina.startu p.Bootstra p.start(Bo otstrap.ja va:287)
at org.apache.catalina.startu p.Bootstra p.main(Boo tstrap.jav a:425)
2004-11-04 11:01:22 StandardContext[/balancer] org.apache .webapp.ba lancer.Bal ancerFilte r: init(): ruleChain: [org.apache.webapp.balance r.RuleChai n: [org.apache.webapp.balance r.rules.UR LStringMat chRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balance r.rules.Re questParam eterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balance r.rules.Ac ceptEveryt hingRule: Redirect URL: http://jakarta.apache.org]]
2004-11-04 11:02:44 StandardWrapperValve[contr oller]: 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.d bcp.BasicD ataSource" >
<set-property property="description" value="xxx"/>
<set-property property="driverClass" value="com.mysql.jdbc.Driv er"/>
<set-property property="url" value="jdbc:mysql://xxx.xx x.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-na me>
<servlet-class>org.apache. struts.act ion.Action Servlet</s ervlet-cla ss>
<load-on-startup>1</load-o n-startup>
</servlet>
<servlet-mapping>
<servlet-name>controller</ servlet-na me>
<url-pattern>*.do</url-pat tern>
</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
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]M
2004-11-04 11:01:15 StandardContext[/bioinfo]S
javax.servlet.UnavailableE
at org.apache.struts.action.A
at org.apache.struts.action.A
at javax.servlet.GenericServl
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.startu
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.catalina.startu
at org.apache.catalina.startu
2004-11-04 11:01:22 StandardContext[/balancer]
2004-11-04 11:02:44 StandardWrapperValve[contr
2. Here is the struts-config.xml (I use struts-config_1_2.dtd):
<data-sources>
<data-source type="org.apache.commons.d
<set-property property="description" value="xxx"/>
<set-property property="driverClass" value="com.mysql.jdbc.Driv
<set-property property="url" value="jdbc:mysql://xxx.xx
<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-class>org.apache.
<load-on-startup>1</load-o
</servlet>
<servlet-mapping>
<servlet-name>controller</
<url-pattern>*.do</url-pat
</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
Can you try:
<data-sources>
<data-source type="org.apache.commons.d bcp.BasicD ataSource" >
<set-property property="description" value="xxx"/>
<set-property property="driverClassName" value="com.mysql.jdbc.Driv er"/>
<set-property property="url" value="jdbc:mysql://xxx.xx x.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>
<data-sources>
<data-source type="org.apache.commons.d
<set-property property="description" value="xxx"/>
<set-property property="driverClassName"
<set-property property="url" value="jdbc:mysql://xxx.xx
<set-property property="user" value="xxx"/>
<set-property property="password" value="xxx"/>
<set-property property="autoCommit" value="false"/>
</data-source>
</data-sources>
ie: driverClassName instead of driverClass
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
u know what??? u just save my life :)
wicked!!!!!! how stupid am i~~~
i saw the light, i saw the light :p
george
:-D Cool! That worked then I take it ;-)
Hee hee!
Good luck with it all!
Glad I coul help :-)
Tim
Hee hee!
Good luck with it all!
Glad I coul help :-)
Tim
ASKER
One more thing, Tim...
I've noticed and am now busy in modifying the EL tag...
from
<tiles:put name="content" value="/intranet/${param.m ode}.jsp"/ >
to
<tiles-el:put name="content" value="/intranet/${param.m ode}.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
I've noticed and am now busy in modifying the EL tag...
from
<tiles:put name="content" value="/intranet/${param.m
to
<tiles-el:put name="content" value="/intranet/${param.m
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
> <td>${w.subWell}</td>
What is "w"?
How is it passed to the tile?
And have you looked at:
https://www.experts-exchange.com/questions/21193428/Syntax-problems-when-trying-to-print-out-a-value-of-an-object's-property.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
What is "w"?
How is it passed to the tile?
And have you looked at:
https://www.experts-exchange.com/questions/21193428/Syntax-problems-when-trying-to-print-out-a-value-of-an-object's-property.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
ASKER
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
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
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
Have a cool drink!! Wish I was there! Not least for the drink ;-)
Good luck with it!
Tim
ASKER
Thanks in advance!!
George