Re: struts-config.xml

2003-03-20 Thread Dave Patton
Use a concurrent source code control mechanism such as CVS.  This way
multiple people can work on on the same file at the same time.

On Thu, 2003-03-20 at 13:13, Pat Young wrote:

> I am curious as to how others are working with the
> struts-config.xml file.  I am working on a large
> project with a team of 8 other developers.  So far we
> have over 200 actions.  The struts-config.xml is
> becoming a bottle neck, because each developer needs
> to update the file at the same with entries into this
> file.  Does anyone have any ideas as to how to make
> working with this file any easier?  Thanks in advance.
> 
> Pay Young
> 
> __
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use  

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl 
X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE 
CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk 
cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF 
GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra 
A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU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Expressions

2003-03-10 Thread Dave Patton
Not that I have seen per se.  There is a site that has some pre-built
regexs but Im sorry I cant remember the URL.  Your best bet is to go buy
the Oreilly book "Mastering Regular Expressions"  It is pretty much the
bible of regex and well worth the investment.

Dave Patton

On Mon, 2003-03-10 at 10:28, Vinay wrote:

> I am stuck in using Regular expressions in Struts validator,,i.e validation.xml for 
> validating input fields .Is there a web site which lists all kinds of expressions 
> that can be used in a validation.xml.
> 
> examples currency ,
>   alphanumieric 
> length restriction,
>   date formats ,..etc.
> 
> Help appreciated,
> 
> Thanks in advance ,
> Vinay



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> 

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl 
X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE 
CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk 
cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF 
GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra 
A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU6/KI+T 
5WDzzKEGsyxOI+GYeGRKO0ZAYITG9HxevvKa1GMHBwRYNr2Qv62ckkHTy5rdmzZe 
PFM/am8B9maH5gKg6oIqzJwfmvb+ll8DRbhfI25trLqzggifrFcZHkOwTVGLNfdM 
cPWK/Yu4dOLAKCow06q0G/tDmXNkcyx12R6Z4Y/cQ5Qyvt1WP+eQAM/HBJI8rR9c 
cxS80pEorJIx4a7x9EsiwmB8milqBrXqHN2GRe/PnZSM9czBK7kBDQQ7ouqNAQgA 
sWO4lchFwK6leJClCpdaCjL4oUGjiZorW+XG2YKtQW6a+oYlplcHFkMSibkTN6Jc 
RdPEkarRvJ7sj+UgsUfkj4//EtqARuHTXhnMlsjqISTXlS2l61fQFg1d0iwvinyV 
sq6lVDtrr7UBe2b5TOuoRe13CzGWyhNQafV1gMcpBx9KxNi24UowJiT+cJpnxMCu 
+DNElC2AmG7phPagSFL8F4f++dGL2l8kAkxCSCl3Kr+8HUlFmOwwZ1PGSSM83pM/ 
NNZKDAdGUiBRKqC32oOhKacxb6cf4ta1kZ6GDZcqVo+5qlz4OtUKbRLtW5Y8tiFc 
PwkDePX/F1490V3YWgHVzwARAQABiQEiBBgBAgAMBQI7ouqNBRsMAAoJEOWQ 
5D6nisB/8xsIAJLNUQC8SOQF5txBrO22W7uAJ9xU9RK66Pyf9a+KjdNf4rE6vK4n 
vhbSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6 
4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP 
JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+ 
TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3 
XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0= 
=/zoc 

-END PGP PUBLIC KEY BLOCK-


Re: Sort a collection in alphabetic order

2003-03-10 Thread Dave Patton
I concur with Nash.  Use a Comparator Object for this. Itis in the
java.util package.

Dave Patton
 


On Mon, 2003-03-10 at 10:27, nash e. foster wrote:

> You could have your PeopleBean implement Comparable, which is pretty 
> easy, and then use TreeSet to create a sorted set using your compareTo 
> method.
> 
> -nash
> 
> On Monday, March 10, 2003, at 01:16  PM, Søren Blidorf wrote:
> 
> >
> > Hi.
> > I need to sort my collection "people" in alphabetic order by lastname,
> > firstname.
> > Can anybody help me?
> >
> > I guess I should do it in the Action and not when displayed in jsp 
> > page.
> >
> >
> >
> > Collection people = new ArrayList();
> >
> > while( rs.next() ) {
> > PeopleBean pb = new PeopleBean();
> > pb.setId(rs.getInt("ID"));
> > pb.setFirstname( rs.getString( "FIRSTNAME" ));
> > pb.setLastname( rs.getString( "LASTNAME" ));
> > }
> >
> > people.add( pb );
> >
> >
> > Søren Blidorf
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ***
> This message is intended only for the use of the intended recipient and
> may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
> are not the intended recipient, you are hereby notified that any use,
> dissemination, disclosure or copying of this communication is strictly
> prohibited.  If you have received this communication in error, please
> destroy all copies of this message and its attachments and notify us
> immediately.
> ***
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> 

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+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bSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6 
4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP 
JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+ 
TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3 
XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0= 
=/zoc 

-END PGP PUBLIC KEY BLOCK-


RE: Struts and Cocoon Integration

2003-03-07 Thread Dave Patton
Yes.  That was the idea was to modify the plugin so you can specify
either Struts or Cocoon as the front end.  If it is Struts, then just
route all *.(whatever) requests to Cocoon.  If Cocoon is first then
proceed as you have it now?  What do you think?

Dave Patton


On Fri, 2003-03-07 at 10:42, Don Brown wrote:

> Exactly.  When performance is key, you can have Struts use JSP directly.
> Of course, with how the plugin is now, the request will still be sent to
> Cocoon which would reject it.  As for the processing time it takes for
> Cocoon to reject it, I don't know.  My guess is it would depend on whether
> Cocoon was using compiled sitemaps or not.
> 
> Again, of course you could rewrite the plugin so it only processes
> requests ending with "coc", but then you couldn't wrap existing struts
> applications without modifying all the forwards in struts-config.xml.
> 
> Don
> 
> On 7 Mar 2003, Dave Patton wrote:
> 
> > But if performance is a concern, shouldnt I user Struts as the front end
> > and then provide a mapping for all *.xml (or whatever other pattern I
> > use) requests to the cocoon servlets?  This way I only incur the cocoon
> > performance penalty on those requests which absolutely require cocoon?
> > Im sure there are more ways to skin this cat.
> >
> > Dave Patton
> >
> > On Fri, 2003-03-07 at 01:36, ROSSEL Olivier wrote:
> >
> > > > There are at least two ways to handle the forwards:
> > > > explicitly using some
> > > > sort of suffix/prefix (e.g. all paths that end in ".coc" will
> > > > be handled
> > > > by the cocoon plugin) or simply pass all the request first to
> > > > cocoon and
> > > > if cocoon doesn't handle it, process it normally.  The stxx plugin
> > > > (http://sf.net/projects/stxx) uses the former while I chose
> > > > the latter.
> > > > In my implementation, if you don't create a pipeline to match
> > > > the forward,
> > > > it is processed by Struts normally.  It is trival to write code to use
> > > > either method.
> > > >
> > > > Hope that helps.
> > >
> > > Cocoon has an impressive URl management system (for example, it can trigger
> > > not on the URL but on some combination of request parameters if you want :-)
> > > So Cocoon as the front-end is the best, IMHO.
> > >
> > > This e-mail is intended only for the above addressee. It may contain
> > > privileged information. If you are not the addressee you must not copy,
> > > distribute, disclose or use any of the information in it. If you have
> > > received it in error please delete it and immediately notify the sender.
> > > Security Notice: all e-mail, sent to or from this address, may be
> > > accessed by someone other than the recipient, for system management and
> > > security reasons. This access is controlled under Regulation of
> > > Investigatory Powers Act 2000, Lawful Business Practises.
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > _
> > David H. Patton
> > [EMAIL PROTECTED]
> > (202) 276-8998 - pcs
> >
> > -BEGIN PGP PUBLIC KEY BLOCK-
> >
> > Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> >
> > mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w
> > 3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa
> > 2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w
> > YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl
> > X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE
> > CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk
> > cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF
> > GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra
> > A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU6/KI+T
> > 5WDzzKEGsyxOI+GYeGRKO0ZAYITG9HxevvKa1GMHBwRYNr2Qv62ckkHTy5rdmzZe
> > PFM/am8B9maH5gKg6oIqzJwfmvb+ll8DRbhfI25trLqzggifrFcZHkOwTVGLNfdM
> > cPWK/Yu4dOLAKCow06q0G/tDmXNkcyx12R6Z4Y/cQ5Qyvt1WP+eQAM/HBJI8rR9c
> > cxS80pEorJIx4a7x9EsiwmB8milqBrXqHN2GRe/PnZSM9czBK7kBDQQ7ouqNAQgA
> > sWO4lchFwK6leJClCpdaCjL4oUGjiZorW+XG2YKtQW6a+oYlplcHFkMSibkTN6Jc
> > RdPEkarRvJ7sj+UgsUfkj4//EtqARuHTXhnMlsjqISTXlS2l61fQFg1d0iwvinyV
> > sq6lVDtrr7UBe2b5TOuoRe13CzGWyhNQafV

Re: Want to stop tomcat's info messages from printing to console

2003-03-07 Thread Dave Patton
Yes.  You set this in the server.xml file of tomcat with the 
entry.  Check your server.xml file and I will bet you are using a
ConsoleLogger at some level.  Change those to FileLogger types instead. 
Check the Tomcat docs
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html) for
more info.

