Re: using Taglibs

2005-03-10 Thread Dakota Jack
You need to use , so the answer is that you have to use the
taglibs unless you do some serious coding changes to the framework. 
Why do you want to use the form but not the taglibs?  If you just want
to do that, build your own ActionForm with your own autopopulation
classes, etc.?

What you are trying to do or why is not clear.

Sounds like you are a bit unacquainted with Struts and I would
recommend that you take a closer look before deciding what you want to
do.

Jack


On Thu, 10 Mar 2005 23:46:40 -0800 (PST), nitin dubey
<[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Can we use struts without using its taglibs ?  We will
> just write plain JSPs.  If yes how do we get the
> values into and from our ActionForms ?
> 
> regards,
> 
> Nitin
> 
> __
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



using Taglibs

2005-03-10 Thread nitin dubey
Hello,

Can we use struts without using its taglibs ?  We will
just write plain JSPs.  If yes how do we get the
values into and from our ActionForms ?

regards,

Nitin



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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




Re: Page Navigation in Struts

2005-03-10 Thread Matt Raible
M Murali wrote:
Thank you very much. I am confused, Is there any way I can use the taglibs with 
out using table tag. I already have a table designed, some columns have check 
boxes,some have edit boxes ..etc. I don't want to change the table display. 
Just needed some thing which suports paging with out effecting  existing 
display. Is it possible with these.
May be  am I missing some thing here ??
 

You could use the pager taglib for this.
http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html
Matt
Thanks

Matt Raible <[EMAIL PROTECTED]> wrote:
You're in luck! There's a number of tag libraries to simplify this:
http://displaytag.sf.net
http://valuelist.sf.net
http://jakarta.apache.org/taglibs/sandbox/doc/datagrid-doc/intro.html
Demos: http://raibledesigns.com/page/rd?anchor=there_s_a_new_sorting
Matt
On Mar 10, 2005, at 5:22 PM, M Murali wrote:
 

Does any one know, how the navigation can be done. I just want to have 
a dynamic pages generation depending on number of rows in recordset , 
Pave Prev --- Page Next
Is there any good sample how this can be implemented or any jar files

Thanks
   


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


Re: Page Navigation in Struts

2005-03-10 Thread M Murali
Thank you very much. I am confused, Is there any way I can use the taglibs with 
out using table tag. I already have a table designed, some columns have check 
boxes,some have edit boxes ..etc. I don't want to change the table display. 
Just needed some thing which suports paging with out effecting  existing 
display. Is it possible with these.
May be  am I missing some thing here ??
 
Thanks
 


Matt Raible <[EMAIL PROTECTED]> wrote:
You're in luck! There's a number of tag libraries to simplify this:

http://displaytag.sf.net
http://valuelist.sf.net
http://jakarta.apache.org/taglibs/sandbox/doc/datagrid-doc/intro.html

Demos: http://raibledesigns.com/page/rd?anchor=there_s_a_new_sorting

Matt

On Mar 10, 2005, at 5:22 PM, M Murali wrote:

> Does any one know, how the navigation can be done. I just want to have 
> a dynamic pages generation depending on number of rows in recordset , 
> Pave Prev --- Page Next
> Is there any good sample how this can be implemented or any jar files
>
> Thanks
>
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com 


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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

DataSource........

2005-03-10 Thread K Rajesh
i have one doubt. Connection Pooiling only possible thro' JSTL 

RE: DynaActionForm

2005-03-10 Thread wo_shi_ni_ba_ba
Greg,
thanks for the advise.  However I don't think those
are the causes of the problem.  I tried changing them
and it didn't make a difference.  I still got the
NullPointerException.

--- Greg Pelly <[EMAIL PROTECTED]> wrote:

> I think you have 2 errors in the HTML below
> 
> 1. try changing action="/viewProjects" to
> action="viewProjects" (not sure if
> this is necessary)
> 2. you need to use 
> rather than an 
> 
> --
> 
> 
> 
> --
>  Greg
> 
> -Original Message-
> From:
> [EMAIL PROTECTED]
>
[mailto:[EMAIL PROTECTED]
> 
> Sent: Thursday, March 10, 2005 6:36 PM
> To: user@struts.apache.org
> Subject: DynaActionForm 
> 
> Hi folks,
> I am using a DynaActionForm with an Action.  I have
> the following exception
> when the form is submitted.
> but if I use a regular ActionForm it's ok... what's
> wrong? thanks in advance
> 
> my form-bean: 
>  type="org.apache.struts.action.DynaActionForm">
>type="java.lang.String">
> 
> 
> my action-mapping:
>  type="com.xxx.ViewProjectsAction">
>path="/calc/ProjectManager.jsp"/>
>path="/calc/AssessmentCalc.jsp"/>
>   
> my form:
> 
> 
> 
> 
> SRVE0068E: Could not invoke the service() method on
> servlet action.
> Exception thrown :
> java.lang.NullPointerException
>   at
>
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:852)
>   at
>
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor
> .java:364)
>   at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
>   at
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>   at
>
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
> Code))
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
> Code))
>   at
>
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(C
> ompiled
> Code))
>   at
>
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.
> java(Compiled
> Code))
>   at
>
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
>   at
>
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
>   at
>
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
>   at
>
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compile
> d
> Code))
>   at
>
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compi
> led
> Code))
>   at
>
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht
> tpInboundLink.java(Compiled
> Code))
>   at
>
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht
> tpInboundLink.java(Compiled
> Code))
>   at
>
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLRea
> dCallback.java(Compiled
> Code))
>   at
>
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManage
> r.java(Compiled
> Code))
>   at
>
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java
> (Compiled
> Code))
>   at
>
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java
> (Compiled
> Code))
>   at
>
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.jav
> a(Compiled
> Code))
>   at
>
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled
> Code))
> 
> 
>   
> __
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/ 
> 
>
-
> 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]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: DynaActionForm

2005-03-10 Thread Greg Pelly
I think you have 2 errors in the HTML below

1. try changing action="/viewProjects" to action="viewProjects" (not sure if
this is necessary)
2. you need to use  rather than an 

--

 
--
 Greg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 6:36 PM
To: user@struts.apache.org
Subject: DynaActionForm 

Hi folks,
I am using a DynaActionForm with an Action.  I have the following exception
when the form is submitted.
but if I use a regular ActionForm it's ok... what's wrong? thanks in advance

my form-bean:   




my action-mapping:




my form:

 

SRVE0068E: Could not invoke the service() method on servlet action.
Exception thrown :
java.lang.NullPointerException
at
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:852)
at
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor
.java:364)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(C
ompiled
Code))
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.
java(Compiled
Code))
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compile
d
Code))
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compi
led
Code))
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht
tpInboundLink.java(Compiled
Code))
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht
tpInboundLink.java(Compiled
Code))
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLRea
dCallback.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManage
r.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java
(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java
(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.jav
a(Compiled
Code))
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))



__
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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]



DynaActionForm

2005-03-10 Thread wo_shi_ni_ba_ba
Hi folks,
I am using a DynaActionForm with an Action.  I have
the following exception when the form is submitted.
but if I use a regular ActionForm it's ok... what's
wrong? thanks in advance

my form-bean:   




my action-mapping:




my form:




SRVE0068E: Could not invoke the service() method on
servlet action. Exception thrown :
java.lang.NullPointerException
at
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:852)
at
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled
Code))
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled
Code))
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled
Code))
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled
Code))
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled
Code))
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled
Code))
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



ActionError and message resource

2005-03-10 Thread wo_shi_ni_ba_ba
hi,
I am trying to use .  In my Action
class I added an error with the key login.failure.  My
question is where should I specify the key=value pair.
 I specified it in the default message-resource file.
My struts-config:


but the key was not recognized.  what's wrong?
thanks in advance.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Page Navigation in Struts

2005-03-10 Thread Matt Raible
You're in luck!  There's a number of tag libraries to simplify this:
http://displaytag.sf.net
http://valuelist.sf.net
http://jakarta.apache.org/taglibs/sandbox/doc/datagrid-doc/intro.html
Demos: http://raibledesigns.com/page/rd?anchor=there_s_a_new_sorting
Matt
On Mar 10, 2005, at 5:22 PM, M Murali wrote:
Does any one know, how the navigation can be done. I just want to have 
a dynamic pages generation depending on number of rows in recordset , 
Pave Prev --- Page Next
Is there any good sample how this can be implemented or any jar files

Thanks
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

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


Page Navigation in Struts

2005-03-10 Thread M Murali
Does any one know, how the navigation can be done. I just want to have a 
dynamic pages generation depending on number of rows in recordset , Pave Prev 
--- Page Next
Is there any good sample how this can be implemented or any jar files 
 
Thanks
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: user management

2005-03-10 Thread Erik Weber

wo_shi_ni_ba_ba wrote:
do struts developers usually store user as an object
in session?
Yes, that is typical.
or does struts have additional framework
for handling user management.
 

No. But there is container managed security, which has its own concept 
of a "user" (typically represented by a java.security.Principal). Also, 
there are third party security libraries that may have their own concept 
of a user. So the answer to the question is somewhat related to your 
security implementation.

Erik

thanks in advance
		
__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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]


Deploy Issues on WebApp hosting site.

2005-03-10 Thread kjc
After having deployed my struts/tiles web application on a Struts/Tiles 
hosting site,
I now find that the CSS style sheet for the application can't be found. 
All elements are layed out in a linear fashion, without so much as a 
hint of any posinitioning. Also, when I click on a link to a struts 
action, Tomcat is telling me that it can't find resource /someMethod.do

Any help is greatly appreciated.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


user management

2005-03-10 Thread wo_shi_ni_ba_ba
do struts developers usually store user as an object
in session? or does struts have additional framework
for handling user management.
thanks in advance



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: session and request scope

2005-03-10 Thread wo_shi_ni_ba_ba
thank you all for the elaborate explaination!

--- Günther Wieser <[EMAIL PROTECTED]> wrote:
> as long as you don't have a clustered environment or
> session persistence
> enabled in your servlet container, there shouldn't
> be much difference in
> adding an object to a session or request.
> 
> but it doesn't make sense to put it in session scope
> if you don't use it is
> session scope, but only in request scope. this could
> make your life harder
> than you want it to be (e.g. if you forget to delete
> such objects).
> 
> this leads to one issue for session scope: if you
> store things in session,
> you HAVE TO REMOVE them as soon as you don't need
> them anymore, otherwise
> you can run out of memory because these objects
> won't be garbage collected.
> and usually it's very hard to make sure that your
> web app DEFINITELY reaches
> the point of deleting things from a session (think
> about a user just
> pressing back or going to a different page before
> hitting your "remove"
> page). of course, everything will be dumped when the
> session expires, but if
> you have a lot of users in your web app and they
> stay for a long time, the
> memory consuption can become significant if you have
> a lot of session
> objects.
> 
> kr,
> guenther
> 
> -Original Message-
> From: wo_shi_ni_ba_ba
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 10, 2005 10:52 PM
> To: user@struts.apache.org
> Subject: session and request scope
> 
> In terms of performance, does storing an attribute
> into the session cost
> more than storing it into the request? how
> significant is the overhead?
> 
> 
>   
> __
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/ 
> 
>
-
> 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]
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: session and request scope

2005-03-10 Thread Günther Wieser
as long as you don't have a clustered environment or session persistence
enabled in your servlet container, there shouldn't be much difference in
adding an object to a session or request.

but it doesn't make sense to put it in session scope if you don't use it is
session scope, but only in request scope. this could make your life harder
than you want it to be (e.g. if you forget to delete such objects).

this leads to one issue for session scope: if you store things in session,
you HAVE TO REMOVE them as soon as you don't need them anymore, otherwise
you can run out of memory because these objects won't be garbage collected.
and usually it's very hard to make sure that your web app DEFINITELY reaches
the point of deleting things from a session (think about a user just
pressing back or going to a different page before hitting your "remove"
page). of course, everything will be dumped when the session expires, but if
you have a lot of users in your web app and they stay for a long time, the
memory consuption can become significant if you have a lot of session
objects.

kr,
guenther

-Original Message-
From: wo_shi_ni_ba_ba [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 10:52 PM
To: user@struts.apache.org
Subject: session and request scope

In terms of performance, does storing an attribute into the session cost
more than storing it into the request? how significant is the overhead?



__
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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]



Re: session and request scope

2005-03-10 Thread Erik Weber
No, it's all memory. But, you have to remember that session attributes 
stay in memory for the life of the session (which typically spans many 
requests and perhaps all day long), whereas request attributes stay in 
memory for the life of the request. In other words, requests don't 
really require "cleanup", but sessions might.

Lookup performance is the same; they are hash-based.
Use request scope for items that are only needed to service the current 
request. Use session scope for items that are needed to service a 
particular user during the span of multiple requests. Use application 
scope for items that are needed to service any user at any given time 
(closest scope to being truly "static").

Erik
wo_shi_ni_ba_ba wrote:
In terms of performance, does storing an attribute
into the session cost more than storing it into the
request? how significant is the overhead?
		
__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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]


Re: getting init-params from web.xml

2005-03-10 Thread Matt Raible
servlet.getServletContext() should work.
Matt
On Mar 10, 2005, at 2:44 PM, Omar Didi wrote:
is there a way to either get  or  from 
web.xml inside an Action class.
i know within a jsp or servlet i can use 
getServletContext().getInitParameter("com.index"). this method doesn t 
work inside an Action class.
thanks.

-
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]


session and request scope

2005-03-10 Thread wo_shi_ni_ba_ba
In terms of performance, does storing an attribute
into the session cost more than storing it into the
request? how significant is the overhead?



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



showing alert message

2005-03-10 Thread Srilatha Salla
Hi,
 
I have a list which I am iterating and displaying data in each row.
I have check box for each row.
For the value of check box I am sending the objectID for each row.
I have 2 buttons delete, update.
When these buttons are clicked, I need to send ids.
I neew ids only and not status in the action class. With the existing code I 
can get Id's from the request.(request, "selectedSets").
When the delete button is clicked I need to check the status(if "inprocess" ) 
of the object in each row and
show alert if any of the checked rows had staus as "inproces". how do i do this?
 

  
   
  



  
I have code here which gets name, id and status of the object on each row.


 

===
function makeAllSelection(form, isChecked) {
  var checkboxes = form.allrows;
  for (i = 0; i < checkboxes.length; i++) {
checkboxes[i].checked = isChecked;
  }
}
function performActiob(action1) {
  alert(operation);
document.UpdateForm.operation.value=action1;
document.UpdateForm.submit();
  }
 
 
Thanks

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

getting init-params from web.xml

