Jahia Dev Forum > problem of using...

0 (0 Good)
0 (0 Bad)

problem of using struts with Jahia6

by  ouldam »  2011/06/07 20:43

Hello
I would like to know if anyone among you who knows the problem of using struts 1.2.9 with eclipse in jahia6 I described below, it will save me life.

the process I followed is as follows:

1)I declared my "ActionServlet" in the "web.xml" to my project as below:

<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>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

2)Then I created the file "struts-config.xml in the directory
/ Web-INF project and I set a GlobalForward as below name "forgottenPasswordGlobalForward".


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration
1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
...
<global-forwards >
<forward name="forgottenPasswordGlobalForward" path="/forgotten_password.jsp"></forward>
</global-forwards>

...
</struts-config>

3)I created a hyper link in my jsp as below:

<a href="forgottenPasswordGlobalForward.do">
Mon Lien hypertexte
</a>

And I have this error :


2010-04-26 17:41:36,019: WARN [ErrorLoggingFilter] - Access denied for
resource: /cms
2010-04-26 17:41:42,060: WARN [ErrorLoggingFilter] - Access denied for
resource: /forgottenPasswordGlobalForward.do


Thank you in advance .

  (ouldam)

Number of messages  3
Registration date
0 (0 Good)
0 (0 Bad)

Re: problem of using struts with Jahia6

by  pap@commaro.com »  2011/06/07 20:43

Hello,

I think the problem lies in the first step. You are defining an ActionServlet in the web.xml, although Jahia already has a Struts ActionServlet defined. You should not overwrite that, but you can add your additional struts-config.xml in the config parameter list (delimited with commas).

What is the outcome if you try that ?

Regards,
Benjamin

Benjamin Papez (pap@commaro.com)

Number of messages  220
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page