Archive for the ‘struts’ Category.
June 6, 2007, 1:17 AM

I am very new to struts, and today I did something to get an info from DB and to display it on a jsp with struts. Once I completed the coding and restarted the webapp, i got the following error in index.jsp itself.
Cannot find message resources under key org.apache.struts.action.MESSAGE.
Clearly the trace points out the place where i am reading a key from message resource, to get the title of the jsp page.
<>< key="project.title">< /title>
I have no idea on what causes this error. googling told me it is related to XML parsing. later I found I missed a closing tag for one of the form beans under form-beans tag in struts-config.xml !!!
is there any way to understand the struts errors
Category:
struts |
Comments Off
October 19, 2006, 8:34 AM
I was configuring struts DS to connect to mysql today morning. i got failed day be4 yesterday, it ended with some classnot found exception. ooops! i noted tday, there was some error in the webpage i read. here is the details.
mydb name: shiksha
u/n: root
pwd: mysql
here is the datasource part of my struts-config.xml
<>
< type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
< property="driverClassName" value="com.mysql.jdbc.Driver">
< property="url" value="jdbc:mysql://localhost:3306/shiksha">
< property="username" value="root">
< property="password" value="mysql">
< property="maxActive" value="10">
< property="maxWait" value="5000">
< property="defaultAutoCommit" value="false">
< property="defaultReadOnly" value="false">
< property="validationQuery" value="SELECT COUNT(*) FROM test">
< /data-source>
< /data-sources>
and my action mapping goes like this
< path="/DataSource" type="org.shiksha.TestDB">
< name="success" path="/pages/Welcome.jsp">
< /action>
when i hit
http://localhost/shiksha/DataSource.do
I got the following in the trace
******************************************
********Out Put from TestDataSource ******
User Name is: rajesh
User Name is: george
User Name is: prakash
******************************************
Enjoy buddy, have a nice day.
help: http://forum.java.sun.com/thread.jspa?threadID=528490&messageID=2974589