Dave Patton

On Fri, 2003-03-07 at 10:17, Scott Power wrote:

> I was wondering if there is a way to stop tomcat from printing its
> messages to the console.  I know how to configure the log4j message from
> within the application, by setting the level in the log4j.configuration
> file but I still get message on the console like the ones below.  I
> would like to stop these from showing up, I only want to see message
> from my app and the fact that tomcat has started and stopped.  I tried
> to change my CATALINA_OPTS variable in my CATALINA.bat file but I think
> I might either have incorrect syntax or something, I am using win 2000,
> with tomcat 4.1.  I have checked all my debug levels in the server xml,
> web.xml both for tomcat and the app itself.  I know its not a really big
> deal, but I want to make some clean log files for later use.  If anyone
> has ideas I would like to hear them.
> 
> Once again thanks in advance.
> 
> Scott 
> 
> 
> 
> 
> 7-Mar-2003 2:11:56 PM org.apache.commons.modeler.Registry loadRegistry
> INFO: Loading registry information
> 7-Mar-2003 2:11:56 PM org.apache.commons.modeler.Registry getRegistry
> INFO: Creating new Registry instance
> 7-Mar-2003 2:11:57 PM org.apache.commons.modeler.Registry getServer
> INFO: Creating MBeanServer
> 7-Mar-2003 2:11:59 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on port 8080
>  .
>  .
>  .
>  .
> \/
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> 

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl 
X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE 
CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk 
cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF 
GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra 
A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU6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Cocoon Integration

2003-03-07 Thread Dave Patton
But if performance is a concern, shouldnt I user Struts as the front end
and then provide a mapping for all *.xml (or whatever other pattern I
use) requests to the cocoon servlets?  This way I only incur the cocoon
performance penalty on those requests which absolutely require cocoon? 
Im sure there are more ways to skin this cat.

Dave Patton

On Fri, 2003-03-07 at 01:36, ROSSEL Olivier wrote:

> > There are at least two ways to handle the forwards: 
> > explicitly using some
> > sort of suffix/prefix (e.g. all paths that end in ".coc" will 
> > be handled
> > by the cocoon plugin) or simply pass all the request first to 
> > cocoon and
> > if cocoon doesn't handle it, process it normally.  The stxx plugin
> > (http://sf.net/projects/stxx) uses the former while I chose 
> > the latter.
> > In my implementation, if you don't create a pipeline to match 
> > the forward,
> > it is processed by Struts normally.  It is trival to write code to use
> > either method.
> > 
> > Hope that helps.
> 
> Cocoon has an impressive URl management system (for example, it can trigger
> not on the URL but on some combination of request parameters if you want :-)
> So Cocoon as the front-end is the best, IMHO.
> 
> This e-mail is intended only for the above addressee. It may contain
> privileged information. If you are not the addressee you must not copy,
> distribute, disclose or use any of the information in it. If you have
> received it in error please delete it and immediately notify the sender.
> Security Notice: all e-mail, sent to or from this address, may be
> accessed by someone other than the recipient, for system management and
> security reasons. This access is controlled under Regulation of
> Investigatory Powers Act 2000, Lawful Business Practises.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> 

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQw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AJ9xU9RK66Pyf9a+KjdNf4rE6vK4n 
vhbSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6 
4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP 
JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+ 
TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3 
XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0= 
=/zoc 

-END PGP PUBLIC KEY BLOCK-


Re: Struts and Cocoon Integration

2003-03-06 Thread Dave Patton
WOW!  That is good stuff man.  I have briefly taken a look at the site
an am so far impressed.  A quick question though, and forgive me if
you've already answered it:  Can I have Struts specify which requests
will go to Cocoon and which will be processed noramally in Tomcat or
other servlet engine?

Dave Patton

On Thu, 2003-03-06 at 00:27, Don Brown wrote:

> Ah yes, it looks like I missed an unclosed  element hidden in the
> application resources.  Thanks for pointing that out.  The example and
> demo have been updated.
> 
> Don
> 
> On Thu, 6 Mar 2003, alexj wrote:
> 
> > your demo don't work I got an exception every time I try to save
> > datas.
> >
> > org.apache.jasper.JasperException: getOutputStream() has already been called
> > for this response
> >
> > --
> > Alexandre Jaquet
> >
> > - Original Message -
> > From: "Don Brown" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, March 06, 2003 5:11 AM
> > Subject: Struts and Cocoon Integration
> >
> >
> > > I've developed a prototype of a Struts 1.1 plugin that integrates Cocoon
> > > into the Struts framework.  Struts forwards are passed to Cocoon to be
> > > rendered in Cocoon XML pipelines.  It combines the ease of use of Struts
> > > with the power and flexibility of Cocoon.  If you've looked into using
> > > Cocoon but was put off by its complexity, you might want to give this a
> > > look.  To demonstrate the plugin, I've slightly modified the struts
> > > example webapp to highlight how it could be used.
> > >
> > > More information, including how and why, and a demo, visit:
> > > http://www.twdata.org/struts
> > >
> > > Any and all comments welcome.
> > >
> > > Don
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> 

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl 
X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE 
CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk 
cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF 
GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra 
A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU6/KI+T 
5WDzzKEGsyxOI+GYeGRKO0ZAYITG9HxevvKa1GMHBwRYNr2Qv62ckkHTy5rdmzZe 
PFM/am8B9maH5gKg6oIqzJwfmvb+ll8DRbhfI25trLqzggifrFcZHkOwTVGLNfdM 
cPWK/Yu4dOLAKCow06q0G/tDmXNkcyx12R6Z4Y/cQ5Qyvt1WP+eQAM/HBJI8rR9c 
cxS80pEorJIx4a7x9EsiwmB8milqBrXqHN2GRe/PnZSM9czBK7kBDQQ7ouqNAQgA 
sWO4lchFwK6leJClCpdaCjL4oUGjiZorW+XG2YKtQW6a+oYlplcHFkMSibkTN6Jc 
RdPEkarRvJ7sj+UgsUfkj4//EtqARuHTXhnMlsjqISTXlS2l61fQFg1d0iwvinyV 
sq6lVDtrr7UBe2b5TOuoRe13CzGWyhNQafV1gMcpBx9KxNi24UowJiT+cJpnxMCu 
+DNElC2AmG7phPagSFL8F4f++dGL2l8kAkxCSCl3Kr+8HUlFmOwwZ1PGSSM83pM/ 
NNZKDAdGUiBRKqC32oOhKacxb6cf4ta1kZ6GDZcqVo+5qlz4OtUKbRLtW5Y8tiFc 
PwkDePX/F1490V3YWgHVzwARAQABiQEiBBgBAgAMBQI7ouqNBRsMAAoJEOWQ 
5D6nisB/8xsIAJLNUQC8SOQF5txBrO22W7uAJ9xU9RK66Pyf9a+KjdNf4rE6vK4n 
vhbSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6 
4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP 
JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+ 
TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3 
XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0= 
=/zoc 

-END PGP PUBLIC KEY BLOCK-


Re: of question

2003-03-04 Thread Dave Patton
But what if I want to specify a different datasource without hardwiring
it into the code.  Can I, or should I, use the  tag to do
that?

On Tue, 2003-03-04 at 14:13, alexj wrote:

> I don't would say it's a really good way to do but how I do that is to
> have in my ActionForm bean getter and setter as just usual but
> in my getter method I made an external call to an HelperAction who
> just retrieve the datas I want to populate.
> 
> Example 
> 
> class foo extends ActionForm {
> 
>  private Collection fooList;
> 
>  private String fooItem;
> 
> ..
> 
> public Collection getFooList () {
> fooList = HelperFooAction.getFooList ();
>return fooList;
> }
> 
> --
> Alexandre Jaquet
> 
> - Original Message - 
> From: "Dave Patton" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 04, 2003 11:06 PM
> Subject:  of  question
> 
> 
> > What exactly does the  tag of the  tag in
> > the struts-config file do.  My understanding is that it can pass or set
> > properties within the corresponding  tag class?
> > 
> > Here is a scenario that I am not sure Struts can do? The thought is to
> > have struts dynamically populate a dropdown menu from a specified
> > datasource and using a DynaActionForm.  Please correct me if I am
> > mistaken.
> > 
> > On a jsp page there is a form with 1 dropdown menu element (simple form
> > for brevity sake). You have a DynaActionForm to mirror jsp form.  It is
> > configured in struts-config as follows:
> > 
> > 
> > 
> >  > value="SomeDataSource" />
> > 
> > 
> > 
> > You also have a MyDropDownList object that looks like
> > 
> > 
> > public class MyDropDownList extends java.util.List
> > {
> > private String listSource = ""; 
> > 
> > public void setListSource(String listSource)
> > {
> > ...Some code
> > }
> > 
> > public String getListSource()
> > {
> > ...Some code
> > }
> > 
> > public void populateList()
> > {
> > ... code to get the list values from the specified list source
> > 
> > 
> > } 
> > }
> > 
> > In the jsp page:
> > 
> > 
> >  
> > 
> > 
> > Is this correct?  Can this be donw?  Is ther another better way of
> > accomplishing this?
> > 
> > Dave Patton
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> 

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V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SSM83pM/ 
NNZKDAdGUiBRKqC32oOhKacxb6cf4ta1kZ6GDZcqVo+5qlz4OtUKbRLtW5Y8tiFc 
PwkDePX/F1490V3YWgHVzwARAQABiQEiBBgBAgAMBQI7ouqNBRsMAAoJEOWQ 
5D6nisB/8xsIAJLNUQC8SOQF5txBrO22W7uAJ9xU9RK66Pyf9a+KjdNf4rE6vK4n 
vhbSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6 
4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP 
JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+ 
TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3 
XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0= 
=/zoc 

-END PGP PUBLIC KEY BLOCK-


of question

2003-03-04 Thread Dave Patton
What exactly does the  tag of the  tag in
the struts-config file do.  My understanding is that it can pass or set
properties within the corresponding  tag class?

Here is a scenario that I am not sure Struts can do? The thought is to
have struts dynamically populate a dropdown menu from a specified
datasource and using a DynaActionForm.  Please correct me if I am
mistaken.

On a jsp page there is a form with 1 dropdown menu element (simple form
for brevity sake). You have a DynaActionForm to mirror jsp form.  It is
configured in struts-config as follows:







You also have a MyDropDownList object that looks like


public class MyDropDownList extends java.util.List
{
private String listSource = ""; 

public void setListSource(String listSource)
{
...Some code
}

public String getListSource()
{
...Some code
}

public void populateList()
{
... code to get the list values from the specified list source


} 
}

In the jsp page:


 


Is this correct?  Can this be donw?  Is ther another better way of
accomplishing this?

Dave Patton



RE: deploy with ant, best practices

2003-03-04 Thread Dave Patton
Jaye:

There is a setting in the server.xml file for this.  In the 
element add liveDeploy="true"  This should, and I repeat should solve
the problem.


Dave Patton 

> Jaye Bass wrote:
> > My ant targets build directly into my webapp directories...the root 
> > location is set in an env variable. This really seems to work for us 
> > on a variety of systems (linux, windows, and occasionally macs) from 
> > development to ultimate deployment and maintenance.
> > 
> > -Original Message-
> > From: Dan Allen [mailto:[EMAIL PROTECTED]
> > Sent: Friday, February 28, 2003 1:30 AM
> > To: [EMAIL PROTECTED]
> > Subject: deploy with ant, best practices
> > 
> > I have been studying ant very thoroughly over the past two days, and I 
> > completely understand the file from top to bottom, including how to 
> > reload the application using the  tag imported from 
> > org.apache.catalina.ant.ReloadTask.  However, I am stuck on an issue.
> > 
> > Assuming that I follow the techniques from the book Struts Kick Start, 
> > I create a development tree such as
> > 
> > ${app.home}
> > /build
> > /deploy
> > /object
> > /src
> > /lib
> > /web
> > /WEB-INF
> > /META-INF
> > 
> > then the actual target tree (under tomcat/webapps) is the typical
> > 
> > ${app.name}.war
> > ${app.name}
> > /WEB-INF
> > /WEB-INF/lib
> > /WEB-INF/classes
> > /META-INF
> > 
> > Okay, now stay with me here.  Assume that I currently have the 
> > application running under tomcat.  If I build the .war file from the 
> > build/ directory and place it into ${app.home}/deploy, then copy it to 
> > ${app.name}.war under tomcat/webapps, it isn't going to automatically 
> > expand over the current running tree.  It just sits there until I kick 
> > tomcat (restart it) after deleting the running application directory.
> > 
> > So what I did instead was I made the build/ directory the actual 
> > running application directory so it just copied over the "live" files 
> > directly as they were updated by javac.  Then a simple "reload" would 
> > cause the application to start using the updated files.
> > 
> > The question on the table is as follows.  How do you get tomcat to 
> > expand an updated .war file over a currently running application 
> > before you reload it?  It seems wrong to have the "live" application 
> > the target of my build process.
> > 
> > The goal here is to update the running application without having to 
> > restart tomcat and without having to use the running application as 
> > the target of the build process.  I want to be able to copy the 
> > updated .war file into the tomcat/webapps folder and have it expand it 
> > over the running application files.  Is this unreasonable to expect 
> > this?  How does everyone else do it.  Surely you are not restarting 
> > tomcat all day.
> > 
> > Dan
> > 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


Synch Token and DispatchActions

2003-03-04 Thread Dave Patton
I am attempting to use the synchronizer token in a DispatchAction.  I
have two methods view() and update().  When the user first enters the
page they will be calling view()  Once the response page has loaded and
they submit the form in the page it will call update().  I cant seem to
get the token working right.  It is always invalid?  Basically I have
the following:


External action calls MyAction.do?method=view

public ActionForward view(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
{
... Some code ...
saveToken(request);

...Some other code ...

}

Response sends MyPage.jsp with a form in it and the   piece in the jsp.  I enter data in the form and hit
submit which calls MyAction.do?method=update

public ActionForward update(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
{
... Some code ...
saveToken(request);
if (!isTokenValid(request))
{

System.out.println("TOKEN INVALID!");
ActionForward forwardTo = view(mapping, form, request,
response);
return forwardTo;
}
else
{
System.out.println("TOKEN IS VALID.  CONTINUING!");
resetToken(request);
}

...Some other code ...
}

What I want is to keep a user from updating the form again by hitting
the refresh button. But it is ok to resubmit the form with new data
(that validation will be handled client side).

What am I missing??

Dave Patton