You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gemes Tibor <ti...@i-trade.hu> on 2003/05/06 11:34:27 UTC

avoid module switch in tiles-defs.xml

How am I supposed to avoid module-switch if I reference a different 
module in tiles-defs.xml?

I have an action which displays all the categories. It resides in the 
category module.
My tiles-defs.xml references it in the mainLayout (which is extended by 
all defintions) as:

<put name="cat.list" value="/category/list.do" />

This works as far as I am working in module /category.
But if I switch module (eg. to /item ), my forms does not appear,
because the /category/list.do switch the module back to /category, so
the <html:form >, which references the action in /item module, cannot 
find its action.

If I put /blank.jsp instead of the /category/list.do action, it works 
fine, however the list is not displayed.
If I put /category/list4tiles.jsp in cat.list where list4tiles.jsp is:

<bean:include id="text" href="/context/category/list.do" />
<bean:write name="text" format="false" />

it works again, but this seems to be a dirty hack. Any better idea?

Tia,

Tib



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: I have a problem

Posted by Navjot Singh <na...@net4india.net>.
hi,

$MYSQL_HOME%/bin/mysql_setpermission --user=root -password

enter password and you will be given 5 options. one of them is to add user.

HTH
navjot singh


|-----Original Message-----
|From: mailinglist [mailto:mlst@mangoosta.fr]
|Sent: Tuesday, May 06, 2003 4:16 PM
|To: Struts Users Mailing List
|Subject: Re: I have a problem
|
|
|
|> I have always use mysql as a client not as a dba, could u tell me
|> precisely how to add user in the mysql server. The version is mysql 4.0
|
|This is not a struts related question, you should try the mysql 
|documentation:
|http://www.mysql.com/doc/en/User_Account_Management.html
|or install mysqlcc client to do it with a GUI if you are not comfortable 
|with command line
|
|---------------------------------------------------------------------
|To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
|For additional commands, e-mail: struts-user-help@jakarta.apache.org
|
|

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: I have a problem

Posted by mailinglist <ml...@mangoosta.fr>.
> I have always use mysql as a client not as a dba, could u tell me
> precisely how to add user in the mysql server. The version is mysql 4.0

This is not a struts related question, you should try the mysql 
documentation:
http://www.mysql.com/doc/en/User_Account_Management.html
or install mysqlcc client to do it with a GUI if you are not comfortable 
with command line

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: "include" Attribute of action tag

Posted by Niket Anand <ni...@noida.manystreams.com>.
Thanks Robert
----- Original Message -----
From: "Robert Taylor" <rt...@mulework.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, May 06, 2003 10:25 AM
Subject: RE: "include" Attribute of action tag


> It sounds like you want the type of presenation functionality offered
> by "portal" type applications.
>
> I think you will need to use Tiles for this (I could be wrong).
> It allows you to build a view using both static content and
> content generated as a result of some process (Servlet, Action, etc...).
>
> You can find more information about Tiles here:
> http://www.lifl.fr/~dumoulin/tiles/
>
>
> HTH,
>
> robert
>
>
>
> > -----Original Message-----
> > From: Niket Anand [mailto:niket@noida.manystreams.com]
> > Sent: Tuesday, May 06, 2003 7:27 PM
> > To: Struts Users Mailing List
> > Subject: "include" Attribute of action tag
> >
> >
> >  Hello All,
> >  I want to know how can I use or in which scenario can I use "include"
> >  attribute in action tag..
> >  Lets take a case.
> >  I request for a URL http://localhost/struts-examples/test and I
> > want final
> >  output in testResult.jsp but before that I need to include a
> > TestSevlet(that
> >  would generate some kind of presentation)  that should be configured in
> >  struts-config.xml.
> >  In struts-config.xml, I have
> >   <action-mappings>
> >      <action    path="/test"
> >                 type="com.foo.testAction"
> >                 name="TestForm"
> >                scope="request"
> >         validate="false">
> >         <forward name="success"              path="/testServlet"/>
> >     </action>
> >
> >  <action    path="/testServlet" include="/TestServlet.fo">//mapping os
> >  servlet can be done in web.xml
> >
> >  //NOW HOW TO GO TO testResult.jsp with action tag as
> >   <action    path="/testResult"
> >                 type="com.foo.testFinalAction"
> >                 name="TestForm"
> >                scope="request"
> >         validate="false">
> >         <forward name="success"              path="/testResult.jsp"/>
> >      </action>
> >
> >  </action-mappings>
> >
> >  Please help me, I am waiting for your suggestions.
> >
> >  Thanks,
> >  Niket
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: "include" Attribute of action tag

