struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: Rest Like Rails
Date Mon, 05 May 2008 17:11:05 GMT
Take a look at:

http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java?view=annotate

line 149:

String path = string(pathPrefix, actionName, "-", resultCode, "." , ext);

that's where the path to the template is built.

musachy

On Mon, May 5, 2008 at 12:13 PM, dusty <dustin_pearce@yahoo.com> wrote:
>
>  What would it take to make the results organization using the REST and
>  Codebehind (or Convention) plugins more like Rails?  I used a directory
>  structure like the following in a recent Struts2 project where the actions
>  were done RESTfully, but without the REST plugin or Codebehind (can't think
>  of a better term).
>
>  - patient/ (for class PatientAction)
>  ----index.html.jsp
>  ----edit.html.jsp
>  ----new.html.jsp
>  ----show.html.jsp
>  ----_fields.jsp
>
>  - transfer-log/ (for class TransferLogAction)
>  ----show.xml.ftl
>  ----index.xml.ftl
>
>  It worked really well and the organization felt "more better" than a flat
>  directory with patient-index.jsp, patient-edit.jsp, transfer-log-index.jsp,
>  etc etc.  I looked through the Codebehind and Convention plugins and I
>  didn't figure out where to make the change to just do action/result rather
>  than action-result.  Can anyone point me in the right direction on where to
>  make that kind of change?
>  --
>  View this message in context: http://www.nabble.com/Rest-Like-Rails-tp17065189p17065189.html
>  Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>  For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Mime
View raw message