2005-03-10 Thread Omar Didi
is there a way to either get  or  from web.xml 
inside an Action class.
i know within a jsp or servlet i can use 
getServletContext().getInitParameter("com.index"). this method doesn t work 
inside an Action class.
thanks.

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



RE: [OT] CSS site/forum ?

2005-03-10 Thread Scott Piker
Thanks for the link & the offer, Leon.  I was actually able to fix our issues 
once I realized that the root of problem was an apparently-well-know flaw in 
IE.  

In case anyone is interested, the flaw is that IE auto-adjusts box elements if 
contents of the box are wider than it's defined size (Firefox and most other 
browsers don't do this).  We were unknowingly taking advantage of this behavior 
in our menus.  So the fix for us was basically to be a bit more explicit in how 
the menu elements were defined.  Not a big deal - we just didn't know what to 
look for.  

- Scott

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 3:18 PM
To: 'Struts Users Mailing List'
Subject: Re: [OT] CSS site/forum ?

Another recommendation:

http://www.csszengarden.com/

> Our biggest issue right now is that the ultra-cool dropdown menus we 
> developed a while ago look great in IE, but are practically unusable 
> in Firefox.

Send me the code or an example i will pass it to our web designer.

> (Some days, you almost wish Firefox never got so popular and you only 
> had to worry about IE.  Heresy!)

Not really, since you have to worry about explorer 5.0, 5.5, 6.0, 6.0 SP2 and, 
end of the year, 7.0 Not to mention netscape, firefox, safari, konqueror and 
opera. 

Regards
Leon

> -Ursprüngliche Nachricht-
> Von: Scott Piker [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 10. März 2005 19:18
> An: user@struts.apache.org
> Betreff: [OT] CSS site/forum ?
> 
> Hey all,
> 
> Sorry for the OT post, but I know a number of folks here are quite 
> skilled with CSS.  We're having some really annoying cross-browser CSS 
> formatting issues and I was wondering if someone could direct me to a 
> good site/forum where I could find common compatibility issues between 
> IE and other browsers (Firefox, especially).
> 
> 
> (Some days, you almost wish Firefox never got so popular and you only 
> had to worry about IE.  Heresy!)
> 
> Thanks in advance,
> - Scott
> 
> 



-
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]



Re: tiles:insert JSP from database

2005-03-10 Thread Richard Cox
Ok, Now I believe. I traced to code back to the Java Core and it will
only take a file :(

But I am going to try using a controller to dump the file from the
database into a directory before it is "inserted" as a way around
this.

The reason for all of this is that we provide a web application for
our customers and customize it to look like their website for uniform
user experience. (Actually now that I say that it sounds like phishing
- but it's not) And we have a template for each customer (over 400 and
growing now).

Anyway the legacy system is freemarker ontop of plain ol servlets. We
are now moving to struts and tiles and I would like to have everything
uniform - their templates in JSP just like ours, but without having to
maintain hundreds of files in a file system.

It just may not be practicle like Joe said. 

Sure wish Sun had a hook for that. It wouldn't be that hard to have a
FileStream instead of a string to a file they are going to open now
would it? :)

-R


On Thu, 10 Mar 2005 10:04:54 -0800, Richard Cox <[EMAIL PROTECTED]> wrote:
> Thanks, I'll look at Velocity. I also know that I can achieve what I
> want using Freemarker, but really this doesn't seem like much of a
> stretch for Tiles.
> 
> The  tag already puts together seveal pieces of JSP code
> before the servlet is generated by reading from a file. All I really
> want to do is hand it a filestream that pulls information out of a
> database instead of a filesystem.
> 
> I guess I'll take a quick look at the code for the insert tag.
> 
> 
> -R
> 
> 
> On Thu, 10 Mar 2005 04:18:19 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> > Remember that ultimately, a JSP is a servlet, albeit one which is
> > automatically created and compiled by transforming JSP syntax into
> > Java.
> >
> > You would need to intervene in this sophisticated and low-level
> > process in order to store JSP code in a database and still have it
> > work.  It's probably possible in theory, but likely far, far from
> > practical.
> >
> > Velocity is probably better suited to your use case; it can do all of
> > the basic things that JSP can do, and it is possible to use a variety
> > of "resource loaders" to get templates and template fragments; it
> > comes with loaders which read from the file system and from the
> > classpath; there may already even be one which gets templates from a
> > database.
> >
> > http://jakarta.apache.org/velocity
> >
> > Joe
> >
> > At 1:21 AM -0800 3/10/05, Richard Cox wrote:
> > >Hi All,
> > >
> > >I am just coming up to speed on tiles and I have searched the archive
> > >and not found the answer to this one.
> > >
> > >I want to import JSP "files" into my layout which are stored in a
> > >database. The key issue is that there are JSP tags in the "file"
> > >stored in the database that need to be evaluated as part of the page.
> > >
> > >I think a controller won't work because it returns information after
> > >the JSP has been evaluated and the string in the database will contain
> > >struts and JSTL tags which will get skipped.
> > >
> > >I think it is possible to get this effect from by extending the
> > >DefinitionFactory class, but I am not sure.
> > >
> > >The other thought that I had was to get the source and extend the
> > > tag so that instead of reading from a file, it reads
> > >from the database. But that seems like overkill.
> > >
> > >Tiles looks great, and I think it can do 100% of what I need, but
> > >right now I am missing the last  5% with this issue.
> > >
> > >Any thoughts or help is very much appreciated.
> > >
> > >-R
> > >
> > >[EMAIL PROTECTED]
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > --
> > Joe Germuska
> > [EMAIL PROTECTED]
> > http://blog.germuska.com
> > "Narrow minds are weapons made for mass destruction"  -The Ex
> >
>

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



Re: What Book??

2005-03-10 Thread Alex Kravets
If you are talking about 'Struts: The Complete Reference' then I vote 
for that one, reall straight forward and easy to read.

Ted Husted wrote:
For newbies, I like Struts for Dummies. :)
(Really, I do!)
Struts Cookbook (ORA) is quite good for the pragmatic programmer ready
to fine tune a basic application. Struts Recipes (Manning) is good for
more advanced topics. The cool part is that neither of these "source
books" overlap much. You can buy them both and walk away with good
value.
-Ted.
 

On Mon, 7 Mar 2005 18:10:47 +0100, Gaet <[EMAIL PROTECTED]> wrote:
   

Hello,
I'm hesitating between two struts books, does someone can tell me what is the 
best between :
   -Struts Cookbook (just released)
   -Struts Reference
TIA
 

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



Re: What Book??

2005-03-10 Thread Ted Husted
For newbies, I like Struts for Dummies. :)
 
(Really, I do!)
 
Struts Cookbook (ORA) is quite good for the pragmatic programmer ready
to fine tune a basic application. Struts Recipes (Manning) is good for
more advanced topics. The cool part is that neither of these "source
books" overlap much. You can buy them both and walk away with good
value.
 
-Ted.
 
> On Mon, 7 Mar 2005 18:10:47 +0100, Gaet <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I'm hesitating between two struts books, does someone can tell me what is 
> > the best between :
> > -Struts Cookbook (just released)
> > -Struts Reference
> >
> > TIA

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



Of Struts and Tiles and Portals

2005-03-10 Thread Wendy Smoak
My next project looks like it will be a portal-type app to display
information about our operation.  Different people will be allowed to see or
will choose different things, based on what they do within the organization.

So I asked Google about Struts and Tiles and Portal, and, well, didn't find
much.  Is Cedric's page dated 2002 still current enough to work from?
http://www.lifl.fr/~dumoulin/tiles/

Any suggestions on how to get started with this, or does anyone possibly
have an example to share?

-- 
Wendy Smoak


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



Re: struts version and difference between 1.1 and 1.2

2005-03-10 Thread Hubert Rabago
On Thu, 10 Mar 2005 13:46:09 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]>
> 
> > this might be a silly question, but how do I find out
> > what version of struts I am using.
> 
> Look inside struts.jar at the META-INF/manifest.mf file.
> 
> > 2.what are the significant changes from 1.1 to 1.2.
> > Can someone point me the the source or give me a
> > description?
> 
> This might help:
> http://wiki.apache.org/struts/StrutsUpgradeNotes11to124
> 
> --
> Wendy Smoak
> 

You can also check out these pages:
http://struts.apache.org/userGuide/release-notes-1.2.4.html (changes
between 1.1 and 1.2.4)
http://struts.apache.org/userGuide/release-notes.html (changes between
1.2.4 and 1.2.6)

Hubert

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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Brandon Goodin
So, what is your favorite ide?

I love these debates. 

Some of you guys have some really wacky ideas and to be honest it's
entertaining.

It's a crazy world out their and i'm glad i have all you nutcases to
share it with.

To be honest there are three persistence solutions that I would
currently use out their (in general order of importance)

1) IBatis - cuz databases live longer than applications
2) JDBC- cuz databases live longer than applications
3) Hibernate -- cuz some databases are intrinsicly tied to the
lifespan of the app and i have this perverse side that like
unnecessary complexity.

Thanks for making life interesting,
Brandon



On Thu, 10 Mar 2005 15:19:31 -0500, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Nils Liebelt wrote the following on 3/10/2005 3:10 PM:
> 
> > - You make up your model. I use UML.
> > - Look for a case tool where you can generate some code. Poseidon is
> > great.
> > - Put in the your xdoclet tags for the mapping.
> > - Put in your xdoclet tags for the form beans.
> > - May be write a couple conversion classes from form beans to
> > businessobjects and from businessobjects to DB.
> > - Write an Interface for Querying your objects the way you need them.
> >
> > That's it. Straight forward! 28 tables and not a single line of SQL. But it
> > is not about SQL.
> 
> Did you get to create the tables after you made up Model? That's a big
> difference than a huge majority of cases where you don't have that
> luxury of starting from scratch on the DB design. And that big
> difference makes a difference in how easy it is to use you a strict
> object only approach. You can brag about no SQL, but show me that same
> bragging of 'ease' where you have to work on a project where you can't
> start from scratch on the DB model.
> 
> --
> Rick
> 
> -
> 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]



RE: Struts DB Access :: Best Practices

2005-03-10 Thread Nils Liebelt
That's right. It's quiet a luxury not to deal with legacy shit... 
But even if. As long as the guy/gal who made up the DB is not fully
incompetent. 


GreetZ

Nils

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 10:20 PM
To: Struts Users Mailing List
Subject: Re: Struts DB Access :: Best Practices

Nils Liebelt wrote the following on 3/10/2005 3:10 PM:

> - You make up your model. I use UML.  
> - Look for a case tool where you can generate some code. Poseidon is
> great.
> - Put in the your xdoclet tags for the mapping. 
> - Put in your xdoclet tags for the form beans.
> - May be write a couple conversion classes from form beans to
> businessobjects and from businessobjects to DB.
> - Write an Interface for Querying your objects the way you need them. 
> 
> That's it. Straight forward! 28 tables and not a single line of SQL. But
it
> is not about SQL.

Did you get to create the tables after you made up Model? That's a big 
difference than a huge majority of cases where you don't have that 
luxury of starting from scratch on the DB design. And that big 
difference makes a difference in how easy it is to use you a strict 
object only approach. You can brag about no SQL, but show me that same 
bragging of 'ease' where you have to work on a project where you can't 
start from scratch on the DB model.

-- 
Rick

-
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]



RE: Struts DB Access :: Best Practices

2005-03-10 Thread Nils Liebelt
That's right. It's quiet a luxury not to deal with legacy shit... 
But even if. As long as the guy/gal who made up the DB is not fully
incompetent. 


GreetZ

Nils

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 10:20 PM
To: Struts Users Mailing List
Subject: Re: Struts DB Access :: Best Practices

Nils Liebelt wrote the following on 3/10/2005 3:10 PM:

> - You make up your model. I use UML.  
> - Look for a case tool where you can generate some code. Poseidon is
> great.
> - Put in the your xdoclet tags for the mapping. 
> - Put in your xdoclet tags for the form beans.
> - May be write a couple conversion classes from form beans to
> businessobjects and from businessobjects to DB.
> - Write an Interface for Querying your objects the way you need them. 
> 
> That's it. Straight forward! 28 tables and not a single line of SQL. But
it
> is not about SQL.

Did you get to create the tables after you made up Model? That's a big 
difference than a huge majority of cases where you don't have that 
luxury of starting from scratch on the DB design. And that big 
difference makes a difference in how easy it is to use you a strict 
object only approach. You can brag about no SQL, but show me that same 
bragging of 'ease' where you have to work on a project where you can't 
start from scratch on the DB model.

-- 
Rick

-
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]



Re: struts version and difference between 1.1 and 1.2

2005-03-10 Thread Wendy Smoak
From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]>

> this might be a silly question, but how do I find out
> what version of struts I am using. 

Look inside struts.jar at the META-INF/manifest.mf file. 

> 2.what are the significant changes from 1.1 to 1.2. 
> Can someone point me the the source or give me a
> description?

This might help:
http://wiki.apache.org/struts/StrutsUpgradeNotes11to124

-- 
Wendy Smoak

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



Re: struts version and difference between 1.1 and 1.2

2005-03-10 Thread Richard Bywater
With Rational Application Developer, it's version 1.1 so I'm assuming
it would be the same for Web Developer.

Richard.

On Thu, 10 Mar 2005 11:25:50 -0800 (PST), wo_shi_ni_ba_ba
<[EMAIL PROTECTED]> wrote:
> hi folks,
> Two questions:
> 1.
> this might be a silly question, but how do I find out
> what version of struts I am using. It came bundled
> with my websphere v6 rational web developer. how do I
> find out the version number for struts?
> I took note of struts-html.tld
>  Inc.//DTD JSP Tag Library 1.1//EN"
> "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";>
> but that refers to the jsp tag library version 1.1.
> 
> 2.what are the significant changes from 1.1 to 1.2.
> Can someone point me the the source or give me a
> description?
> thank you so much!
> 
> __
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
> 
> -
> 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]



Re: validation issue

2005-03-10 Thread Sivakumar Santharam
Hi
If you define validate=false in the struts config file then your form will not 
be validated when you click either PREV or NEXT buttons. Then if you want to 
validate on clicking the NEXT button, you can validate the form by explicitely 
calling the validate method like 
ActionErrors errors= form.validate(mapping,request);
in your Action where you have the logic for the NEXT button.
This works for me.
Siva




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



Re: [OT] CSS site/forum ?

2005-03-10 Thread Leon Rosenberg
Another recommendation:

http://www.csszengarden.com/

> Our biggest issue right now is that the ultra-cool dropdown 
> menus we developed a while ago look great in IE, but are 
> practically unusable in Firefox.