Posted by Robert Taylor <rt...@mulework.com>.
It sounds like you want the type of presenation functionality offered
by "portal" type applications.

I think you will need to use Tiles for this (I could be wrong).
It allows you to build a view using both static content and 
content generated as a result of some process (Servlet, Action, etc...).

You can find more information about Tiles here:
http://www.lifl.fr/~dumoulin/tiles/


HTH,

robert



> -----Original Message-----
> From: Niket Anand [mailto:niket@noida.manystreams.com]
> Sent: Tuesday, May 06, 2003 7:27 PM
> To: Struts Users Mailing List
> Subject: "include" Attribute of action tag
> 
> 
>  Hello All,
>  I want to know how can I use or in which scenario can I use "include"
>  attribute in action tag..
>  Lets take a case.
>  I request for a URL http://localhost/struts-examples/test and I 
> want final
>  output in testResult.jsp but before that I need to include a
> TestSevlet(that
>  would generate some kind of presentation)  that should be configured in
>  struts-config.xml.
>  In struts-config.xml, I have
>   <action-mappings>
>      <action    path="/test"
>                 type="com.foo.testAction"
>                 name="TestForm"
>                scope="request"
>         validate="false">
>         <forward name="success"              path="/testServlet"/>
>     </action>
> 
>  <action    path="/testServlet" include="/TestServlet.fo">//mapping os
>  servlet can be done in web.xml
> 
>  //NOW HOW TO GO TO testResult.jsp with action tag as
>   <action    path="/testResult"
>                 type="com.foo.testFinalAction"
>                 name="TestForm"
>                scope="request"
>         validate="false">
>         <forward name="success"              path="/testResult.jsp"/>
>      </action>
> 
>  </action-mappings>
> 
>  Please help me, I am waiting for your suggestions.
> 
>  Thanks,
>  Niket
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


"include" Attribute of action tag

Posted by Niket Anand <ni...@noida.manystreams.com>.
 Hello All,
 I want to know how can I use or in which scenario can I use "include"
 attribute in action tag..
 Lets take a case.
 I request for a URL http://localhost/struts-examples/test and I want final
 output in testResult.jsp but before that I need to include a
TestSevlet(that
 would generate some kind of presentation)  that should be configured in
 struts-config.xml.
 In struts-config.xml, I have
  <action-mappings>
     <action    path="/test"
                type="com.foo.testAction"
                name="TestForm"
               scope="request"
        validate="false">
        <forward name="success"              path="/testServlet"/>
    </action>

 <action    path="/testServlet" include="/TestServlet.fo">//mapping os
 servlet can be done in web.xml

 //NOW HOW TO GO TO testResult.jsp with action tag as
  <action    path="/testResult"
                type="com.foo.testFinalAction"
                name="TestForm"
               scope="request"
        validate="false">
        <forward name="success"              path="/testResult.jsp"/>
     </action>

 </action-mappings>

 Please help me, I am waiting for your suggestions.

 Thanks,
 Niket


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


"include" Attribute of action tag

Posted by Niket Anand <ni...@noida.manystreams.com>.
Hello All,
I want to know how can I use or in which scenario can I use "include"
attribute in action tag..
Lets take a case.
I request for a URL http://localhost/struts-examples/test and I want final
output in testResult.jsp but before that I need to include a TestSevlet(that
would generate some kind of presentation)  that should be configured in
struts-config.xml.
In struts-config.xml, I have
 <action-mappings>
    <action    path="/test"
               type="com.foo.testAction"
               name="TestForm"
              scope="request"
       validate="false">
       <forward name="success"              path="/testServlet"/>
    </action>

