Foros de discusión

deploying struts-config does not work correctly

thumbnail
Michael Poznecki, modificado hace 14 años.

deploying struts-config does not work correctly

Expert Mensajes: 301 Fecha de incorporación: 10/12/08 Mensajes recientes
Hello all,

I am using Liferay 5.1 developing in Eclipse.

I have added a couple of new entries into the struts-config file. One note: it seems that when you deploy the ant script creates a struts-config-ext file ????

So if I do a full deploy, my lines are not entered into the struts-config file, but are instead put into the stuts-config-ext file. That seems like it would be find, except Liferay does not seem to read the struts-config-ext file. I'm guess that because I always get a "path not found" error when trying to access my bean.

So what I have to do, is open my struts-config file and make a minor change, (usually just put in a space) then save, then do a "fast-deploy" and it will work. Doing a "fast-deploy" will put my lines in both the struts-config file as well as the struts-config-ext file.


So I'm not sure which one is the problem: Liferay not reading the struts-config-ext file, or the ant script not putting my lines into the struts-config file.

Anyone else seen this?



Michael
thumbnail
Michael Poznecki, modificado hace 14 años.

RE: deploying struts-config does not work correctly

Expert Mensajes: 301 Fecha de incorporación: 10/12/08 Mensajes recientes
Quick update. I found that if I put my lines into the version of struts-config that is inside of the tmp folder that every thing gets copied correctly. Of course this is not the right way to fix the problem. My guess is that the version inside the tmp folder is there to copy a virgin copy into production while putting my changes into the struts-config-ext.

So the new real question is why is Liferay not reading and/or using the struts-config-ext?



Michael
thumbnail
Tomas Polesovsky, modificado hace 14 años.

RE: deploying struts-config does not work correctly

Liferay Master Mensajes: 676 Fecha de incorporación: 13/02/09 Mensajes recientes
Hi,

are you developing in EXT or Plugins SDK?

-- tom
thumbnail
Michael Poznecki, modificado hace 14 años.

RE: deploying struts-config does not work correctly

Expert Mensajes: 301 Fecha de incorporación: 10/12/08 Mensajes recientes
EXT
Mónica Rubio, modificado hace 13 años.

RE: deploying struts-config does not work correctly

New Member Mensajes: 6 Fecha de incorporación: 21/07/10 Mensajes recientes
Anyone who know what is the problem?.
I'm using Liferay 5.2.3. I've developed a hook of portlet 'journal'. I have added a new jsp and a new action mapping to this jsp. But when i added this mapping to struts-config-ext.xml by deploying 'ext/ext-web/docroot/WEB-INF/struts-config.xml' i get 'invalid path request' error. And when i edit directly 'apache-tomcat-5.5.28\webapps\ROOT\WEB-INF\struts-config.xml' everything works fine.

Thanks
thumbnail
Mahmudur Rahman Manna, modificado hace 13 años.

RE: deploying struts-config does not work correctly

New Member Mensajes: 7 Fecha de incorporación: 9/07/10 Mensajes recientes
hello,

I think the struts-config-ext.xml is not referred in ext-web web.xml. so when you deploy
ext it misses the struts-config-ext.xml.

you can do it with editing ext-web web.xml

<servlet>
		<servlet-name>Main Servlet</servlet-name>
		<servlet-class>com.liferay.portal.servlet.MainServlet</servlet-class>
		<init-param>
			<param-name>config</param-name>
			<param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-ext.xml</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>0</param-value>
		</init-param>
		<init-param>
			<param-name>detail</param-name>
			<param-value>0</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
Mónica Rubio, modificado hace 13 años.

RE: deploying struts-config does not work correctly

New Member Mensajes: 6 Fecha de incorporación: 21/07/10 Mensajes recientes
Hello, Mahmudur!
Yes, probably you're right. I'm going to try it and post my results. Thank you very much.