On 4/8/07, Dale Newfield <[EMAIL PROTECTED]> wrote:
mraible wrote:
>> rewriteFilter- when and how is this used,
> It's not used by most frameworks (except Struts 2), but it's available
> for use.  It's similar to Apache's mod_rewrite and allows you to
> beautify URLs and all kinds of other things.

Based on some advise in other threads I've just switched from using
urlrewrite to wildcarded actions (in a separate namespace in order to
get another "/" in the url) :

<package name="viewUser" namespace="/user" extends="struts-default">
   <action name="*" class="userAction" method="view">
     <param name="username">{1}</param>
     <result name="success">/WEB-INF/pages/viewUser.jsp</result>
     <result name="badID">/404.jsp</result>
   </action>
</package>

So I was about to drop urlRewrite altogether, but then noticed this rule:

<!-- Override default validation.js from Struts2 -->
<rule>
   <from>^/struts/css_xhtml/validation.js$</from>
   <to type="forward" last="true">/template/css_xhtml/validation.js</to>
</rule>

I was unable to find any references in JIRA/elsewhere as to why this is
necessary (looks like it's just changing how client-side validation gets
displayed?)...

This is necessary because w/o it, there's a JavaScript error that
happens with client-side validation and <ul>, <li>'s like we use.

Here's a thread on the issues I had:

http://forums.opensymphony.com/thread.jspa?threadID=32983&tstart=0


...if using struts2 do you still suggest leaving urlrewrite in place in
order for this script to get swapped in for the one packaged with struts?

Yes, but only if you're using client-side validation. AFAICT,
client-side validation still only works if you put the roles in
YourAction-validation.xml rather than ModelObject-validation.xml.

http://jira.opensymphony.com/browse/XW-227

However, if you use DWR-based validation, it may work.

http://www.opensymphony.com/webwork/wikidocs/AJAX%20Validation.html


-Dale

P.S.:  In my searching I found that google is indexing jetty content at:
http://home.raibledesigns.com:8280/logs/

I've tried adding the following - we'll see if it works:

User-agent: *
Disallow: /logs

Matt


You probably want to add a robots.txt to prevent that...
http://www.google.com/search?q=css_xhtml/validation.js+appfuse&hl=en

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




--
http://raibledesigns.com

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

Reply via email to