<action    path="/testServlet" include="/TestServlet.fo">//mapping os
servlet can be done in web.xml

//NOW HOW TO GO TO testResult.jsp with action tag as
 <action    path="/testResult"
               type="com.foo.testFinalAction"
               name="TestForm"
              scope="request"
       validate="false">
       <forward name="success"              path="/testResult.jsp"/>
    </action>

</action-mappings>

Please help me, I am waiting for your suggestions.

Thanks,
Niket


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: I have a problem

Posted by my...@web.de.
On 6 May 2003 at 12:33, NOLA ZE Christian wrote:

> 
> I have always use mysql as a client not as a dba, could u tell me precisely 
> how to add user in the mysql server. The version is mysql 4.0
> 

try

http://www.mysql.com/doc/en/index.html

Stefan



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: I have a problem

Posted by Mark Galbreath <ma...@qat.com>.
MySQL has it's own users group and it's website is filled with this sort of
information.  You should probably pick up a copy of Paul DuBois' "MySQL"
(New Riders 2000) as well.  The general form is:

GRANT [priveleges] ([columns])
  ON [what]
  TO [user] IDENTIFIED BY [password]
  WITH GRANT OPTION

so that

GRANT ALL PRIVELEGES
  ON your_db.*
  TO user_id@% IDENTIFIED BY "password"
  WITH GRANT OPTION

the last line enables to user to grant priveleges to other users.

Mark

-----Original Message-----
From: NOLA ZE Christian [mailto:obobogo_cam@yahoo.fr] 
Sent: Tuesday, May 06, 2003 6:33 AM
To: Struts Users Mailing List
Subject: Re: I have a problem



I have always use mysql as a client not as a dba, could u tell me precisely 
how to add user in the mysql server. The version is mysql 4.0