Send me the code or an example i will pass it to our web designer.

> (Some days, you almost wish Firefox never got so popular and 
> you only had to worry about IE.  Heresy!)

Not really, since you have to worry about explorer 5.0, 5.5, 6.0, 6.0 SP2
and, end of the year, 7.0
Not to mention netscape, firefox, safari, konqueror and opera. 

Regards
Leon

> -Ursprüngliche Nachricht-
> Von: Scott Piker [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 10. März 2005 19:18
> An: user@struts.apache.org
> Betreff: [OT] CSS site/forum ?
> 
> Hey all,
> 
> Sorry for the OT post, but I know a number of folks here are 
> quite skilled with CSS.  We're having some really annoying 
> cross-browser CSS formatting issues and I was wondering if 
> someone could direct me to a good site/forum where I could 
> find common compatibility issues between IE and other 
> browsers (Firefox, especially).  
> 
> 
> (Some days, you almost wish Firefox never got so popular and 
> you only had to worry about IE.  Heresy!)
> 
> Thanks in advance,
> - Scott
> 
> 



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



Re: [OT] CSS site/forum ?

2005-03-10 Thread Leon Rosenberg
Another recommendation:

http://www.csszengarden.com/

> Our biggest issue right now is that the ultra-cool dropdown 
> menus we developed a while ago look great in IE, but are 
> practically unusable in Firefox.

Send me the code or an example i will pass it to our web designer.

> (Some days, you almost wish Firefox never got so popular and 
> you only had to worry about IE.  Heresy!)

Not really, since you have to worry about explorer 5.0, 5.5, 6.0, 6.0 SP2
and, end of the year, 7.0
Not to mention netscape, firefox, safari, konqueror and opera. 

Regards
Leon

> -Ursprüngliche Nachricht-
> Von: Scott Piker [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 10. März 2005 19:18
> An: user@struts.apache.org
> Betreff: [OT] CSS site/forum ?
> 
> Hey all,
> 
> Sorry for the OT post, but I know a number of folks here are 
> quite skilled with CSS.  We're having some really annoying 
> cross-browser CSS formatting issues and I was wondering if 
> someone could direct me to a good site/forum where I could 
> find common compatibility issues between IE and other 
> browsers (Firefox, especially).  
> 
> 
> (Some days, you almost wish Firefox never got so popular and 
> you only had to worry about IE.  Heresy!)
> 
> Thanks in advance,
> - Scott
> 
> 



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



RE: nested tags

2005-03-10 Thread wo_shi_ni_ba_ba
So basically there is no way that I can construct a
struts tag(or jsp tag in general) on the fly and
render it fully?

thanks



--- "Fogleson, Allen" <[EMAIL PROTECTED]>
wrote:
> Nope, 
> 
> Part of the problem here is that the struts tag
>  is
> rendered as 
> 
> The other part is that you would have to write some
> kind of preprocessor
> for the page that basically acts as a web container
> to process your
> tags, then pass the preprocessed page to the jsp
> compiler. 
> 
> Its not "un-doable" but it is not very practical.
> 
> Al
> 
> 
> -Original Message-
> From: wo_shi_ni_ba_ba
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 10, 2005 12:43 PM
> To: user@struts.apache.org
> Subject: nested tags
> 
> I want to have tags like the following:
>  property=""/>
> 
> My goal is to pass in attribute whose value can be
> used again to construt struts tags dynamically.  Is
> this doable? for example, passing in the right
> struts
> html tag and concatenate it with other struts tags
> to
> form a new struts tag.
> 
> but when it's rendered it comes out like
>  
> any alternative to achieve my goal?
> thanks
> 
> 
> 
>   
> __ 
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/ 
> 
>
-
> 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]
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Rick Reumann
Nils Liebelt wrote the following on 3/10/2005 3:10 PM:
-	You make up your model. I use UML.  
-	Look for a case tool where you can generate some code. Poseidon is
great.
-	Put in the your xdoclet tags for the mapping. 
-	Put in your xdoclet tags for the form beans.
-	May be write a couple conversion classes from form beans to
businessobjects and from businessobjects to DB.
-	Write an Interface for Querying your objects the way you need them. 

That's it. Straight forward! 28 tables and not a single line of SQL. But it
is not about SQL.
Did you get to create the tables after you made up Model? That's a big 
difference than a huge majority of cases where you don't have that 
luxury of starting from scratch on the DB design. And that big 
difference makes a difference in how easy it is to use you a strict 
object only approach. You can brag about no SQL, but show me that same 
bragging of 'ease' where you have to work on a project where you can't 
start from scratch on the DB model.

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


Re: Prepopulating Form elements in ActionForms

2005-03-10 Thread Wendy Smoak
From: "Greg Pelly" <[EMAIL PROTECTED]>

> I am having trouble with the ActionForm reset() method. I am using the
> method to handle prepopulating form values.

The reset method gets called every time the form is populated from the
request params.  You typically only want to prepopulate a form once, just
before it is displayed for the first time.

Pre-population is usually done from the Action, not within the form itself.

It *is* necessary to set all checkboxes to false in reset, but that's not
prepopulating them, that's clearing them out so the framework can set them
properly from the contents of the request.

-- 
Wendy Smoak


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



Re: nested tags

2005-03-10 Thread wo_shi_ni_ba_ba
I am using it in a tile,  it's mainly for reusability
and efficiency.  I created a jsp template that takes
some tile parameters and fill them in and tries to
create form elements on the fly.  But i guess it wont'
work


--- Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]>
> 
> > I want to have tags like the following:
> >  property=""/>
> 
> That's a new one...
> 
> When you're writing a JSP, in what situation would
> you NOT know what kind of
> form element you want to display for a particular
> form property?
> 
> -- 
> Wendy Smoak
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: Struts DB Access :: Best Practices

2005-03-10 Thread Nils Liebelt
Hi all,

Here's is a comment from a first time OJB user. I had to do a web project
with a quiet large entity relationship model. Many 1toN and MtoN relations.
So what do you do?! 

-   You make up your model. I use UML.  
-   Look for a case tool where you can generate some code. Poseidon is
great.
-   Put in the your xdoclet tags for the mapping. 
-   Put in your xdoclet tags for the form beans.
-   May be write a couple conversion classes from form beans to
businessobjects and from businessobjects to DB.
-   Write an Interface for Querying your objects the way you need them. 

That's it. Straight forward! 28 tables and not a single line of SQL. But it
is not about SQL.
I love this approach so much, because you just maintain one set of classes
and manage everything through the xdoclet attributes. When I think of the
system now I stay fully in my model. No more and then I have to insert that
FK there... In fact if we had more stable computer I would write the
PersistenceBrokerEmpty implementation ;-)

Maybe it isn't the most efficient way to materialize an object with its
relations or just a complete row if you only need a single entry. But why
not next time it's gonna be in cache, who the hell cares in times of cheap
memory. This is next millennium?! 

If you think in an OO way and if need a relational DB in the back you don't
get around O/R mapping. 


GreetZ

Nils


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



RE: Struts DB Access :: Best Practices

2005-03-10 Thread Nils Liebelt
Hi all,

Here's is a comment from a first time OJB user. I had to do a web project
with a quiet large entity relationship model. Many 1toN and MtoN relations.
So what do you do?! 

-   You make up your model. I use UML.  
-   Look for a case tool where you can generate some code. Poseidon is
great.
-   Put in the your xdoclet tags for the mapping. 
-   Put in your xdoclet tags for the form beans.
-   May be write a couple conversion classes from form beans to
businessobjects and from businessobjects to DB.
-   Write an Interface for Querying your objects the way you need them. 

That's it. Straight forward! 28 tables and not a single line of SQL. But it
is not about SQL.
I love this approach so much, because you just maintain one set of classes
and manage everything through the xdoclet attributes. When I think of the
system now I stay fully in my model. No more and then I have to insert that
FK there... In fact if we had more stable computer I would write the
PersistenceBrokerEmpty implementation ;-)

Maybe it isn't the most efficient way to materialize an object with its
relations or just a complete row if you only need a single entry. But why
not next time it's gonna be in cache, who the hell cares in times of cheap
memory. This is next millennium?! 

If you think in an OO way and if need a relational DB in the back you don't
get around O/R mapping. 


GreetZ

Nils


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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Scott Lamb
On 10 Mar 2005, at 13:48, NetSQL wrote:
Ex#2: you can create a cursor to give everyone in NYC a raise, and go 
by  row by row. Or you can do a set operation in one command. I 
allways avoid row by row, and allways try to go for set, as per 
direction by Celko and others. Your millage may vary.
Okay, now I see what you are saying. Yes, a bulk UPDATE is certainly 
faster (and easier) than fetching a ResultSet and firing UPDATEs on 
each row. That's just a matter of using SQL properly.

But this isn't the situation I was talking about. There are times it is 
legitimately necessary to get a large ResultSet in one gulp and pass it 
on to the client. This is what I was talking about; I don't want to 
keep the whole thing in memory.

--
Scott Lamb 


PGP.sig
Description: This is a digitally signed message part


Re: nested tags

2005-03-10 Thread Wendy Smoak
From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]>

> I want to have tags like the following:
>  property=""/>

That's a new one...

When you're writing a JSP, in what situation would you NOT know what kind of
form element you want to display for a particular form property?

-- 
Wendy Smoak


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



Prepopulating Form elements in ActionForms

2005-03-10 Thread Greg Pelly
I am having trouble with the ActionForm reset() method. I am using the
method to handle prepopulating form values.  My Struts app uses the Struts
Validator's DynaValidatorForm (which extends ActionForm via the
DynaActionForm class).  I am attempting the following behavior in a class I
call "BaseActionForm":

1. Prepopulate form values in the reset() method of BaseActionForm.
2. When the JSP is submitted, if no value has been populated for a variable
named "ptn" (and if other criteria are true), return to the original JSP
(via an action-mapping) and display an error message, plus show the form
inputs the user entered (not the prepopulated defaults).

The problem I run into is that the reset() method seems to be populating my
DynaValidatorForm before the page is loaded and after as well.  

I want the reset() method called beforehand - this prepopulates my form
values.  However, when DynaValidatorForm.reset() is called after the form is
submitted, it is "re"-prepopulating the submitted form with defaults, the
result being that if the user erases a prepopulated value, the ActionForm
repopulates it with the default.  In other words, a value of "foo" was
prepopulated, the user erases that value and submits, the form prepopulates
it again with "foo" (bad!) and passes control to the action.

I also want to make sure that if the form elements have been incorrectly
populated, when the form returns to the JSP, it has not clobbered the
user-supplied (albeit incorrect) empty form values.

I have tried adding a check in the ActionForm (if super.get("ptn") is ""),
but it seems that this check always returns true from within the
ActionForm's reset() method.  It appears that the ActionServlet populates
the form after it calls reset().

I have done the usual web searches but have not found any good resource that
explains the proper way to use reset() or handle form prepopulation using
Struts.  I am aware that the reset() method is primarily intended for
checkbox prepopulation (only), but I do not know of a better way to handle
the above issue.  I used this approach because it was recommended in
Apress's Pro Jakarta Struts.

Can anyone provide advice or point me to some code examples/resources
(preferably using the DynaValidatorForm subclass of ActionForm, which
retrieves form element values using super.get(), as shown above)?

Thanks,
Greg

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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread NetSQL
Scott Lamb wrote:
NetSQL wrote:
(RowSet is realy a ArrayList of
HashMaps. Rows of Columns)

What does a ArrayList of HashMaps get you over a java.sql.ResultSet? 

Collections are lighter and easier to SoA.

I look at it like this:
-SQL is a Set oriented lang.(row by row processing is exponentialy 
slower)

This is totally wrong

Maybe you think that. I think I am right.

- Putting all the data into another container _is_ row-by-row 
processing. You're always doing row-by-row processing, even just to 
fetch it from the database server. 

Maybe you think that. JDBC drivers do not stream rows; it sends it after 
"Select" processing, joins, ordering, etc has been done. So if you do 
order by, and your table has millions of rows, 1st the SQL engine sorts 
and then it starts sending the millions of rows. DBCacnel... just 
stops the stream.

Ex#2: you can create a cursor to give everyone in NYC a raise, and go by 
 row by row. Or you can do a set operation in one command. I allways 
avoid row by row, and allways try to go for set, as per direction by 
Celko and others. Your millage may vary.

When I need to display chunks of data I do limit/offset SQL side, not 
Java side. In Java, I let iBatis cache it for me w/o any code on my part.

hth,
.V

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


Re: Struts DB Access :: Best Practices

2005-03-10 Thread Scott Lamb
On 10 Mar 2005, at 11:55, Scott Lamb wrote:
 - consistent dynamic sql (from what I see, there are different ways
for altering the order and the where clauses..are there others?)
There's also the , which is similar to your iterator.
Ahh, lost a later draft with more here.
There's no general-purpose lexical bind (like Oracle Forms & Reports' 
&foo). I also don't have a way of quoting SQL identifiers, as I haven't 
found the need. I sometimes execute queries like this:

declare
cursor grants is
selectgrantee, granted_role
from  dba_role_privs
where granted_role in ('FOO', 'BAR');
begin
for grant in grants loop
execute immediate 'revoke ' || 
quote_identifier(grant.granted_role)
  || ' from ' || quote_identifier(grantee);
end loop;
end;
/
show errors

but those are infrequent admin tasks, and I'm happy just typing that 
block into SQL*Plus. I don't know why you'd do that from a web app.

This is another case where I try to avoid implementing the feature 
before I see what needs it. I waited on lexical binds and added instead 
bind lists, conditionals, and dynamic order by clauses when each 
presented its need. They've all been much better for the task than 
lexical binds would be, and there might be some more left of that 
nature.

--
Scott Lamb 


PGP.sig
Description: This is a digitally signed message part


RE: nested tags

2005-03-10 Thread Fogleson, Allen
Nope, 

Part of the problem here is that the struts tag  is
rendered as 

The other part is that you would have to write some kind of preprocessor
for the page that basically acts as a web container to process your
tags, then pass the preprocessed page to the jsp compiler. 

Its not "un-doable" but it is not very practical.

Al


-Original Message-
From: wo_shi_ni_ba_ba [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 12:43 PM
To: user@struts.apache.org
Subject: nested tags

I want to have tags like the following:
 property=""/>

My goal is to pass in attribute whose value can be
used again to construt struts tags dynamically.  Is
this doable? for example, passing in the right struts
html tag and concatenate it with other struts tags to
form a new struts tag.

but when it's rendered it comes out like
 
any alternative to achieve my goal?
thanks




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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]



struts version and difference between 1.1 and 1.2

