You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurie Harper <la...@holoweb.net> on 2008/04/09 23:56:22 UTC

Re: Struts2: How to put validation.xml and Action.java in separate folders

goelshek wrote:
> For Struts 2:
> 
> Does anyone know if it is possible to put the validation.xml for an Action
> in a folder other than where the action resides? If I have a 100 java
> classes in my action package, I would like their *-validation.xmls to be in
> a separate folder such that all .java's are together and all .xml's are
> together. I couldn't find any configuration in struts2 to achieve this.

You can put the .xml files in a separate folder from the .java files, 
sure, as long as your build process copies them to the right place on 
the classpath. I don't think there's a way to have them in a different 
folder than the .class files though. Sounds like you'd be better off 
breaking out your actions into sub-packages anyway.

L.


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


Re: Struts2: How to put validation.xml and Action.java in separate folders

Posted by goelshek <go...@yahoo.com>.
"as your build process copies them to the right place on the classpath. I
don't think there's a way to have them in a different folder than the .class
files though"

I don't really have a formal build process for now. So what's in my
/WEB-INF/src folder is going to be in my /WEB-INF/classes folder with the
.class files instead of the .java files. So yes, I do want to be able to
have .xml and .class files (not just .java files) in separate folders; my
bad on that one, I should have been more explicit.

"Sounds like you'd be better off breaking out your actions into sub-packages
anyway."

I agree. 100 was an exaggerated number, just to make a point of what I am
looking for.



Laurie Harper wrote:
> 
> goelshek wrote:
>> For Struts 2:
>> 
>> Does anyone know if it is possible to put the validation.xml for an
>> Action
>> in a folder other than where the action resides? If I have a 100 java
>> classes in my action package, I would like their *-validation.xmls to be
>> in
>> a separate folder such that all .java's are together and all .xml's are
>> together. I couldn't find any configuration in struts2 to achieve this.
> 
> You can put the .xml files in a separate folder from the .java files, 
> sure, as long as your build process copies them to the right place on 
> the classpath. I don't think there's a way to have them in a different 
> folder than the .class files though. Sounds like you'd be better off 
> breaking out your actions into sub-packages anyway.
> 
> L.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts2%3A-How-to-put-validation.xml-and-Action.java-in-separate-folders-tp16596604p16598238.html
Sent from the Struts - User mailing list archive at Nabble.com.


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