At 12:01 06/05/2003 +0000, you wrote:
>Seems to me that user client on your localhost (127.0.0.1) has no 
>access
>rigths on the mysql server. Just add user client@127.0.0.1 to mysql and 
>give it the proper rigths
>
>Johan
>
>NOLA ZE Christian schreef:
>>I try to write a j2ee application which use as
>>         server : apache tomcat 4.1
>>           framework : struts
>>           database : mysql
>>i have write all jsp, java classes, web.xml and struts-config.xml. 
>>that's my struts-config.xml
>>**********************************************************************
>>**************************************************************************
***********************
>>
>><?xml version="1.0" encoding="ISO-8859-1" ?>
>><!DOCTYPE struts-config PUBLIC
>>           "-//Apache Software Foundation//DTD Struts Configuration
1.1//EN"
>>           
>>"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
>><struts-config>
>>   <data-sources>
>>     <data-source>
>>       <set-property property="driverClass"
>>         value="org.gjt.mm.mysql.Driver" />
>>       <set-property property="url"
>>         value="jdbc:mysql://localhost/employes" />
>>       <set-property property="maxCount"
>>         value="5"/>
>>       <set-property property="minCount"
>>         value="1"/>
>>       <set-property property="user"
>>         value="username"/>
>>       <set-property property="password"
>>         value="password"/>
>>     </data-source>
>>   </data-sources>
>>   <form-beans>
>>     <form-bean name="loginForm"
>>       type="com.eyrolles.LoginForm" />
>>     <form-bean name="employeForm"
>>       type="com.eyrolles.EmployeForm" />
>>   </form-beans>
>>   <global-forwards>
>>     <forward name="login" path="/login.jsp"/>
>>   </global-forwards>
>>   <action-mappings>
>>     <action path="/Login"
>>       type="com.eyrolles.LoginAction"
>>       validate="true"
>>       input="/login.jsp"
>>       name="loginForm"
>>       scope="request" >
>>       <forward name="success" path="/EmployeListe.do"/>
>>     </action>
>>     <action path="/EmployeListe"
>>       type="com.eyrolles.EmployeListeAction"
>>       scope="request" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/employeliste.jsp"/>
>>     </action>
>>     <action path="/Add"
>>       type="com.eyrolles.AddEmployeAction"
>>       name="employeForm"
>>       scope="request"
>>       input="/addemploye.jsp"
>>       validate="true" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/EmployeListe.do"/>
>>       <forward name="error" path="/addemploye.jsp"/>
>>     </action>
>>     <action path="/Edit"
>>       type="com.eyrolles.GetEmployeAction"
>>       name="employeForm"
>>       scope="request"
>>       validate="false" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/editemploye.jsp"/>
>>       <forward name="error" path="/EmployeListe.do"/>
>>     </action>
>>     <action path="/EditEmploye"
>>       type="com.eyrolles.EditEmployeAction"
>>       name="employeForm"
>>       scope="request"
>>       input="/editemploye.jsp"
>>       validate="true" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/EmployeListe.do"/>
>>       <forward name="error" path="/editemploye.jsp"/>
>>     </action>
>>     <action path="/Delete"
>>       type="com.eyrolles.DeletemployeAction"
>>       scope="request"
>>       validate="false" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/EmployeListe.do"/>
>>     </action>
>>   </action-mappings>
>>   <message-resources
>>     parameter="com.eyrolles.ApplicationResources" />
>></struts-config>
>>**************************************************************************
****************************************************************************
******************* 
>>
>>When i try to test that appication, i have an error message, could u 
>>give
>>me a solution to solve that problem :
>>type Rapport d''exception
>>message
>>description Le serveur a recontrer une erreur interne () qui l'a empèché 
>>de satisfaire la requête.
>>exception
>>javax.servlet.ServletException: java.sql.SQLException: Invalid 
>>authorization specification: Access denied for user: 'client@127.0.0.1' 
>>(Using password: YES)
>>         at 
>>
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.
java:540) 
>>
>>         at
>>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:481) 
>>
>>         at
>>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
>>         at 
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421)
>>         ........................................
>>cause mère
>>org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid 
>>authorization specification: Access denied for user: 'client@127.0.0.1' 
>>(Using password: YES)
>>         at 
>>
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:85) 
>>
>>         at
>>
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:184) 
>>
>>         at
>>
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:724) 
>>
>>         ...........................................
>>
>>Caused by: java.sql.SQLException: Invalid authorization specification:
>>Access denied for user: 'client@127.0.0.1' (Using password: YES)
>>         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:330)
>>         at
org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
>>         at 
>> org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
>>         at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
>>         at 
>>
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:83) 
>>
>>         ... 43 more
>>
>>
>>
>
>
>--
>Nilling Software Design
>Postbus 43
>2280 AA  Rijswijk ZH
>w: http://www.nilling.nl
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: I have a problem

Posted by NOLA ZE Christian <ob...@yahoo.fr>.
I have always use mysql as a client not as a dba, could u tell me precisely 
how to add user in the mysql server. The version is mysql 4.0