2005-03-10 Thread wo_shi_ni_ba_ba
hi folks,
Two questions:
1.
this might be a silly question, but how do I find out
what version of struts I am using. It came bundled
with my websphere v6 rational web developer. how do I
find out the version number for struts?
I took note of struts-html.tld
http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";>
but that refers to the jsp tag library version 1.1.

2.what are the significant changes from 1.1 to 1.2. 
Can someone point me the the source or give me a
description?
thank you so much!



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: User Delegation with struts

2005-03-10 Thread Jesse Clark
The SecurtiyFilter package 
(http://sourceforge.net/projects/securityfilter/) uses a servlet filter 
and allows you to still use the request.isUserInRole stuff as well. I'm 
not familiar with Acegi so I'm not sure how the two stack up against 
each other feature-wise, but I was able to get  a working Authentication 
scheme with custom defined roles up and running fairly quickly with 
ServletFilter.

-Jesse
Matt Raible wrote:
I would use the aforementioned suggestion and use a Filter with a  
RequestWrapper to mimic the request.isUserInRole stuff - then you can  
use the "role" attribute in your action-mappings, your tiles  
definitions, and with .

This is what Acegi Security does:
http://cvs.sourceforge.net/viewcvs.py/acegisecurity/acegisecurity/core/ 
src/main/java/net/sf/acegisecurity/wrapper/

Matt
On Mar 10, 2005, at 11:09 AM, Betty Koon wrote:
Matt,
Thanks for the info.  We already have our own Authentication  
mechanism.  I
am just thinking about how is it to make use of current role  
information to
determine what get shown on the UI.  Does that mean I have to write  
custom
tag lib to deal with this.

For isUserInRole, does this only comes in handy for forwarding to an  
Action.
It can't really control what gets shown on the screen right?

-Betty
-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 9:55 AM
To: Struts Users Mailing List
Subject: Re: User Delegation with struts
You could look at using the Acegi Security Framework.  I've used it to
replace J2EE container authentication in AppFuse - and didn't have to
change any code.  Works with request.isUserInRole and all that + it
allows you more fine grained control on the internals.
http://acegisecurity.sourceforge.net
Unfortunately, it's got a bit of a learning curve - but most good
open-source software does. ;-)
Matt
On Mar 10, 2005, at 10:49 AM, Betty Koon wrote:
Hi all,
Anyone has any good strategy or pointers for doing
user/role delegation with struts.  We are not using
J2EE container authentication.  We will have our own
role model.  I will like more fine grain control on
turning on and off visual elements with different
role
information.  Thanks.
-Betty



-
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]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts DB Access :: Best Practices

2005-03-10 Thread Frank W. Zammetti
I've actually handled this in a previous project by writing a class that
implements the ResultSet interface (well, *some* of it anyway). 
Internally the data gets stored as an ArrayList of HashMaps, so it's
completely disconnected, and it's a drop-in replacement any place we would
have used a ResultSet.

As someone else said, memory utilization is the down-side to this
approach, but if you have suitable hardware and know your resultset size
won't kill you, this a great approach.

We have actually found though that using it doesn't kill us memory-wise,
and we do sometimes have some resultsets come back that I would consider
large... but more importantly the application is considerably more
efficient and responsive than using regular ResultSets precisely because
connections and statements and such aren't being held open, so no waiting
for a connection from the pool as much, etc.

Hopefully we're going to start using a REAL persistance package around
here soon (I'm doing some evaluation now), but until that day, we've found
this to be an excellent solution in many situations.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, March 10, 2005 2:03 pm, Larry Meadors said:
> On Thu, 10 Mar 2005 12:56:04 -0600, Scott Lamb <[EMAIL PROTECTED]> wrote:
>> NetSQL wrote:
>> > Even silly JSF uses RowSet as DTO. (RowSet is realy a ArrayList of
>> > HashMaps. Rows of Columns)
>>
>> What does a ArrayList of HashMaps get you over a java.sql.ResultSet?
>
> The major disadvantage of using the RS directly is that it keeps the
> connection (and associated resources - statements, etc) open the
> entire time you have it. In a high load / limited resources
> application, this is a big deal, and why tools like iBATIS and
> Hibernate take this approach.
>
> RAM and CPU are way cheaper than more Oracle licenses. ;-)
>
>> I'll tell you a big disadvantage: it keeps everything in memory. What if
>> the result set is large?
>
> That is why we do the row handlers in ibatis - you get one row at a
> time with very little added weight over the result set. We also
> support a paginated list that only keeps a limited number of rows in
> memory.
>
> Larry
>
> -
> 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]



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Larry Meadors
On Thu, 10 Mar 2005 12:56:04 -0600, Scott Lamb <[EMAIL PROTECTED]> wrote:
> NetSQL wrote:
> > Even silly JSF uses RowSet as DTO. (RowSet is realy a ArrayList of
> > HashMaps. Rows of Columns)
> 
> What does a ArrayList of HashMaps get you over a java.sql.ResultSet?

The major disadvantage of using the RS directly is that it keeps the
connection (and associated resources - statements, etc) open the
entire time you have it. In a high load / limited resources
application, this is a big deal, and why tools like iBATIS and
Hibernate take this approach.

RAM and CPU are way cheaper than more Oracle licenses. ;-)

> I'll tell you a big disadvantage: it keeps everything in memory. What if
> the result set is large?

That is why we do the row handlers in ibatis - you get one row at a
time with very little added weight over the result set. We also
support a paginated list that only keeps a limited number of rows in
memory.

Larry

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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Scott Lamb
NetSQL wrote:
Even silly JSF uses RowSet as DTO. (RowSet is realy a ArrayList of 
HashMaps. Rows of Columns)
What does a ArrayList of HashMaps get you over a java.sql.ResultSet? 
I'll tell you a big disadvantage: it keeps everything in memory. What if 
the result set is large?

I look at it like this:
-SQL is a Set oriented lang.(row by row processing is exponentialy slower)
This is totally wrong:
- SQL is a multi-set-oriented language, much to the disgust of many 
relational database users.

- "Exponentially" doesn't mean "a lot". It describes a function that 
asymptotically approaches e^n.

- Putting all the data into another container _is_ row-by-row 
processing. You're always doing row-by-row processing, even just to 
fetch it from the database server. And once you've put it in whatever 
form you want, you still have to do row-by-row processing, or you've 
wasted your time fetching a lot of useless rows.

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


RE: Struts DB Access :: Best Practices

2005-03-10 Thread Kris Schneider
Along those lines, I've added an entry to the iBatis Wiki
(http://wiki.apache.org/ibatis/). Select "3rd Party Contributions" and review
the section "Convert ResultSet to JSTL Result". You can think of JSTL's Result
interface as something *similar* to JDBC's CachedRowSet and BeanUtils'
RowSetDynaClass. The example is slanted towards handling cursors that are
output parameters from stored procedures, but the basic idea can applied
anywhere you want to extract data from a ResultSet.

Quoting Joe Hertz <[EMAIL PROTECTED]>:

> Vic writes:
> 
> > :snip:
> > The point is... I use ArrayList of Maps now for my DTO,VO and ever as a
> > message object for WS/SOA.
> > 
> > Wherever I used to use a bean, now I use a collection, and I like
> > DynaMaps.
> > 
> > maybe one day you guys catch up;-)
> 
> I think I'm buying what you say in a big kinda way. I've been there already
> I think, but forcing myself to use the DynaBean route and if you've read my
> posts here, you know I'm frustrated. I've been coming to your conclusion,
> and I'd love to hear more from you offline if you don't mind.
> 
> I disagree vehemently that the idea of Maps in the Domain Model is a bad
> design. I worked for years in an architecture that eschewed many OO concepts
> as creating more work than they saved. 
> 
> Its universe was something like this-
> 
> A Database contains a map of Table Objects
> A Table object contains an array list of Record Objects.
> A Record object contains a map of Field Objects.
> Etc
> 
> Done properly, something like this could be infinitely reusable no matter
> what the application. 

-- 
Kris Schneider 
D.O.Tech   

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



nested tags

2005-03-10 Thread wo_shi_ni_ba_ba
I want to have tags like the following:
 property=""/>

My goal is to pass in attribute whose value can be
used again to construt struts tags dynamically.  Is
this doable? for example, passing in the right struts
html tag and concatenate it with other struts tags to
form a new struts tag.

but when it's rendered it comes out like
 
any alternative to achieve my goal?
thanks




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread NetSQL
Joe Hertz wrote:
The point is... I use ArrayList of Maps now for my DTO,VO and ever as a
message object for WS/SOA.
Wherever I used to use a bean, now I use a collection, and I like
DynaMaps.


I think I'm buying what you say in a big kinda way.

Cool.
I worked for years in an architecture that eschewed many OO concepts
as creating more work than they saved. 

I of course see a lot of productivity and velocity (rate of development) 
of useing OO w/ Collections. You can have BaseMap or BaseList, etc.


Its universe was something like this-
A Database contains a map of Table Objects
A Table object contains an array list of Record Objects.
A Record object contains a map of Field Objects.
Etc

Even silly JSF uses RowSet as DTO. (RowSet is realy a ArrayList of 
HashMaps. Rows of Columns)

I look at it like this:
-SQL is a Set oriented lang.(row by row processing is exponentialy slower)
-iBatis can allways return an ArrayList of Hashmaps (so I do not have to 
write a bean, or keep the bean up to date w/ my Domain - I consider 
iBatis a domain).
- Flex (RiA) can recive a ArrayList of HashMap as natie Associative 
Array. (so cool that Collection is a DTO - I can even change form model 
w/o creating new beans or new gets/sets)
- Since this design works w/ Flex, I might as well use it in JDNC.

Or the short version:
In Java, we represent Sets as/is a Collection.
For Struts, that means not a FormBean, but a FormModel (a map that maps 
to fields).

No more mutiple "CustomerBeans" on large projects and having to add 
get/set when view or domain evolves. It's dynamic and losly coupled.
I am not sure if I am advocating not mastering beans 1st, what with late 
binding issues they solve. But once you know beans, then... dynamic.

hth,
.V
Done properly, something like this could be infinitely reusable no matter
what the application. 

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


RE: Problem with localization and database sorting

2005-03-10 Thread Benedict, Paul C
Kelly,

I think you have conflicting requirements. You can't rely on strings outside
the database for I18N support and then rely on them for sorting within the
database. I think this leaves you with two options:

1. Create a 2nd table which contains your text messages. Join to this table
and pull of the correct column which represents the language you want (en,
de, etc.)

2. Do the sorting in your middle tier.

Thanks,
Paul

-Original Message-
From: Kelly Harward [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:32 PM
To: user@struts.apache.org
Subject: Problem with localization and database sorting


This isn't necessarily a Struts-specific question, but I'm hoping I can get
some good ideas from this group.

I'm working on a Struts-based web app that has various i18n requirements.
Struts handles the localization quite well and for the most part makes the
need to support a new language pretty trivial.

However, I've come up against a problem that I'm sure is not unique to this
Struts app and hoping to hear how others have handled this issue. Like many
web apps, we display a lot of tabular data that is stored in an RDBMS. We
have the requirement to allow users to sort columns by clicking on the
column header (which munges the SORT BY clause on the underlying SQL query
and relegates the actual task of sorting the data to the database).

In many instances, we have various properties that are stored in the
database using arbitrary tokens (think of an event log where the notion of
event type is represented in the database as an integer). When rendering the
result set obtained by querying the database, we typically apply a renderer
to decorate those columns where the data is represented using the arbitrary
token (in the event log example, the renderer for the event type column
might be responsible for transforming the integer "2" into the more
user-friendly string "Warning").

Struts makes it pretty easy for us to provide a mapping between arbitrary
tokens (stored in the database) and localized strings (displayed to users).
We can support additional languages very easily simply by providing a new
mapping between the various tokens and their corresponding string
representations in the language we are required to support.

However, since we are relying on the database to do the sorting for us, when
we allow users to sort on a column that is represented in the database by
some token the database is going to sort on the token which is not
necessarily the natural ordering for the string values the users are seeing
(they would expect the natural order to be alphabetical ordering of the
translated strings we are displaying to them). Obviously we could attempt to
correlate the natural ordering of the tokens to the desired ordering of
their string representations, but this breaks down as soon as you attempt to
add support for a second language.

Anyone ever come across this dilemma and have any ideas on how to solve it?

Thanks in advance,

-Kelly


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






--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: User Delegation with struts

2005-03-10 Thread Matt Raible
I would use the aforementioned suggestion and use a Filter with a  
RequestWrapper to mimic the request.isUserInRole stuff - then you can  
use the "role" attribute in your action-mappings, your tiles  
definitions, and with .

This is what Acegi Security does:
http://cvs.sourceforge.net/viewcvs.py/acegisecurity/acegisecurity/core/ 
src/main/java/net/sf/acegisecurity/wrapper/

Matt
On Mar 10, 2005, at 11:09 AM, Betty Koon wrote:
Matt,
Thanks for the info.  We already have our own Authentication  
mechanism.  I
am just thinking about how is it to make use of current role  
information to
determine what get shown on the UI.  Does that mean I have to write  
custom
tag lib to deal with this.

For isUserInRole, does this only comes in handy for forwarding to an  
Action.
It can't really control what gets shown on the screen right?

-Betty
-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 9:55 AM
To: Struts Users Mailing List
Subject: Re: User Delegation with struts
You could look at using the Acegi Security Framework.  I've used it to
replace J2EE container authentication in AppFuse - and didn't have to
change any code.  Works with request.isUserInRole and all that + it
allows you more fine grained control on the internals.
http://acegisecurity.sourceforge.net
Unfortunately, it's got a bit of a learning curve - but most good
open-source software does. ;-)
Matt
On Mar 10, 2005, at 10:49 AM, Betty Koon wrote:
Hi all,
Anyone has any good strategy or pointers for doing
user/role delegation with struts.  We are not using
J2EE container authentication.  We will have our own
role model.  I will like more fine grain control on
turning on and off visual elements with different
role
information.  Thanks.
-Betty


-
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]


Problem with localization and database sorting

2005-03-10 Thread Kelly Harward
This isn't necessarily a Struts-specific question, but I'm hoping I can get
some good ideas from this group.

I'm working on a Struts-based web app that has various i18n requirements.
Struts handles the localization quite well and for the most part makes the
need to support a new language pretty trivial.

However, I've come up against a problem that I'm sure is not unique to this
Struts app and hoping to hear how others have handled this issue. Like many
web apps, we display a lot of tabular data that is stored in an RDBMS. We
have the requirement to allow users to sort columns by clicking on the
column header (which munges the SORT BY clause on the underlying SQL query
and relegates the actual task of sorting the data to the database).

