Hello,

 See intermixed.

      Cedric

Max Johnson wrote:

Hi,

My project uses ActionMappings for everything. I want all page access to be
routed via the controller so my JSPs are hidden below /WEB-INF.

I'm using both the tiles and validator packages so a typical action mapping
looks something like this:

	<action
		path="/admin/UserRegistration"
		type="com.dealspark.memorypack.webapp.UserRegistrationAction"
	      name="userRegistration"
		scope="request"
		input=".mp.userRegistration"
		validate="true"/>

This works fine. My problem is that I initially need to present a blank form
(which fails the validation criteria set out in validation.xml). I believe
the recommended approach when all activity is routed via the controlled
requires that a second action mapping be defined. Something like:

	<action
		path="/admin/UserRegistrationCreate"
		type="org.apache.struts.actions.ForwardAction"
		parameter=".mp.userRegistration"
	      name="userRegistration"
		scope="request"
		validate="false"/>

My problem is that org.apache.struts.actions.ForwardAction does not like
tiles definitions as parameters. A request to /admin/UserRegistrationCreate
throws an exception:

javax.servlet.ServletException: Path .mp.userRegistration does not start
with a "/" character

Do you have setup the TilesRequestProcessor and the TilesPlugin correctly ? You need the TilesPlugin, which in turn setup the TilesRequestProcessor, in order to catch tiles definitions.

It may be that I'm missing the point entirely here but can anyone tell me
how, when using tiles, I can temporarily disable validation to display the
preliminary entry form.

I think you should be able to call the validation from within your action. So, you can do some logic detecting if you need some validation or not.


Regards

Max Johnson


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to