At 12:01 06/05/2003 +0000, you wrote:
>Seems to me that user client on your localhost (127.0.0.1) has no access 
>rigths on the mysql server. Just add user client@127.0.0.1 to mysql and 
>give it the proper rigths
>
>Johan
>
>NOLA ZE Christian schreef:
>>I try to write a j2ee application which use as
>>         server : apache tomcat 4.1
>>           framework : struts
>>           database : mysql
>>i have write all jsp, java classes, web.xml and struts-config.xml.
>>that's my struts-config.xml
>>*********************************************************************************************************************************************************************** 
>>
>><?xml version="1.0" encoding="ISO-8859-1" ?>
>><!DOCTYPE struts-config PUBLIC
>>           "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
>>           "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
>><struts-config>
>>   <data-sources>
>>     <data-source>
>>       <set-property property="driverClass"
>>         value="org.gjt.mm.mysql.Driver" />
>>       <set-property property="url"
>>         value="jdbc:mysql://localhost/employes" />
>>       <set-property property="maxCount"
>>         value="5"/>
>>       <set-property property="minCount"
>>         value="1"/>
>>       <set-property property="user"
>>         value="username"/>
>>       <set-property property="password"
>>         value="password"/>
>>     </data-source>
>>   </data-sources>
>>   <form-beans>
>>     <form-bean name="loginForm"
>>       type="com.eyrolles.LoginForm" />
>>     <form-bean name="employeForm"
>>       type="com.eyrolles.EmployeForm" />
>>   </form-beans>
>>   <global-forwards>
>>     <forward name="login" path="/login.jsp"/>
>>   </global-forwards>
>>   <action-mappings>
>>     <action path="/Login"
>>       type="com.eyrolles.LoginAction"
>>       validate="true"
>>       input="/login.jsp"
>>       name="loginForm"
>>       scope="request" >
>>       <forward name="success" path="/EmployeListe.do"/>
>>     </action>
>>     <action path="/EmployeListe"
>>       type="com.eyrolles.EmployeListeAction"
>>       scope="request" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/employeliste.jsp"/>
>>     </action>
>>     <action path="/Add"
>>       type="com.eyrolles.AddEmployeAction"
>>       name="employeForm"
>>       scope="request"
>>       input="/addemploye.jsp"
>>       validate="true" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/EmployeListe.do"/>
>>       <forward name="error" path="/addemploye.jsp"/>
>>     </action>
>>     <action path="/Edit"
>>       type="com.eyrolles.GetEmployeAction"
>>       name="employeForm"
>>       scope="request"
>>       validate="false" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/editemploye.jsp"/>
>>       <forward name="error" path="/EmployeListe.do"/>
>>     </action>
>>     <action path="/EditEmploye"
>>       type="com.eyrolles.EditEmployeAction"
>>       name="employeForm"
>>       scope="request"
>>       input="/editemploye.jsp"
>>       validate="true" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/EmployeListe.do"/>
>>       <forward name="error" path="/editemploye.jsp"/>
>>     </action>
>>     <action path="/Delete"
>>       type="com.eyrolles.DeletemployeAction"
>>       scope="request"
>>       validate="false" >
>>       <set-property property="loginRequired" value="true"/>
>>       <forward name="success" path="/EmployeListe.do"/>
>>     </action>
>>   </action-mappings>
>>   <message-resources
>>     parameter="com.eyrolles.ApplicationResources" />
>></struts-config>
>>************************************************************************************************************************************************************************* 
>>
>>When i try to test that appication, i have an error message, could u give 
>>me a solution to solve that problem :
>>type Rapport d''exception
>>message
>>description Le serveur a recontrer une erreur interne () qui l'a empèché 
>>de satisfaire la requête.
>>exception
>>javax.servlet.ServletException: java.sql.SQLException: Invalid 
>>authorization specification: Access denied for user: 'client@127.0.0.1' 
>>(Using password: YES)
>>         at 
>> org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:540) 
>>
>>         at 
>> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:481) 
>>
>>         at 
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
>>         at 
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421)
>>         ........................................
>>cause mère
>>org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid 
>>authorization specification: Access denied for user: 'client@127.0.0.1' 
>>(Using password: YES)
>>         at 
>> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85) 
>>
>>         at 
>> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184) 
>>
>>         at 
>> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:724) 
>>
>>         ...........................................
>>
>>Caused by: java.sql.SQLException: Invalid authorization specification: 
>>Access denied for user: 'client@127.0.0.1' (Using password: YES)
>>         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:330)
>>         at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
>>         at 
>> org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
>>         at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
>>         at 
>> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83) 
>>
>>         ... 43 more
>>
>>
>>
>
>
>--
>Nilling Software Design
>Postbus 43
>2280 AA  Rijswijk ZH
>w: http://www.nilling.nl
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: I have a problem

Posted by Johan <ja...@nilling.nl>.
Seems to me that user client on your localhost (127.0.0.1) has no access 
rigths on the mysql server. Just add user client@127.0.0.1 to mysql and 
give it the proper rigths

Johan