In many instances, we have various properties that are stored in the
database using arbitrary tokens (think of an event log where the notion of
event type is represented in the database as an integer). When rendering the
result set obtained by querying the database, we typically apply a renderer
to decorate those columns where the data is represented using the arbitrary
token (in the event log example, the renderer for the event type column
might be responsible for transforming the integer "2" into the more
user-friendly string "Warning").

Struts makes it pretty easy for us to provide a mapping between arbitrary
tokens (stored in the database) and localized strings (displayed to users).
We can support additional languages very easily simply by providing a new
mapping between the various tokens and their corresponding string
representations in the language we are required to support.

However, since we are relying on the database to do the sorting for us, when
we allow users to sort on a column that is represented in the database by
some token the database is going to sort on the token which is not
necessarily the natural ordering for the string values the users are seeing
(they would expect the natural order to be alphabetical ordering of the
translated strings we are displaying to them). Obviously we could attempt to
correlate the natural ordering of the tokens to the desired ordering of
their string representations, but this breaks down as soon as you attempt to
add support for a second language.

Anyone ever come across this dilemma and have any ideas on how to solve it?

Thanks in advance,

-Kelly


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



Problem with localization and database sorting

2005-03-10 Thread Kelly Harward
This isn't necessarily a Struts-specific question, but I'm hoping I can get
some good ideas from this group.

I'm working on a Struts-based web app that has various i18n requirements.
Struts handles the localization quite well and for the most part makes the
need to support a new language pretty trivial.

However, I've come up against a problem that I'm sure is not unique to this
Struts app and hoping to hear how others have handled this issue. Like many
web apps, we display a lot of tabular data that is stored in an RDBMS. We
have the requirement to allow users to sort columns by clicking on the
column header (which munges the SORT BY clause on the underlying SQL query
and relegates the actual task of sorting the data to the database).

In many instances, we have various properties that are stored in the
database using arbitrary tokens (think of an event log where the notion of
event type is represented in the database as an integer). When rendering the
result set obtained by querying the database, we typically apply a renderer
to decorate those columns where the data is represented using the arbitrary
token (in the event log example, the renderer for the event type column
might be responsible for transforming the integer "2" into the more
user-friendly string "Warning").

Struts makes it pretty easy for us to provide a mapping between arbitrary
tokens (stored in the database) and localized strings (displayed to users).
We can support additional languages very easily simply by providing a new
mapping between the various tokens and their corresponding string
representations in the language we are required to support.

However, since we are relying on the database to do the sorting for us, when
we allow users to sort on a column that is represented in the database by
some token the database is going to sort on the token which is not
necessarily the natural ordering for the string values the users are seeing
(they would expect the natural order to be alphabetical ordering of the
translated strings we are displaying to them). Obviously we could attempt to
correlate the natural ordering of the tokens to the desired ordering of
their string representations, but this breaks down as soon as you attempt to
add support for a second language.

Anyone ever come across this dilemma and have any ideas on how to solve it?

Thanks in advance,

-Kelly


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



RE: time validation mask (hh:mm)

2005-03-10 Thread Scott Piker
Quid pro quo for answering my CSS post... :-)

Just surround your pattern with start-of-line (^) and end-of-line ($)
chars and you should get the behavior you desire:

 
time

^((?:0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9])$
 

Incidentally, I came across this useful utility for regular expression
testing called the RegEx coach: http://www.weitz.de/regex-coach/
Doesn't teach you anything about regex, but it's a great debugging tool.

- Scott

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:09 PM
To: Struts Users Mailing List
Subject: time validation mask (hh:mm)

I'm trying to validate that the proper format has been used to enter a
24 hour time.  I'll admit I'm not a regex expert, but I thought the
following would work.  Actually, I got it from a regex expert friend, so
I'm just assuming it should work.

 
 time
 
((?:0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9])
 

However, this seems to allow alpha-numerics (i.e. 2:00p or 2:00x), when
I only want digits in the first two places, followed by a colon,
followed by two more digits.  24:59.  If course, it'd be nice if users
could enter 1:24 too, but that's not a requirement.

Thanks,

Matt



-
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]



Re: [OT] CSS site/forum ?

2005-03-10 Thread Matt Raible
I use http://www.experts-exchange.com for a lot of CSS and JavaScript 
issues and it works quite well.  I think you have to pay to ask 
questions now - but it's worth it.

Matt
On Mar 10, 2005, at 11:17 AM, Scott Piker wrote:
Hey all,
Sorry for the OT post, but I know a number of folks here are quite
skilled with CSS.  We're having some really annoying cross-browser CSS
formatting issues and I was wondering if someone could direct me to a
good site/forum where I could find common compatibility issues between
IE and other browsers (Firefox, especially).
Our biggest issue right now is that the ultra-cool dropdown menus we
developed a while ago look great in IE, but are practically unusable in
Firefox.
(Some days, you almost wish Firefox never got so popular and you only
had to worry about IE.  Heresy!)
Thanks in advance,
- Scott

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


[OT] CSS site/forum ?

2005-03-10 Thread Scott Piker
Hey all,

Sorry for the OT post, but I know a number of folks here are quite
skilled with CSS.  We're having some really annoying cross-browser CSS
formatting issues and I was wondering if someone could direct me to a
good site/forum where I could find common compatibility issues between
IE and other browsers (Firefox, especially).  

Our biggest issue right now is that the ultra-cool dropdown menus we
developed a while ago look great in IE, but are practically unusable in
Firefox.

(Some days, you almost wish Firefox never got so popular and you only
had to worry about IE.  Heresy!)

Thanks in advance,
- Scott



RE: User Delegation with struts

2005-03-10 Thread Betty Koon
Matt,

Thanks for the info.  We already have our own Authentication mechanism.  I
am just thinking about how is it to make use of current role information to
determine what get shown on the UI.  Does that mean I have to write custom
tag lib to deal with this.  

For isUserInRole, does this only comes in handy for forwarding to an Action.
It can't really control what gets shown on the screen right?

-Betty

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 9:55 AM
To: Struts Users Mailing List
Subject: Re: User Delegation with struts


You could look at using the Acegi Security Framework.  I've used it to 
replace J2EE container authentication in AppFuse - and didn't have to 
change any code.  Works with request.isUserInRole and all that + it 
allows you more fine grained control on the internals.

http://acegisecurity.sourceforge.net

Unfortunately, it's got a bit of a learning curve - but most good 
open-source software does. ;-)

Matt

On Mar 10, 2005, at 10:49 AM, Betty Koon wrote:

>> Hi all,
>>
>> Anyone has any good strategy or pointers for doing
>> user/role delegation with struts.  We are not using
>> J2EE container authentication.  We will have our own
>> role model.  I will like more fine grain control on
>> turning on and off visual elements with different
>> role
>> information.  Thanks.
>>
>> -Betty
>
>


-
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]



time validation mask (hh:mm)

2005-03-10 Thread Matt Raible
I'm trying to validate that the proper format has been used to enter a 
24 hour time.  I'll admit I'm not a regex expert, but I thought the 
following would work.  Actually, I got it from a regex expert friend, 
so I'm just assuming it should work.


time

((?:0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9])


However, this seems to allow alpha-numerics (i.e. 2:00p or 2:00x), when 
I only want digits in the first two places, followed by a colon, 
followed by two more digits.  24:59.  If course, it'd be nice if users 
could enter 1:24 too, but that's not a requirement.

Thanks,
Matt

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


Re: tiles:insert JSP from database

2005-03-10 Thread Richard Cox
Thanks, I'll look at Velocity. I also know that I can achieve what I
want using Freemarker, but really this doesn't seem like much of a
stretch for Tiles.

The  tag already puts together seveal pieces of JSP code
before the servlet is generated by reading from a file. All I really
want to do is hand it a filestream that pulls information out of a
database instead of a filesystem.

I guess I'll take a quick look at the code for the insert tag. 


-R


On Thu, 10 Mar 2005 04:18:19 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> Remember that ultimately, a JSP is a servlet, albeit one which is
> automatically created and compiled by transforming JSP syntax into
> Java.
> 
> You would need to intervene in this sophisticated and low-level
> process in order to store JSP code in a database and still have it
> work.  It's probably possible in theory, but likely far, far from
> practical.
> 
> Velocity is probably better suited to your use case; it can do all of
> the basic things that JSP can do, and it is possible to use a variety
> of "resource loaders" to get templates and template fragments; it
> comes with loaders which read from the file system and from the
> classpath; there may already even be one which gets templates from a
> database.
> 
> http://jakarta.apache.org/velocity
> 
> Joe
> 
> At 1:21 AM -0800 3/10/05, Richard Cox wrote:
> >Hi All,
> >
> >I am just coming up to speed on tiles and I have searched the archive
> >and not found the answer to this one.
> >
> >I want to import JSP "files" into my layout which are stored in a
> >database. The key issue is that there are JSP tags in the "file"
> >stored in the database that need to be evaluated as part of the page.
> >
> >I think a controller won't work because it returns information after
> >the JSP has been evaluated and the string in the database will contain
> >struts and JSTL tags which will get skipped.
> >
> >I think it is possible to get this effect from by extending the
> >DefinitionFactory class, but I am not sure.
> >
> >The other thought that I had was to get the source and extend the
> > tag so that instead of reading from a file, it reads
> >from the database. But that seems like overkill.
> >
> >Tiles looks great, and I think it can do 100% of what I need, but
> >right now I am missing the last  5% with this issue.
> >
> >Any thoughts or help is very much appreciated.
> >
> >-R
> >
> >[EMAIL PROTECTED]
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
>

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



Re: validation issue

2005-03-10 Thread wo_shi_ni_ba_ba
If I understand correctly struts provide both client
side and server side validation so that for someone
reason a validation error got slipped by the client
the server validation would still be able to catch it,
am I right?

thanks

--- Niall Pemberton <[EMAIL PROTECTED]>
wrote:
> The client side JavaScript thats generated includes
> a "bCancel" var - which
> if set to "true" causes the validation to be
> skipped. So for your "previous"
> processing, you can just set this variable to "true"
> and submit the form.
> 
> - Original Message - 
> From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 09, 2005 11:30 PM
> 
> 
> > I have a previous and next button, if the user
> > clicks previous I don't want to validate; if the
> user
> > clicks next I want to validate.
> 
> > for client side validation, I am thinking about
> inserting a hidden
> > field, and then have two javascript functions
> > handlePrevious and handleNext that will set the
> value
> > of this field before submit the form, and then use
> > validation rule like validwhen.  Is this a
> valid/good
> > approach?
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Scott Lamb
On 10 Mar 2005, at 07:59, Larry Meadors wrote:
Disclosure: I am an iBATIS developer, so I'd like to offer another
opinion on the comparison.
Cool!
I might add an appendix to my documentation with this comparison. When 
I do, I'll give you another opportunity to complain. :)

- iBATIS does database pooling for you; Axamol does not. I prefer to 
use
the servlet container's built-in pooling.
What about testing your DAOs? The dependency on the servlet container
can become problematic.
The client code is expected to pass in a java.sql.Connection or 
javax.sql.DataSource, so there's no direct dependency.

- iBATIS does caching; Axamol does not. I haven't encountered the
situation in which I'd want quite the caching they have.
I work with iBATIS on a project where I regularly do queries over
multi-gigabyte tables. Caching is darn handy in those situations. :-)
I'm sure it is there. But I don't need it yet, and no one's complained 
to me that they do, either. I deliberately avoid writing features 
before they're needed.

- iBATIS has a lot of options to use JavaBeans, which I don't find
useful. I just take parameters in a java.util.Map and return a
java.sql.ResultSet directly. (I'm a DynaActionForm kind of guy, so 
using
a form bean form this would be a little out of place.)
OK, now I have to just plain disagree with you. ;-)
Using Maps and ResultSet in your application as the domain model is
just plain bad design.
It is difficult to test and too loosely coupled.
I used to be of this school of thought also. But, well, then I 
encountered Python. ;) I'd like to do things statically, but not at the 
expense of writing lots of code. I particularly hate code initially 
generated by tools that I have to manually maintain afterward.

And besides, everything else in a servlet container takes this approach 
- context, session, request, and page scope variables are all 
essentially map entries.

- Axamol includes XSLT and standardized elements for embedding
documentation in your libraries and producing HTML for them.
Cool! I have wondered if including that in iBATIS would be used. Do
your users use that much?
What users? ;) Axamol SQL Library doesn't have the community iBATIS 
does. I use it, a friend uses it, and I've gotten a fair number of 
downloads. But my projects can be weird that way...even with 
NetGrowler, which _must_ be popular (lots of downloads, I see 
occasional mentions of it on forums), I only hear from users when 
they've got a problem or feature request. So I don't know how many 
users I have, much less exactly what parts of it they use.

But my friend and I find it useful.
A few other things I did not see in Axamol:
 - row handlers
I'm not sure what you mean by this:
- The things for grabbing a a single int value and such when you do 
count(*), rather than dealing with the whole ResultSet? I've thought 
about adding those, but for now Axamol SQL Library is dirt-simple: it 
just always gives you the ResultSet.

- The things for linking to other queries on a per-row basis? I try to 
avoid those; I like my pages to make a constant number of queries.

 - consistent dynamic sql (from what I see, there are different ways
for altering the order and the where clauses..are there others?)
There's also the , which is similar to your iterator.
The binding looks more awkward to me:
  iBATIS - select * from someTable where key = #id#
  axamol - select * from someTable where key = 
It is. I did it this way initially to avoid having to do any parsing; 
just for ease of implementation. I might end up introducing a syntax 
like that.

I like how you handle multiple databases. Simple. Good job on that.
Thanks.
Cool project Scott, I hope you are not offended if we take some of
your ideas for iBATIS. ;-)
I'd be flattered.
Larry
Regards,
Scott
--
Scott Lamb 


PGP.sig
Description: This is a digitally signed message part


Re: User Delegation with struts

2005-03-10 Thread Matt Raible
You could look at using the Acegi Security Framework.  I've used it to 
replace J2EE container authentication in AppFuse - and didn't have to 
change any code.  Works with request.isUserInRole and all that + it 
allows you more fine grained control on the internals.

http://acegisecurity.sourceforge.net
Unfortunately, it's got a bit of a learning curve - but most good 
open-source software does. ;-)

Matt
On Mar 10, 2005, at 10:49 AM, Betty Koon wrote:
Hi all,
Anyone has any good strategy or pointers for doing
user/role delegation with struts.  We are not using
J2EE container authentication.  We will have our own
role model.  I will like more fine grain control on
turning on and off visual elements with different
role
information.  Thanks.
-Betty


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


RE: User Delegation with struts

2005-03-10 Thread Benedict, Paul C
Betty,

Feel free to use a Filter which wraps the HttpServletRequest (see
HttpServletRequestWrapper) and provides the implementation for isUserInRole
for your custom role model.

Thanks,
Paul

-Original Message-
From: Betty Koon [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 12:50 PM
To: 'Struts Users Mailing List'
Subject: User Delegation with struts


> Hi all,
> 
> Anyone has any good strategy or pointers for doing
> user/role delegation with struts.  We are not using
> J2EE container authentication.  We will have our own
> role model.  I will like more fine grain control on
> turning on and off visual elements with different
> role
> information.  Thanks.
> 
> -Betty

 



--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



User Delegation with struts

2005-03-10 Thread Betty Koon
> Hi all,
> 
> Anyone has any good strategy or pointers for doing
> user/role delegation with struts.  We are not using
> J2EE container authentication.  We will have our own
> role model.  I will like more fine grain control on
> turning on and off visual elements with different
> role
> information.  Thanks.
> 
> -Betty

 


Re: validation issue

2005-03-10 Thread wo_shi_ni_ba_ba
thank you
--- Niall Pemberton <[EMAIL PROTECTED]>
wrote:
> The client side JavaScript thats generated includes
> a "bCancel" var - which
> if set to "true" causes the validation to be
> skipped. So for your "previous"
> processing, you can just set this variable to "true"
> and submit the form.
> 
> - Original Message - 
> From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 09, 2005 11:30 PM
> 
> 
> > I have a previous and next button, if the user
> > clicks previous I don't want to validate; if the
> user
> > clicks next I want to validate.
> 
> > for client side validation, I am thinking about
> inserting a hidden
> > field, and then have two javascript functions
> > handlePrevious and handleNext that will set the
> value
> > of this field before submit the form, and then use
> > validation rule like validwhen.  Is this a
> valid/good
> > approach?
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: Struts DB Access :: Best Practices

2005-03-10 Thread Joe Hertz
Vic writes:

> :snip:
> The point is... I use ArrayList of Maps now for my DTO,VO and ever as a
> message object for WS/SOA.
> 
> Wherever I used to use a bean, now I use a collection, and I like
> DynaMaps.
> 
> maybe one day you guys catch up;-)

I think I'm buying what you say in a big kinda way. I've been there already
I think, but forcing myself to use the DynaBean route and if you've read my
posts here, you know I'm frustrated. I've been coming to your conclusion,
and I'd love to hear more from you offline if you don't mind.

I disagree vehemently that the idea of Maps in the Domain Model is a bad
design. I worked for years in an architecture that eschewed many OO concepts
as creating more work than they saved. 

Its universe was something like this-

A Database contains a map of Table Objects
A Table object contains an array list of Record Objects.
A Record object contains a map of Field Objects.
Etc

Done properly, something like this could be infinitely reusable no matter
what the application. 
 



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



RE: Struts DB Access :: Best Practices

2005-03-10 Thread Joe Hertz
Vic writes:

> :snip:
> The point is... I use ArrayList of Maps now for my DTO,VO and ever as a
> message object for WS/SOA.
> 
> Wherever I used to use a bean, now I use a collection, and I like
> DynaMaps.
> 
> maybe one day you guys catch up;-)

I think I'm buying what you say in a big kinda way. I've been there already
I think, but forcing myself to use the DynaBean route and if you've read my
posts here, you know I'm frustrated. I've been coming to your conclusion,
and I'd love to hear more from you offline if you don't mind.

I disagree vehemently that the idea of Maps in the Domain Model is a bad
design. I worked for years in an architecture that eschewed many OO concepts
as creating more work than they saved. 

Its universe was something like this-

A Database contains a map of Table Objects
A Table object contains an array list of Record Objects.
A Record object contains a map of Field Objects.
Etc

Done properly, something like this could be infinitely reusable no matter
what the application. 
 



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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread NetSQL
Larry Meadors wrote:

- iBATIS has a lot of options to use JavaBeans, which I don't find
useful. I just take parameters in a java.util.Map and return a
java.sql.ResultSet directly. (I'm a DynaActionForm kind of guy, so using
a form bean form this would be a little out of place.)

OK, now I have to just plain disagree with you. ;-)
Using Maps and ResultSet in your application as the domain model is
just plain bad design.
It is difficult to test and too loosely coupled. 

I am sure Vic will disagree with me if he's reading this. :-P

I missed the bait!
So I used to do all the trick with beans, even named my company 
BaseBeans (there are so many benefits- I think I know them all)... and I 
was pushin limits of beans, I even did not like and still don't DynaBeans.

One the 1up project, I was horrified to see mutiple beans, such as 
UserBeansX and ContentBeansY; and some were deprecated and all had 
get/sets that were not being used.

Also I was doing ActionScript and looking at other dynamic langs, where 
they used "AssoicativeArrays". And I took a big liking to dynamic 
nature, ex Grovy.

The point is... I use ArrayList of Maps now for my DTO,VO and ever as a 
message object for WS/SOA.

Wherever I used to use a bean, now I use a collection, and I like DynaMaps.
maybe one day you guys catch up;-)
.V

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


Re: trying to use Apache URL forwarding with struts

2005-03-10 Thread Jonathan Corbin
Since I didn't get a response from the list, I did what any self-respecting 
java programmer would do.  I dug into the struts code.

From FormTag.java:
/**
 * Renders the action attribute
 */
protected void renderAction(StringBuffer results) {
HttpServletResponse response =
(HttpServletResponse) this.pageContext.getResponse();

results.append(" action=\"");
results.append(
response.encodeURL(
TagUtils.getInstance().getActionMappingURL(
this.action,
this.pageContext)));

results.append("\"");
}

From TagUtils:
/**
 * Return the form action converted into a server-relative URL.
 */
public String getActionMappingURL(String action, PageContext pageContext) {
return getActionMappingURL(action,null,pageContext,false);
}

/**
 * Return the form action converted into a server-relative URL.
 */
public String getActionMappingURL(String action, String module, PageContext 
pageContext, boolean contextRelative) {




So it looks like the URL being written is server-relative.  I want a 
context-relative URL, but the rendering is hard-coded to to server-relative.  
So the next thing I do is search bugzilla to see if anyone has already 
requested this change.  Bingo!

http://issues.apache.org/bugzilla/show_bug.cgi?id=17449

And there's even a patch posted for it.  Now to dig up my ancient bugzilla 
account, log in, and vote for it =]
-- 
Jonathan Corbin
Payment Technologies, Inc
Phone: 717-506-2200 x2565

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



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Antony Joseph
Hi karthikeyan,
Stick with SQL based persistent frameworks like iBATIS. The learning curve is 
minimal, expertise is easily available and your application will stand the test 
of time. Relational databases and SQL are'nt going away any time soon. OR 
mapping tools are like EJBs, full of hype. They sound good in theory, suck big 
time in practice. 

- Original Message -
From: "karthikeyan balasubramanian" <[EMAIL PROTECTED]>
To: user@struts.apache.org
Subject: Struts DB Access :: Best Practices
Date: Wed, 9 Mar 2005 13:49:03 +0530

> 
> Hi all,
> 
>I am planning to use Tomcat/Struts/MySQL in my project.
> 
>Database operation's can involve more selects and little bit of
> update/insert operations.
> 
>I want to know what is the best way to access database using struts.
> 
>I did a research and found few good ways:
> 
>1. Struts using Castor.
>2. Struts using JDO.
> 
>I found Struts with Castor easy to use.  What you guys/gals think on
> "What is the best
> practices to access DB from Struts?.
> 
>Any inputs here would enable me to make good decision :)
> 
>Looking forward for yours response.
> 
>Have a great day.
> 
> Karthikeyan B
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



Antony Joseph
http://www.logicden.com
https://workeffort.dev.java.net

-- 
___
NEW! Lycos Dating Search. The only place to search multiple dating sites at 
once.
http://datingsearch.lycos.com


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



Re: Placing message beans inside other tages

2005-03-10 Thread Rick Reumann
Bob Arnott wrote the following on 3/10/2005 10:04 AM:
Use the srcKey attribute on the  tag to specify the property 
in your resource bundle that you want to use:

http://struts.apache.org/userGuide/struts-html.html#img

Darn it Bob:) You made me look at the html:img tag again, and now I 
realize it's cleaner than what I'm doing with JSTL. I love that the 
html:img tag has a titleKey. Now I have to be anal and go change all the 
places in my code to use html:img. Unless someone knows of a nice JSTL 
equivalent? I had removed most of my struts specific tags but I think I 
want to put this one back. Good stuff.

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


RE: Placing message beans inside other tages

2005-03-10 Thread Bob Arnott
haim wrote:
> HI.
> 
> Please forgive me if this is a stupid question , I failed
> to find an answer for this issue.
> 
> How do I place a message into an attribute of a taglib.
> For example lets assume that I want to place the src of
> an image from a recourse bundle. Using the 
> tag. 
> 
> I thought that this should work
> 
> 
> 
> But i get the  as string
> and not as a the message itself.

Use the srcKey attribute on the  tag to specify the property 
in your resource bundle that you want to use:

http://struts.apache.org/userGuide/struts-html.html#img



Cheers,

-- 
Bob Arnott



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



Re: Placing message beans inside other tages

2005-03-10 Thread Ashish Kulkarni
Hi
I dont think you can do that,
--- haim <[EMAIL PROTECTED]> wrote:
> HI.
> 
> Please forgive me if this is a stupid question , I
> failed to find an 
> answer for this issue.
> 
> How do I place a message into an attribute of a
> taglib.
> For example lets assume that I want to place the src
> of an image from a 
> recourse bundle. Using the  tag.
> 
> I thought that this should work
> 
> 
> 
> But i get the  as
> string and not as a the 
> message itself.
> 
> Any Suggestions?
> 
> Thanks
> 
> Haim
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 

A$HI$H




__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



Re: Hidden parameter passing: RE: parameter passing from one jsp-screen to another

2005-03-10 Thread Jan-Jaap Endenburg - Vera
Erik,
I implemented it in this way: thank you for your help!
Jan-Jaap
Erik Weber wrote:
Well, this is not great nice solution in my opinion, but it does seem 
to be popular. This requires you to have a form on screen A and to use 
POST instead of GET to request screen B. Also, it requires JavaScript.

You could make all your links have the same URL, but put an "onclick" 
JavaScript handler with a different parameter on each one (most of the 
Struts HTML tags support the onclick, onsubmit, etc., attributes). The 
onclick handler does two things when you click the link:

1) sets the value of a hidden variable in the form
2) submits the form
So basically, you are turning your hyperlink into a submit button.
On the server, you now have the request parameter just as before, only 
now it comes from a form field instead of a query string variable.

You have to realize, though, that the value isn't truly hidden from 
the user (or from a network snooper) -- the user can view the HTML 
source to see what value gets sent with each click, and the parameter 
is still delivered in a request packet (though it won't show up in a 
URL request log). But, you won't see this parameter in a typical 
browser status bar when you hover your mouse pointer over the link, or 
in the address bar after your browser starts receiving the response.

Perhaps someone else might have another solution. This is the one that 
came to mind.

Erik

jj endenburg wrote:
Thank you Erik!
Actually, the information in my question was not
complete. I am sorry for this...
The parameter to pass from jsp-screen A to jsp-screen
B should stay hidden from the end-user.
This is why displaying this parameter in the URL is
not possible, unfortunately.
Instead of this, how can I pass this parameter within
Struts, without the end-user being able to see it?
Thank you,
Jan-Jaap
--- "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
 

Well, how about using a query string parameter in
your links?
http://foo.com/myapp/bar.jsp?itemId=1
http://foo.com/myapp/bar.jsp?itemId=2
And so on?
The Struts html:link tag (or the JSTL c:url tag) can
be used to dynamically
create your links.
  
http://struts.apache.org/userGuide/struts-html.html#link
 

Hope that helps,
Erik
Original Message:
-
From: jj endenburg [EMAIL PROTECTED]
Date: Tue, 8 Mar 2005 00:29:46 -0800 (PST)
To: user@struts.apache.org
Subject: parameter passing from one jsp-screen to
another
Hi everyone,
I have the following problem: how can I pass a
parameter from a jsp-screen A to a jsp-screen B
within
the struts-framework?
More concrete:
Screen A has several clickable link instances to
screen B. Each link instance has its own
(dynamically
calculated) parameter value to pass to screen B.
This parameter is hidden from the sreen.
Can someone give me a hint on how this parameter
passing can be done in a handy way within struts?
Thanks,
Jan-Jaap
Met vriendelijke groeten,
Jan-Jaap Endenburg

   
__ Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

  
-
 

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

  

 

mail2web - Check your email from the web at
http://mail2web.com/ .

  
-
 

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


   
__ Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

-
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]


Placing message beans inside other tages

2005-03-10 Thread haim
HI.
Please forgive me if this is a stupid question , I failed to find an 
answer for this issue.

How do I place a message into an attribute of a taglib.
For example lets assume that I want to place the src of an image from a 
recourse bundle. Using the  tag.

I thought that this should work

But i get the  as string and not as a the 
message itself.

Any Suggestions?
Thanks
Haim

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


Re: Struts DB Access :: Best Practices

2005-03-10 Thread Larry Meadors
I agree with Rick.

SQL has been around for years and years. IMO, it will outlive most
languages we are writing with today because of its wide acceptance.

Before using iBATIS, I used Hibernate. In my experience with it, it
made the simple things simple, and the difficult things all but
impossible. Performance was also an issue in my case (multi-gigabyte
legacy tables do not lend themselves to Hibernate very well).

Larry


On Wed, 09 Mar 2005 17:19:17 -0500, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Jesse Clark wrote the following on 3/9/2005 4:46 PM:
> 
> > However, I would disagree with your earlier comment that Hibernate is
> > very easy to learn. It is a powerful tool and makes life easier once you
> > learn it, but I think realistically you are looking at a 3 to 6 week
> > learning curve to really figure out how everything fits together and
> > develop a working architecture.
> 
> I'd even disagree that it makes things easier once you learn it. I'd say
> "only sometimes." It often creates a lot of headaches and you'll
> definitely run into difficulties if you don't own the tables and you
> can't create the table structure the way you want it.
> 
> On the other hand, plugging iBATIS again, iBATIS doesn't care what the
> table structure is like. One of the great things about iBATIS is that as
> a developer I can get a nice optimized piece of pure SQL from a DBA
> using existing tables and can use that exact query/update in iBATIS (no
> need to even learn another query language either).
> 
> I think it's great having competing frameworks. Only makes all of them
> better. Personally I find iBATIS simple and powerful. I also have to say
> that I think all the apparent buzz around Hibernate is based purely on
> politics (Same thing with Spring.) Not saying both aren't solid
> products, but they are often pushed in the same breath at conferences
> etc without even considering alternatives that might be better and/or
> easier to use.
> 
> --
> Rick
> 
> -
> 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]