NOLA ZE Christian schreef:
> I try to write a j2ee application which use as
>         server : apache tomcat 4.1
>           framework : struts
>           database : mysql
> i have write all jsp, java classes, web.xml and struts-config.xml.
> that's my struts-config.xml
> *********************************************************************************************************************************************************************** 
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
>           "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
> 
> <struts-config>
> 
>   <data-sources>
>     <data-source>
>       <set-property property="driverClass"
>         value="org.gjt.mm.mysql.Driver" />
>       <set-property property="url"
>         value="jdbc:mysql://localhost/employes" />
>       <set-property property="maxCount"
>         value="5"/>
>       <set-property property="minCount"
>         value="1"/>
>       <set-property property="user"
>         value="username"/>
>       <set-property property="password"
>         value="password"/>
>     </data-source>
>   </data-sources>
> 
>   <form-beans>
>     <form-bean name="loginForm"
>       type="com.eyrolles.LoginForm" />
>     <form-bean name="employeForm"
>       type="com.eyrolles.EmployeForm" />
>   </form-beans>
> 
>   <global-forwards>
>     <forward name="login" path="/login.jsp"/>
>   </global-forwards>
> 
>   <action-mappings>
> 
>     <action path="/Login"
>       type="com.eyrolles.LoginAction"
>       validate="true"
>       input="/login.jsp"
>       name="loginForm"
>       scope="request" >
>       <forward name="success" path="/EmployeListe.do"/>
>     </action>
> 
>     <action path="/EmployeListe"
>       type="com.eyrolles.EmployeListeAction"
>       scope="request" >
>       <set-property property="loginRequired" value="true"/>
>       <forward name="success" path="/employeliste.jsp"/>
>     </action>
> 
>     <action path="/Add"
>       type="com.eyrolles.AddEmployeAction"
>       name="employeForm"
>       scope="request"
>       input="/addemploye.jsp"
>       validate="true" >
>       <set-property property="loginRequired" value="true"/>
>       <forward name="success" path="/EmployeListe.do"/>
>       <forward name="error" path="/addemploye.jsp"/>
>     </action>
> 
>     <action path="/Edit"
>       type="com.eyrolles.GetEmployeAction"
>       name="employeForm"
>       scope="request"
>       validate="false" >
>       <set-property property="loginRequired" value="true"/>
>       <forward name="success" path="/editemploye.jsp"/>
>       <forward name="error" path="/EmployeListe.do"/>
>     </action>
> 
>     <action path="/EditEmploye"
>       type="com.eyrolles.EditEmployeAction"
>       name="employeForm"
>       scope="request"
>       input="/editemploye.jsp"
>       validate="true" >
>       <set-property property="loginRequired" value="true"/>
>       <forward name="success" path="/EmployeListe.do"/>
>       <forward name="error" path="/editemploye.jsp"/>
>     </action>
> 
>     <action path="/Delete"
>       type="com.eyrolles.DeletemployeAction"
>       scope="request"
>       validate="false" >
>       <set-property property="loginRequired" value="true"/>
>       <forward name="success" path="/EmployeListe.do"/>
>     </action>
> 
>   </action-mappings>
> 
>   <message-resources
>     parameter="com.eyrolles.ApplicationResources" />
> 
> </struts-config>
> 
> ************************************************************************************************************************************************************************* 
> 
> 
> When i try to test that appication, i have an error message, could u 
> give me a solution to solve that problem :
> 
> type Rapport d''exception
> 
> message
> 
> description Le serveur a recontrer une erreur interne () qui l'a empèché 
> de satisfaire la requête.
> 
> exception
> javax.servlet.ServletException: java.sql.SQLException: Invalid 
> authorization specification: Access denied for user: 'client@127.0.0.1' 
> (Using password: YES)
>         at 
> org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:540) 
> 
>         at 
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:481) 
> 
>         at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 
> 
>         at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421)
>         ........................................
> 
> cause mère
> org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid 
> authorization specification: Access denied for user: 'client@127.0.0.1' 
> (Using password: YES)
>         at 
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85) 
> 
>         at 
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184) 
> 
>         at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:724) 
> 
>         ...........................................
> 
> 
> Caused by: java.sql.SQLException: Invalid authorization specification: 
> Access denied for user: 'client@127.0.0.1' (Using password: YES)
>         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:330)
>         at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
>         at 
> org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
>         at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
>         at 
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83) 
> 
>         ... 43 more
> 
> 
> 
> 
> 
> 
> 
> 