Re: Struts DB Access :: Best Practices

2005-03-10 Thread Larry Meadors
On Wed, 09 Mar 2005 15:48:52 -0600, Scott Lamb <[EMAIL PROTECTED]> wrote:
> karthikeyan balasubramanian wrote:
> > I looked at iBATIS, it seems to be simple and easy to use.  I will
> > also check out
> > others and let you know my thoughts.
> 
> I'll add one to your list: Axamol SQL Library
> 
> 
> It's a project of mine, so I'd love to hear if it works out for you. (Or
> if it doesn't do what you need, but could if I added feature X.)
> 
> It is similar to iBATIS SQL Maps but lighter / narrower in scope. I
> looked over their user manual recently, and the differences I spotted were:

Disclosure: I am an iBATIS developer, so I'd like to offer another
opinion on the comparison.

 :-)

> 
> - iBATIS does database pooling for you; Axamol does not. I prefer to use
> the servlet container's built-in pooling.

What about testing your DAOs? The dependency on the servlet container
can become problematic.

> 
> - iBATIS does caching; Axamol does not. I haven't encountered the
> situation in which I'd want quite the caching they have.

I work with iBATIS on a project where I regularly do queries over
multi-gigabyte tables. Caching is darn handy in those situations. :-)

> 
> - iBATIS has a lot of options to use JavaBeans, which I don't find
> useful. I just take parameters in a java.util.Map and return a
> java.sql.ResultSet directly. (I'm a DynaActionForm kind of guy, so using
> a form bean form this would be a little out of place.)

OK, now I have to just plain disagree with you. ;-)

Using Maps and ResultSet in your application as the domain model is
just plain bad design.

It is difficult to test and too loosely coupled. 

I am sure Vic will disagree with me if he's reading this. :-P

> 
> - iBATIS has a lot of support for translating "magic" values (of the
> 9/9/99 variety) into nulls, which is a fundamentally bad idea. Axamol
> doesn't do this and never will.

Hmm, I tend to agree that this is a bad idea. I avoid that, too.

> 
> - iBATIS's conditional SQL elements have this prepend="..." attribute
> that I find confusing. I accomplish the same thing just by using boolean
> identities: "true and boolvar" = "false or boolvar" = "boolvar". Compare
> the example on iBATIS SQL Map's developer guide page 35 to my example
> two at
> 
> and you'll see what I'm getting at.

That is an interesting approach. Very simple. I have yet to see a
clean way of dealing with this problem. IMO, no SQL framework feels
quite right for this stuff. When I was coding SQL directly in Java, I
did it the way you describe.

> 
> - Axamol includes XSLT and standardized elements for embedding
> documentation in your libraries and producing HTML for them.

Cool! I have wondered if including that in iBATIS would be used. Do
your users use that much?

> 
> - Axamol captures timing statistics which are useful for determining
> where you need to optimize your SQL.

That is a nice feature, and I think it would be easy to add to
iBATIS...maybe in the next version.

A few other things I did not see in Axamol:
 - row handlers
 - consistent dynamic sql (from what I see, there are different ways
for altering the order and the where clauses..are there others?)

The binding looks more awkward to me:
  iBATIS - select * from someTable where key = #id#
  axamol - select * from someTable where key = 

With many parameters, this would get really noisy IMO.

I like how you handle multiple databases. Simple. Good job on that.

Cool project Scott, I hope you are not offended if we take some of
your ideas for iBATIS. ;-)

Larry

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



AOP Benchmark (Was: MVC Frameworks)

2005-03-10 Thread Nicolas De Loof
Take a look at  http://docs.codehaus.org/display/AW/AOP+Benchmark
Result shows Spring AOP to be slower than all other tested AOP 
frameworks. They're lot's of comment on this bench on the net 
(http://www.theserverside.com/news/thread.tss?thread_id=30238), ant 
Spring seems to be "as quick as using proxy-based-architecture can be".

In practice, database response time is more significant than AOP 
framework one.

Nico.
Robert Taylor a écrit :
Nicolas,
Can you provide any metrics for the benchmarks when comparing Spring 
to AspectWorks? What exactly does "not good for Spring" mean?

/robert
Nicolas De Loof wrote:
I get such a case recently : we are using Spring as IoC container. On 
some situation we use a simple AOP interceptor.

Our customer have found on the net a benchmark comparing Spring vs 
AspectJ vs AspectWerkz. The bench result was not good for Spring 
(compared to AspectWerkz). The technical reason has no interest here, 
but my customer has warned us on this and expected us to make load 
test to confirm good application response-time (such load-tests had 
to be done in any case...).

Here is an example why we may not use some framework or function, not 
because it isn't the best, but just because customer doesn't agree 
(for some reason that may not be technical).

For info, load-tests have demonstrated Spring was good enough for us...
Nico.
Fogleson, Allen a écrit :
I think the biggest argument was stated by Nicolas.
I use struts because I like it sure, but I really use it because it is
the framework that the client will accept and pay for and my developers
know best.
We recently used (portions) of Spring on a project and had a heck of a
time getting the client to accept the app during user testing. Granted
there were a bunch of other issues with this particular client that 
went
against "best practices" but the major sticking point was Spring. (note
we didn't even use the MVC part of spring even, just the beanfactory
stuff)

Struts has of course gained popular acceptance so clients really don't
think much about it when you say you are using it, vs something else.
Al
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Tuesday, 
March 08, 2005 10:17 AM
To: Justin Morgan
Cc: Struts Users Mailing List
Subject: Re: MVC Frameworks

For my part, I still prefer Struts because I think it has a great
potential if it endorses some move to IoC and does not fall off the
strict web MVC pattern.  I have no time for the event-based frameworks
like Echo, Tapestry, JSF, Shale, etc.  Others need that sort of thing.
What framework you choose depends a lot on what you want to do, the
sophistication of your developers, etc.
Jack
On Tue, 8 Mar 2005 08:44:26 -0600, Justin Morgan 
<[EMAIL PROTECTED]>
wrote:
 

Thanks...
I recently picked up Rod Johnson's J2EE Design and Development (ISBN:
0-7645-4385-7), and Chapter 12 is titled "Web-Tier MVC Design"...  I'm
going to assume this chapter is pretty similar to the one you mention.
I agree with you that this author is incredibly clear-minded, and I'm
soaking it all in.  Most of the book is model-neutral, and focuses
  

more
 

on good practices and patterns, which is great because we have not
decided on a model yet.  But in chapter 12 he only really discusses
Struts, Maverick, and WebWork.  I was hoping for some commentary on
  

JSF
 

and Tapestry as well, especially regarding why one might choose one
  

over
 

the other.
It all boils down to two questions:
1.  Why do you prefer Struts over any other web application framework?
(Tapestry, JSF, Maverick, WebWork, etc)
2.  Why should _I_ prefer ?
The second question is not meant to make anyone defensive; I'm just
trying to get past
Thanks,
-Justin
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Monday, March 07, 2005 3:30 PM
To: Struts Users Mailing List
Subject: Re: MVC Frameworks
Rod Johnson (author of Spring and one of the clearest thinkers I have
ever read IMHO) has a good discussion of the options in J2EE
Development without EJB in Chapter 13: Web Tier Design.
Jack
On Mon, 7 Mar 2005 14:19:47 -0600, Justin Morgan
  

<[EMAIL PROTECTED]>
 

wrote:
 

Hi there,
I am currently researching different web application frameworks...


JSF,
 

Struts, and Tapestry specifically.  We are planning to migrate a


large
 

existing web application to a rigorous model 2 standard using one or
more of these frameworks, and I am looking for more information on


the
 

differences between them.  My research thus far has turned up only a


few
 

sources, and many of them seem religiously biased toward one of


them.
 

If any of you have opinions, or better yet, articles contrasting


these
 

technologies, please let me know.
Thanks,
-Justin


-
 

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


--
"You can lead a horse to water but yo

Re: validation issue

2005-03-10 Thread Niall Pemberton
The client side JavaScript thats generated includes a "bCancel" var - which
if set to "true" causes the validation to be skipped. So for your "previous"
processing, you can just set this variable to "true" and submit the form.

- Original Message - 
From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]>
Sent: Wednesday, March 09, 2005 11:30 PM


> I have a previous and next button, if the user
> clicks previous I don't want to validate; if the user
> clicks next I want to validate.

> for client side validation, I am thinking about inserting a hidden
> field, and then have two javascript functions
> handlePrevious and handleNext that will set the value
> of this field before submit the form, and then use
> validation rule like validwhen.  Is this a valid/good
> approach?




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



Re: tiles:insert JSP from database

2005-03-10 Thread Joe Germuska
Remember that ultimately, a JSP is a servlet, albeit one which is 
automatically created and compiled by transforming JSP syntax into 
Java.

You would need to intervene in this sophisticated and low-level 
process in order to store JSP code in a database and still have it 
work.  It's probably possible in theory, but likely far, far from 
practical.

Velocity is probably better suited to your use case; it can do all of 
the basic things that JSP can do, and it is possible to use a variety 
of "resource loaders" to get templates and template fragments; it 
comes with loaders which read from the file system and from the 
classpath; there may already even be one which gets templates from a 
database.

http://jakarta.apache.org/velocity
Joe
At 1:21 AM -0800 3/10/05, Richard Cox wrote:
Hi All,
I am just coming up to speed on tiles and I have searched the archive
and not found the answer to this one.
I want to import JSP "files" into my layout which are stored in a
database. The key issue is that there are JSP tags in the "file"
stored in the database that need to be evaluated as part of the page.
I think a controller won't work because it returns information after
the JSP has been evaluated and the string in the database will contain
struts and JSTL tags which will get skipped.
I think it is possible to get this effect from by extending the
DefinitionFactory class, but I am not sure.
The other thought that I had was to get the source and extend the
 tag so that instead of reading from a file, it reads
from the database. But that seems like overkill.
Tiles looks great, and I think it can do 100% of what I need, but
right now I am missing the last  5% with this issue.
Any thoughts or help is very much appreciated.
-R
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


RE: Message Resources error

2005-03-10 Thread Ashutosh Satyam
Hi,
 You can checkout archived messages on this issue at
 
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15779.html
 
 answered by Ted himself.

 
 Before preceeding do once again verify these things.

 1. struts-config.xml has an entry for 'Message Resource Defintion'
Ex: 
 
 
 2. This resource bundle should be in the classpath. An ideal place
would be to put it in WEB-INF/classes directory.
For the above case it would be
  WEB-INF/classes/resources/application.properties
 3. The jsp page has proper tag-lib definition.


Regards,
Ashutosh


-Original Message-
From: Vijaya S [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 3:40 PM
To: Struts User mailing List
Subject: Message Resources error


Hi,

I am getting an exception error when I try to display error messages from my
jsp file. The error I get is,
'Cannot find message resources under key org.apache.struts.action.MESSAGE'.
What is this error mean?
In my action, I have saveMessages(request, messages) where 'messages' is an
object of type ActionMessages.
In debug I noticed the messages are not saved in the request object.

Can someone please help me as I have run out of all possible solutions?

Thanks,
Vijaya



-
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]



Re: MVC Frameworks

2005-03-10 Thread Robert Taylor
Nicolas,
Can you provide any metrics for the benchmarks when comparing Spring to 
AspectWorks? What exactly does "not good for Spring" mean?

/robert
Nicolas De Loof wrote:
I get such a case recently : we are using Spring as IoC container. On 
some situation we use a simple AOP interceptor.

Our customer have found on the net a benchmark comparing Spring vs 
AspectJ vs AspectWerkz. The bench result was not good for Spring 
(compared to AspectWerkz). The technical reason has no interest here, 
but my customer has warned us on this and expected us to make load test 
to confirm good application response-time (such load-tests had to be 
done in any case...).

Here is an example why we may not use some framework or function, not 
because it isn't the best, but just because customer doesn't agree (for 
some reason that may not be technical).

For info, load-tests have demonstrated Spring was good enough for us...
Nico.
Fogleson, Allen a écrit :
I think the biggest argument was stated by Nicolas.
I use struts because I like it sure, but I really use it because it is
the framework that the client will accept and pay for and my developers
know best.
We recently used (portions) of Spring on a project and had a heck of a
time getting the client to accept the app during user testing. Granted
there were a bunch of other issues with this particular client that went
against "best practices" but the major sticking point was Spring. (note
we didn't even use the MVC part of spring even, just the beanfactory
stuff)
Struts has of course gained popular acceptance so clients really don't
think much about it when you say you are using it, vs something else.
Al
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 
08, 2005 10:17 AM
To: Justin Morgan
Cc: Struts Users Mailing List
Subject: Re: MVC Frameworks

For my part, I still prefer Struts because I think it has a great
potential if it endorses some move to IoC and does not fall off the
strict web MVC pattern.  I have no time for the event-based frameworks
like Echo, Tapestry, JSF, Shale, etc.  Others need that sort of thing.
What framework you choose depends a lot on what you want to do, the
sophistication of your developers, etc.
Jack
On Tue, 8 Mar 2005 08:44:26 -0600, Justin Morgan <[EMAIL PROTECTED]>
wrote:
 

Thanks...
I recently picked up Rod Johnson's J2EE Design and Development (ISBN:
0-7645-4385-7), and Chapter 12 is titled "Web-Tier MVC Design"...  I'm
going to assume this chapter is pretty similar to the one you mention.
I agree with you that this author is incredibly clear-minded, and I'm
soaking it all in.  Most of the book is model-neutral, and focuses
  
more
 

on good practices and patterns, which is great because we have not
decided on a model yet.  But in chapter 12 he only really discusses
Struts, Maverick, and WebWork.  I was hoping for some commentary on
  
JSF
 

and Tapestry as well, especially regarding why one might choose one
  
over
 

the other.
It all boils down to two questions:
1.  Why do you prefer Struts over any other web application framework?
(Tapestry, JSF, Maverick, WebWork, etc)
2.  Why should _I_ prefer ?
The second question is not meant to make anyone defensive; I'm just
trying to get past
Thanks,
-Justin
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Monday, March 07, 2005 3:30 PM
To: Struts Users Mailing List
Subject: Re: MVC Frameworks
Rod Johnson (author of Spring and one of the clearest thinkers I have
ever read IMHO) has a good discussion of the options in J2EE
Development without EJB in Chapter 13: Web Tier Design.
Jack
On Mon, 7 Mar 2005 14:19:47 -0600, Justin Morgan
  
<[EMAIL PROTECTED]>
 

wrote:
  

Hi there,
I am currently researching different web application frameworks...

JSF,
  

Struts, and Tapestry specifically.  We are planning to migrate a

large
 

existing web application to a rigorous model 2 standard using one or
more of these frameworks, and I am looking for more information on

the
 

differences between them.  My research thus far has turned up only a

few
  

sources, and many of them seem religiously biased toward one of

them.
 

If any of you have opinions, or better yet, articles contrasting

these
 

technologies, please let me know.
Thanks,
-Justin

-
 

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

--
"You can lead a horse to water but you cannot make it float on its
back."
~Dakota Jack~
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  

 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the 
person to whom it is addressed. If you are not the intended recipient,  
you are not author

Re: [Help] I need tutorial which tells us how to integrate Struts and Hibernet

2005-03-10 Thread Pham Anh Tuan
Thank you very much, Rick :")
- Original Message - 
From: "Rick Reumann" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, March 10, 2005 5:07 AM
Subject: Re: [Help] I need tutorial which tells us how to integrate Struts 
and Hibernet


Pham Anh Tuan wrote the following on 3/9/2005 5:18 AM:
Who can help me or show me where I can get tutorial which tells me how to 
integrate Struts and Hibernet.
I have a brief one (although a bit outdated) on struts/iBATIS. iBATIS is 
so painless to use, I love it.
http://www.reumann.net/struts/ibatisLesson1.do

"Hibernate - making the simple thinks harder, and the hard things nearly 
impossible"
(not my quote, but I like it:)

--
Rick
-
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]


Message Resources error

2005-03-10 Thread Vijaya S
Hi,

I am getting an exception error when I try to display error messages from my
jsp file. The error I get is,
'Cannot find message resources under key org.apache.struts.action.MESSAGE'.
What is this error mean?
In my action, I have saveMessages(request, messages) where 'messages' is an
object of type ActionMessages.
In debug I noticed the messages are not saved in the request object.

Can someone please help me as I have run out of all possible solutions?

Thanks,
Vijaya



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



Re: Sorting of array lists

2005-03-10 Thread PA
On Mar 10, 2005, at 10:36, Rikesh Balan Krishnan wrote:
But all this methods are applicable only if the model class extends the
comparator interface.
No. If your "model class" do not implement java.lang.Comparable, you  
can provide your own java.util.Comparator to  
java.util.Collections.sort() and/or java.util.Arrays.sort().

http://alt.textdrive.com/assets/public/lucene-1.4.3/ 
java.lang.Comparable.cls.html
http://alt.textdrive.com/assets/public/lucene-1.4.3/ 
java.util.Comparator.cls.html

Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Sorting of array lists

2005-03-10 Thread Mark Benussi
The model class in this case Plan does not 'implement' the comparator
interface. That is the whole point, you are writing a comparator to inspect
the object.

-Original Message-
From: Rikesh Balan Krishnan [mailto:[EMAIL PROTECTED] 
Sent: 10 March 2005 09:37
To: Struts Users Mailing List
Subject: RE: Sorting of array lists

But all this methods are applicable only if the model class extends the
comparator interface.I too had a similar problem,but I was not able to
use the collection.sort because if the model class doesn't extend the
comparator interface, it will give a class cast exception.finally I had
to settle for a alofrithm where I wrote a sort method.I'm still looking
for some different method.



-Original Message-
From: Mark Benussi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 2:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Sorting of array lists

Krishna,

The below example uses a comparator which orders a collection of objects
based on a property. You can make the criteria more complicated if you
wish.

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

public class Test {

public static void main(String[] args) {
Test test = new Test();
}
public Test() {
ArrayList arrayList = new ArrayList();
// The plan would have probably been read and populated
from
the db
arrayList.add(new Plan());
arrayList.add(new Plan());
arrayList.add(new Plan());

Collections.sort(arrayList, new Comparator() {
public int compare(Object object1, Object
object2) {
return ((Plan)
object1).getTitle().compareTo(
((Plan) object2).getTitle());
}
});
}

private class Plan {
private String name = null;
private String title = null;
private String description = null;
public String getDescription() {
return description;
}
public String getName() {
return name;
}
public String getTitle() {
return title;
}
public void setDescription(String string) {
description = string;
}
public void setName(String string) {
name = string;
}
public void setTitle(String string) {
title = string;
}
}
}

-Original Message-
From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] 
Sent: 10 March 2005 08:35
To: Struts Users Mailing List
Subject: Sorting of array lists


Hi all,

I have a doubt regarding sorting in array List.

I have an array List  which contains array list objects of type Plan.

The Plan object contains 3 variables : plantitle ,plandescription and
planname.

I have to sort the arraylist based on the plantitle first and then based
on the plandescription.


ArrayList list = new ArrayList();
Plan planobj = null;
For (i= 1, i<=100, i++){
planObj = readPlanObjectFromDB();
list.add(planObj);

}

//?? Now how to sort it 


Private Plan readPlanObjectFromDB(){
//queries the database to return plan object

return plan;
}

I am totally confused. Even if use bubble sorting it will cause a lot of
performance issues.

Could any one please suggest me a good method?

Regards,
Krishna Mohan


-
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]


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



RE: Sorting of array lists

2005-03-10 Thread Rikesh Balan Krishnan
But all this methods are applicable only if the model class extends the
comparator interface.I too had a similar problem,but I was not able to
use the collection.sort because if the model class doesn't extend the
comparator interface, it will give a class cast exception.finally I had
to settle for a alofrithm where I wrote a sort method.I'm still looking
for some different method.



-Original Message-
From: Mark Benussi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 2:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Sorting of array lists

Krishna,

The below example uses a comparator which orders a collection of objects
based on a property. You can make the criteria more complicated if you
wish.

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

public class Test {

public static void main(String[] args) {
Test test = new Test();
}
public Test() {
ArrayList arrayList = new ArrayList();
// The plan would have probably been read and populated
from
the db
arrayList.add(new Plan());
arrayList.add(new Plan());
arrayList.add(new Plan());

Collections.sort(arrayList, new Comparator() {
public int compare(Object object1, Object
object2) {
return ((Plan)
object1).getTitle().compareTo(
((Plan) object2).getTitle());
}
});
}

private class Plan {
private String name = null;
private String title = null;
private String description = null;
public String getDescription() {
return description;
}
public String getName() {
return name;
}
public String getTitle() {
return title;
}
public void setDescription(String string) {
description = string;
}
public void setName(String string) {
name = string;
}
public void setTitle(String string) {
title = string;
}
}
}

-Original Message-
From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] 
Sent: 10 March 2005 08:35
To: Struts Users Mailing List
Subject: Sorting of array lists


Hi all,

I have a doubt regarding sorting in array List.

I have an array List  which contains array list objects of type Plan.

The Plan object contains 3 variables : plantitle ,plandescription and
planname.

I have to sort the arraylist based on the plantitle first and then based
on the plandescription.


ArrayList list = new ArrayList();
Plan planobj = null;
For (i= 1, i<=100, i++){
planObj = readPlanObjectFromDB();
list.add(planObj);

}

//?? Now how to sort it 


Private Plan readPlanObjectFromDB(){
//queries the database to return plan object

return plan;
}

I am totally confused. Even if use bubble sorting it will cause a lot of
performance issues.

Could any one please suggest me a good method?

Regards,
Krishna Mohan


-
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]



tiles:insert JSP from database

2005-03-10 Thread Richard Cox
Hi All,

I am just coming up to speed on tiles and I have searched the archive
and not found the answer to this one.

I want to import JSP "files" into my layout which are stored in a
database. The key issue is that there are JSP tags in the "file"
stored in the database that need to be evaluated as part of the page.

I think a controller won't work because it returns information after
the JSP has been evaluated and the string in the database will contain
struts and JSTL tags which will get skipped.

I think it is possible to get this effect from by extending the
DefinitionFactory class, but I am not sure.

The other thought that I had was to get the source and extend the
 tag so that instead of reading from a file, it reads
from the database. But that seems like overkill.

Tiles looks great, and I think it can do 100% of what I need, but
right now I am missing the last  5% with this issue.

Any thoughts or help is very much appreciated.

-R

[EMAIL PROTECTED]

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



Re: Sorting of array lists

2005-03-10 Thread Ext . Ilitia2

sort it in the private method readPlanObjectFromDB... in the query DB
select * from my_table ORDER BY .



|-+>
| |   "Krishna Mohan   |
| |   Radhakrishnan"   |
| |   <[EMAIL PROTECTED]|
| |   nfosys.com>  |
| ||
| |   10/03/2005 09:35 |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
| ||
| ||
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "Struts Users Mailing List" 
 |
  |   cc:   
 |
  |   bcc:  
 |
  |   Subject:  Sorting of array lists  
 |
  
>--|





Hi all,

I have a doubt regarding sorting in array List.

I have an array List  which contains array list objects of type Plan.

The Plan object contains 3 variables : plantitle ,plandescription and
planname.

I have to sort the arraylist based on the plantitle first and then based
on the plandescription.


ArrayList list = new ArrayList();
Plan planobj = null;
For (i= 1, i<=100, i++){
planObj = readPlanObjectFromDB();
list.add(planObj);

}

//?? Now how to sort it


Private Plan readPlanObjectFromDB(){
//queries the database to return plan object

return plan;
}

I am totally confused. Even if use bubble sorting it will cause a lot of
performance issues.

Could any one please suggest me a good method?

Regards,
Krishna Mohan


-
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]



RE: Sorting of array lists

2005-03-10 Thread Mark Benussi
Krishna,

The below example uses a comparator which orders a collection of objects
based on a property. You can make the criteria more complicated if you wish.

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

public class Test {

public static void main(String[] args) {
Test test = new Test();
}
public Test() {
ArrayList arrayList = new ArrayList();
// The plan would have probably been read and populated from
the db
arrayList.add(new Plan());
arrayList.add(new Plan());
arrayList.add(new Plan());

Collections.sort(arrayList, new Comparator() {
public int compare(Object object1, Object object2) {
return ((Plan)
object1).getTitle().compareTo(
((Plan) object2).getTitle());
}
});
}

private class Plan {
private String name = null;
private String title = null;
private String description = null;
public String getDescription() {
return description;
}
public String getName() {
return name;
}
public String getTitle() {
return title;
}
public void setDescription(String string) {
description = string;
}
public void setName(String string) {
name = string;
}
public void setTitle(String string) {
title = string;
}
}
}

-Original Message-
From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] 
Sent: 10 March 2005 08:35
To: Struts Users Mailing List
Subject: Sorting of array lists


Hi all,

I have a doubt regarding sorting in array List.

I have an array List  which contains array list objects of type Plan.

The Plan object contains 3 variables : plantitle ,plandescription and
planname.

I have to sort the arraylist based on the plantitle first and then based
on the plandescription.


ArrayList list = new ArrayList();
Plan planobj = null;
For (i= 1, i<=100, i++){
planObj = readPlanObjectFromDB();
list.add(planObj);

}

//?? Now how to sort it 


Private Plan readPlanObjectFromDB(){
//queries the database to return plan object

return plan;
}

I am totally confused. Even if use bubble sorting it will cause a lot of
performance issues.

Could any one please suggest me a good method?

Regards,
Krishna Mohan


-
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]



Re: Sorting of array lists

2005-03-10 Thread Nicolas De Loof
Use Collections.sort(list, new Comparator() {...});
or Collections.sort(list) if your Plan class implements Comparable
Nico.
Krishna Mohan Radhakrishnan a écrit :
Hi all,
I have a doubt regarding sorting in array List.
I have an array List  which contains array list objects of type Plan.
The Plan object contains 3 variables : plantitle ,plandescription and
planname.
I have to sort the arraylist based on the plantitle first and then based
on the plandescription.
ArrayList list = new ArrayList();
Plan planobj = null;
For (i= 1, i<=100, i++){
planObj = readPlanObjectFromDB();
list.add(planObj);
}
//?? Now how to sort it 

Private Plan readPlanObjectFromDB(){
//queries the database to return plan object
return plan;
}
I am totally confused. Even if use bubble sorting it will cause a lot of
performance issues.
Could any one please suggest me a good method?
Regards,
Krishna Mohan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sorting of array lists

2005-03-10 Thread Krishna Mohan Radhakrishnan

Hi all,

I have a doubt regarding sorting in array List.

I have an array List  which contains array list objects of type Plan.

The Plan object contains 3 variables : plantitle ,plandescription and
planname.

I have to sort the arraylist based on the plantitle first and then based
on the plandescription.


ArrayList list = new ArrayList();
Plan planobj = null;
For (i= 1, i<=100, i++){
planObj = readPlanObjectFromDB();
list.add(planObj);

}

//?? Now how to sort it 


Private Plan readPlanObjectFromDB(){
//queries the database to return plan object

return plan;
}

I am totally confused. Even if use bubble sorting it will cause a lot of
performance issues.

Could any one please suggest me a good method?

Regards,
Krishna Mohan


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



Re: DataSource in

2005-03-10 Thread brenmcguire
I don't know if it is correct or not, but it is the way the internal
datasource manager in Struts behaves.
Anyway I wrote a plugin that "should" behave better:
http://sdsmanager.sourceforge.net/
I must say that using DataSource as part of a web application is not a
good practice (though I don't think so), and you "should" (again I don't
like it) put a DataSource definition in your container. And, as I saw in
Struts-dev mailing list, DataSource support will be removed in next
releases of Struts.
Ciao
Antonio Petrelli

Jean Stamm wrote:

>Hello,
>
>In a Struts app I use the standard DataSource interface to implement
>the connection pooling to my DB.
>
>I use it in my Actions, calling getDataSource with the request as
>argument like  getDataSource(request, "datasourcename").
>
>I also have a plug-in which puts an array of beans in the application
>scope to be used in select drop-down boxes on the different forms of
>my app (the values of the select never changes, then I prefer this
>option than populating forms at each request, which is obviously extra
>db connection).
>
>In the plug-in, I connect to the db by using the datasource. Since I
>cannot get any request within the plug-in class, I get the datasource
>from the servlet context in the init method by doing:
>
>sc = arg0.getServletContext();
>
>and (DataSource)sc.getAttribute("datasourcename")
>
>signature of init methid is: public void init(ActionServlet arg0,
>ModuleConfig arg1)
>
>This works well, but I would like to know if this is the right way of
>doing or not.
>
>Thanks in advance,
>Jean
>
>-
>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]