-- 
Nilling Software Design
Postbus 43
2280 AA  Rijswijk ZH
w: http://www.nilling.nl


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


I have a problem

Posted by NOLA ZE Christian <ob...@yahoo.fr>.
I try to write a j2ee application which use as
         server : apache tomcat 4.1
           framework : struts
           database : mysql
i have write all jsp, java classes, web.xml and struts-config.xml.
that's my struts-config.xml
***********************************************************************************************************************************************************************
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
           "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
           "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>

   <data-sources>
     <data-source>
       <set-property property="driverClass"
         value="org.gjt.mm.mysql.Driver" />
       <set-property property="url"
         value="jdbc:mysql://localhost/employes" />
       <set-property property="maxCount"
         value="5"/>
       <set-property property="minCount"
         value="1"/>
       <set-property property="user"
         value="username"/>
       <set-property property="password"
         value="password"/>
     </data-source>
   </data-sources>

   <form-beans>
     <form-bean name="loginForm"
       type="com.eyrolles.LoginForm" />
     <form-bean name="employeForm"
       type="com.eyrolles.EmployeForm" />
   </form-beans>

   <global-forwards>
     <forward name="login" path="/login.jsp"/>
   </global-forwards>

   <action-mappings>

     <action path="/Login"
       type="com.eyrolles.LoginAction"
       validate="true"
       input="/login.jsp"
       name="loginForm"
       scope="request" >
       <forward name="success" path="/EmployeListe.do"/>
     </action>

     <action path="/EmployeListe"
       type="com.eyrolles.EmployeListeAction"
       scope="request" >
       <set-property property="loginRequired" value="true"/>
       <forward name="success" path="/employeliste.jsp"/>
     </action>

     <action path="/Add"
       type="com.eyrolles.AddEmployeAction"
       name="employeForm"
       scope="request"
       input="/addemploye.jsp"
       validate="true" >
       <set-property property="loginRequired" value="true"/>
       <forward name="success" path="/EmployeListe.do"/>
       <forward name="error" path="/addemploye.jsp"/>
     </action>

     <action path="/Edit"
       type="com.eyrolles.GetEmployeAction"
       name="employeForm"
       scope="request"
       validate="false" >
       <set-property property="loginRequired" value="true"/>
       <forward name="success" path="/editemploye.jsp"/>
       <forward name="error" path="/EmployeListe.do"/>
     </action>

     <action path="/EditEmploye"
       type="com.eyrolles.EditEmployeAction"
       name="employeForm"
       scope="request"
       input="/editemploye.jsp"
       validate="true" >
       <set-property property="loginRequired" value="true"/>
       <forward name="success" path="/EmployeListe.do"/>
       <forward name="error" path="/editemploye.jsp"/>
     </action>

     <action path="/Delete"
       type="com.eyrolles.DeletemployeAction"
       scope="request"
       validate="false" >
       <set-property property="loginRequired" value="true"/>
       <forward name="success" path="/EmployeListe.do"/>
     </action>

   </action-mappings>

   <message-resources
     parameter="com.eyrolles.ApplicationResources" />

</struts-config>

*************************************************************************************************************************************************************************

When i try to test that appication, i have an error message, could u give 
me a solution to solve that problem :

type Rapport d''exception

message

description Le serveur a recontrer une erreur interne () qui l'a empèché de 
satisfaire la requête.

exception
javax.servlet.ServletException: java.sql.SQLException: Invalid 
authorization specification: Access denied for user: 'client@127.0.0.1' 
(Using password: YES)
         at 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:540)
         at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:481)
         at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421)
         ........................................

cause mère
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Invalid 
authorization specification: Access denied for user: 'client@127.0.0.1' 
(Using password: YES)
         at 
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
         at 
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
         at 
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:724)
         ...........................................


Caused by: java.sql.SQLException: Invalid authorization specification: 
Access denied for user: 'client@127.0.0.1' (Using password: YES)
         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:330)
         at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
         at 
org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
         at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
         at 
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
         ... 43 more