Is Struts architecture a disadvantage?

2002-06-06 Thread Yaman Kumar

MessageHi,
I have a question regarding struts architecture, As the Html form and its
validation has been moved and
implemented at server side ( a ActionForm ), once any validation error
encounters that  is shown
in the same page from which this request is generated ( this is very
impressing), but the page
can't retain its old information other than form information.

Case:
An action class bound data into request scope with 3 different attribute
names and forwarding to x.jsp which has
got a form (XFORM) too. In x.jsp it received 3 different attributes and
shown data in tabular format , when
user submits this form to different action this form bean will be validated
and if any errors encountered x.jsp
page would be shown back to user, at this time user can't see the data that
is shown tabular format.
As request is new it can't hold the previous state, this compels the struts
users to keep this data(3 attributes)in session scope so when user comes
back he could see the error with the data too. In a big web application if
we keep data
in session scope the server/application become heavily loaded.

Don't you think this is disadvantage of keeping /validating the formbean at
server side. But I'm sure there are more and more advantages over this
disadvantage.

Please let me know if any better way to solve above problem and forgive me
to  understand this as a disadvantage
of struts architecture.

Thanks
yaman



Re: Frames not able to pick up the corresponding jsps

2002-06-06 Thread Adam Hardy

Make sure you have the html:base tag in your header and refer to the 
frames relatively.

Adam

[EMAIL PROTECTED] wrote:

>i tried with the html:frame tag still it is not working. It's unable to 
>pick up the jsps :-(
>
>
>  
>  
>
>
>w'd this look like..
>
>
>  
>  
>
>
>??
>
>it's still unable to pick those jsps. Any idea as to what is wrong here?
>
>thanks
>karthik.
>
>
>
>
>
>Sri Sankaran <[EMAIL PROTECTED]>
>06/06/2002 07:10 PM
>Please respond to "Struts Users Mailing List"
>
> 
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>cc: 
>Subject:RE: Frames not able to pick up the corresponding jsps
>
>
>Have you tried using ?
>
>Sri
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, June 06, 2002 9:22 AM
>To: Struts Users Mailing List
>Subject: Frames not able to pick up the corresponding jsps
>
>
>Hi All,
>
>I  have a page Nav.jsp
>When i try directly accessing this page, the frames pick up their 
>respective resource jsps properly.
>But when i forward it to this page through struts, it does'nt work. I get 
>a 404 error for the JSPs referred to by the frames.
>
>The viewNav.jsp, dataNav.jsp are in the same folder as Nav.jsp. If I 
>remove the frames it works just fine.
>Any idea as to what i s'd be doing?
>
>
>
><%@ page language="java"%>
><%@ taglib uri="../web-inf/tld/testSample.tld" prefix="sample" %>
><%@ page import="com.i2.tradematrix.webui.taglib.Settings" %>
><%@ page import="org.apache.log4j.BasicConfigurator"%>
>
>
>
>  
>  
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>
>
>  
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How the Action Controller works

2002-06-06 Thread Chandra Sekharan Bhaskaran
Title: Message



hi,
In what cases does the ActionController instantiates 
ActionForm and calls the reset() and validate() methods of 
ActionForm.
    How does it know if html form fields need to be populated in some cases 
whereas in other cases where there are no form fields then ActionForm obj 
is just created and does not call the reset() and validate() 
method.
rgds
C.Bhaskaran
 
    


**Disclaimer


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.


*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: Struts-Example registration.jsp not working

2002-06-06 Thread Chandra Sekharan Bhaskaran
Title: Message



Thanks 
for the info
rgds
C.Bhaskaran

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 
  Friday, June 07, 2002 10:38 AMTo: Struts Users Mailing 
  ListSubject: Re: Struts-Example registration.jsp not 
  workingthe ActionClass 
  that forwards the request to registration.jsp has the responsibilty of filling 
  up the bean and setting it against the key. By directly typing the URL, we by 
  pass that action. So there is a error. that is not the first page i guess. It has to be index.jsp. Infact 
  index.jsp is the welcome page. so just 
  typing http://localhost:8080/struts-example s'd work. karthik. 
  


  
  "Chandra Sekharan Bhaskaran" 
<[EMAIL PROTECTED]> 
06/07/2002 10:31 AM Please respond to "Struts Users Mailing 
List" 
                  To:     
   <[EMAIL PROTECTED]>         cc:     
        
    Subject:        Struts-Example 
registration.jsp not workinghi,   
    I am working with the war file 
  struts-example.war provided by jakarta.     If 
   I type the following on the browser     http://localhost:8080/struts-example/registration.jsp 
      It gives me the error.   javax.servlet.ServletException: No bean found under attribute key 
  registrationForm       at 
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)  
       at 
  org.apache.jsp.registration$jsp._jspService(registration$jsp.java:1633)  
       at 
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)  
       at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:853)    
     at 
  org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)  
       at 
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)  
       at 
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)  
       at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:853)    
     at 
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)  
       at 
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)  
       at 
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)  
       at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)  
       at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)  
       at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)  
       at 
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)  
       at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)  
       at 
  org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)  
       at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)  
       at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)  
       at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)  
       at 
  org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)  
       at 
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)  
       at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)  
       at 
  org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)  
       at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)  
       at 
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)  
       at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)  
       at 
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) 
            at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)  
       at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)  
       at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)  
       at 
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)  
       at 
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)  
       at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)  
       at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)  
       at 
  org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)  
       at 
  org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)  
       at java.lang.Thread.run(Thread.java:536)     rgds C.Bhaskaran--To unsubscribe, 
  e-mail:   
  For additional 
  commands, e-mail:  
  

**Disclaimer


Information contained in this E-MA

Re: Struts-Example registration.jsp not working

2002-06-06 Thread Karthik_Gurumurthy

the ActionClass that forwards the request to registration.jsp has the responsibilty of filling up the bean and setting it against the key. By directly typing the URL, we by pass that action. So there is a error.

that is not the first page i guess. It has to be index.jsp. Infact index.jsp is the welcome page.
so just typing

http://localhost:8080/struts-example

s'd work.

karthik.









"Chandra Sekharan Bhaskaran" <[EMAIL PROTECTED]>
06/07/2002 10:31 AM
Please respond to "Struts Users Mailing List"

        
        To:        <[EMAIL PROTECTED]>
        cc:        
        Subject:        Struts-Example registration.jsp not working


hi,
    I am working with the war file struts-example.war provided by jakarta.
    If  I type the following on the browser
    http://localhost:8080/struts-example/registration.jsp
    It gives me the error.
 
javax.servlet.ServletException: No bean found under attribute key registrationForm
        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
        at org.apache.jsp.registration$jsp._jspService(registration$jsp.java:1633)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
 
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
        at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
        at java.lang.Thread.run(Thread.java:536)
 
  rgds
C.Bhaskaran--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


**Disclaimer


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.


*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Struts-Example registration.jsp not working

2002-06-06 Thread Chandra Sekharan Bhaskaran
Title: Message



hi,
    I 
am working with the war file struts-example.war provided by 
jakarta.
    If  I type the following on the browser
    http://localhost:8080/struts-example/registration.jsp
    It gives me the error.
 
javax.servlet.ServletException: No bean found under attribute key 
registrationForm    at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)    
at 
org.apache.jsp.registration$jsp._jspService(registration$jsp.java:1633)    
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)    
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)    
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)    
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)    
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)    
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)    
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)    
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)    
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)    
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)    
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)    
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)    
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)    
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)    
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)    
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)    
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)    
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)    
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)    
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)    
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)    
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)    
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)    
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)    
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)    
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
 
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)    
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)    
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)    
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)    
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)    
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)    
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)    
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)    
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)    
at java.lang.Thread.run(Thread.java:536)
 
  rgds
C.Bhaskaran

**Disclaimer


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.


*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: SQL STatements in a Properties file.

2002-06-06 Thread Vikram Goyal01

I am not quite sure that putting your SQL in a properties file is such a good idea. 
Whats the advantage? 
If the advantage is that you dont have to change the source code because of query 
changes, then I think that it is misleading. If the query changes, there must have 
been a business requriement for it -- > you have to change functionality somewhere --> 
Means you have to change your source code to take advantage of this new query 
somewhere down the line (EJB, Action, JSP ) --> So you end up touching your source 
code. The whole idea of DAO's is to abstract your queries and data access. Having 
another level of abstraction is IMHO pointless.

Rgs
Vikram

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 4:44 AM
To: Struts Users Mailing List
Subject: RE: SQL STatements in a Properties file.


The framework knows nothing of sql.

However, I have also pondered the using the message resources for something
like this.
I guess if your data layer had access to the message resourcesyou could
do something like this.

sql.customers.get=Select * from customers
sql.customer.get=Select * from customers where id = {0}
sql.customer.update=update customers set name={0}, address={1} where id =
{3}
sql.customer.delete=detete from customers where id = {0}

Although, this can get pretty messy quickly.
Have you considered using an OR tool???


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Olikkadavath, Bobby [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 1:57 PM
> To: [EMAIL PROTECTED]
> Subject: SQL STatements in a Properties file.
>
>
> Hi,
> A newbie question...
> I want to dynamically pickup SQL queries from a Properties file
> (Similar to
> how we use the bean : Message  and the ApplicationResourceProperties FIle
> for Static content in a JSP).
> Does the framework have an implementation exclusively for this or should I
> create something on my own.
>
> Thanks
> Bobby
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JATO

2002-06-06 Thread Karthik_Gurumurthy

am not sure, but when i took a look @ it a year ago, it was more like a 
XML --> Java converter /  XML --> Object converter and used to work the 
other way around as well.
More along the lines of what JAXB is aiming to standardize.
So it does'nt appear to be a struts competitor . but i c'd be wrong

karthik.





"greg rebuck" <[EMAIL PROTECTED]>
06/07/2002 04:33 AM
Please respond to "Struts Users Mailing List"

 
To: Struts Users Mailing List <[EMAIL PROTECTED]>
cc: 
Subject:JATO


(or whatever they're calling it now)

Anyone out there used it?  Is it really a Struts competitor?



--
AKA Darth MacDougal, Jedi Knight from the Plaid Side of the Force



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






RE: Frames not able to pick up the corresponding jsps

2002-06-06 Thread Karthik_Gurumurthy

i tried with the html:frame tag still it is not working. It's unable to 
pick up the jsps :-(


  
  


w'd this look like..


  
  


??

it's still unable to pick those jsps. Any idea as to what is wrong here?

thanks
karthik.





Sri Sankaran <[EMAIL PROTECTED]>
06/06/2002 07:10 PM
Please respond to "Struts Users Mailing List"

 
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
cc: 
Subject:RE: Frames not able to pick up the corresponding jsps


Have you tried using ?

Sri

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 9:22 AM
To: Struts Users Mailing List
Subject: Frames not able to pick up the corresponding jsps


Hi All,

I  have a page Nav.jsp
When i try directly accessing this page, the frames pick up their 
respective resource jsps properly.
But when i forward it to this page through struts, it does'nt work. I get 
a 404 error for the JSPs referred to by the frames.

The viewNav.jsp, dataNav.jsp are in the same folder as Nav.jsp. If I 
remove the frames it works just fine.
Any idea as to what i s'd be doing?



<%@ page language="java"%>
<%@ taglib uri="../web-inf/tld/testSample.tld" prefix="sample" %>
<%@ page import="com.i2.tradematrix.webui.taglib.Settings" %>
<%@ page import="org.apache.log4j.BasicConfigurator"%>



  
  



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






Are You Ready to Rumble?: .NET vs J2EE Smackdown

2002-06-06 Thread James Mitchell

Coming in July 2002 on JDJ.

That's rightsomebody's going to be singing "who's your DADDY???" !



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: nested img

2002-06-06 Thread Keith Chew


Thank you James and Arron for you reply. I'll give the border="0" a go while
waiting for the  tag.

Keith

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 June 2002 3:48 p.m.
To: Struts Users Mailing List
Subject: Re: nested img


>
>
>Hi
>
>I was wondering why isn't there a  tag?
>
>I want to have a nested image with a link, ie:
>
>
>
>Is there an alternative?
>

No alternative. Just had a look through.
It's valid, I'll have to make one and get it in there.

>I could do
>src="someimage.gif">
>
>but it creates an ugly border around the image...
>

try...


...there shouldn't be an ugly border. I'd also recommend getting the
height and with of the image in the tag also, because it will reserve
space on the page for the browser until the image loads. That's why some
pages suddenly expand all over the place while you're trying to read the
content that's there. The image sizes haven't been specified in the Html.

I'll get onto the img tag though.

Arron.


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: nested img

2002-06-06 Thread Arron Bates

>
>
>Hi
>
>I was wondering why isn't there a  tag?
>
>I want to have a nested image with a link, ie:
>
>
>
>Is there an alternative?
>

No alternative. Just had a look through.
It's valid, I'll have to make one and get it in there.

>I could do
>src="someimage.gif">
>
>but it creates an ugly border around the image...
>

try...


...there shouldn't be an ugly border. I'd also recommend getting the 
height and with of the image in the tag also, because it will reserve 
space on the page for the browser until the image loads. That's why some 
pages suddenly expand all over the place while you're trying to read the 
content that's there. The image sizes haven't been specified in the Html.

I'll get onto the img tag though.

Arron.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread Craig R. McClanahan



On Thu, 6 Jun 2002, James Ward wrote:

> Date: Thu, 6 Jun 2002 18:16:41 -0600
> From: James Ward <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: JSP's under WEB-INF?
>
> The best practices also points out using /do/* instead of /*.do so in
> your example it should be "/do/next".
>

Whether you use path matching or extension matching is mostly an issue of
personal taste, but one warning is important -- if you want to use the
multi-application support in Struts 1.1-b1, it only works with extension
mapping.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread James Ward

The best practices also points out using /do/* instead of /*.do so in
your example it should be "/do/next".

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 5:30 PM
> To: Struts Users Mailing List
> Subject: RE: JSP's under WEB-INF?
> 
> That's because you are not following the recommendation 100%
> 
> You should always go through an action.
> even if next.jsp is a simple form..use "/next.do" instead
> 
> that way you can put this in your struts-config:
> 
>  forward="/WEB-INF/jsp/next.jsp">
> 
> 
> 
> 
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> ICQ: 27651409
> AOLIM: jmitchtx (and NO I don't use AOL;)
> 
> 
> > -Original Message-
> > From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 06, 2002 7:23 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: JSP's under WEB-INF?
> >
> >
> > Hi All,
> >
> > I'm trying to following some of the 'best practices' that I've
> > seen on this
> > mailing list, in particular the recommendation to put JSP's in a
> directory
> > under WEB-INF.  I've got a test application where the INDEX.JSP is
> outside
> > of WEB-INF, but all of my other JSP's are in a directory called
> > 'test' that
> > is under WEB-INF.  When I try to link to one of these pages (using
> > , for example),  I get '404' errors
saying
> the
> > page cannot be found.  I know it's there, 'cause I can see it.
> > How do I do
> > this? Is there something in Tomcat that I am totally missing?
> >
> > Thanks!
> >
> > Jerry
> > [EMAIL PROTECTED]
> >
> > This transmission (and any information attached to it) may be
> > confidential and is intended solely for the use of the individual
> > or entity to which it is addressed. If you are not the intended
> > recipient or the person responsible for delivering the
> > transmission to the intended recipient, be advised that you have
> > received this transmission in error and that any use,
> > dissemination, forwarding, printing, or copying of this
> > information is strictly prohibited. If you have received this
> > transmission in error, please immediately notify LabOne at (800)388-
> 4675.
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts and excel

2002-06-06 Thread James Mitchell

I ran this on tomcat4.0.3 and it prompted me to download, I selected to open
and it correctly opened xl for me.

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 11:54 AM
> To: Struts Users Mailing List
> Subject: RE: struts and excel
>
>
> Try adding out.clear() right before changing content type.  Like this:
>
> <%
> out.clear();
> response.setContentType("application/vnd.ms-excel");
> %>
>
> -Original Message-
> From: yanming lu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 11:45 AM
> To: [EMAIL PROTECTED]
> Subject: Re: struts and excel
>
>
> Could you show me what is wrong in the following code?
> -
> <%
> response.setContentType("application/vnd.ms-excel");
> %>
> 
> Excel-Export
> 
> 
> 
> 1997
> 2000
> 1999
> 
> 
> 12.3
> 13.4
> 15.6
> 
> 
> 
> 
> --
> This displays the file as HTML page instead of opening an excel file.
>
>
> >From: "Roy Truelove" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: struts and excel
> >Date: Thu, 6 Jun 2002 11:37:04 -0400
> >
> >Struts has nothing builtin for this (as far as I know).  Excel can read
> >HTML
> >tables however, so if your JSP's create a standard , and you set
> >your
> >content type :
> >
> >response.setContentType("application/vnd.ms-excel");
> >
> >the browser should know to open it with Excel.
> >
> >Take it easy,
> >Roy
> >
> >- Original Message -
> >From: "yanming lu" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, June 06, 2002 11:00 AM
> >Subject: struts and excel
> >
> >
> > > How to display an excel file in struts?
> > >
> > > _
> > > MSN Photos is the easiest way to share and print your photos:
> > > http://photos.msn.com/support/worldwide.aspx
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > > For additional commands, e-mail:
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> >
> >For additional commands, e-mail:
> >
> >
>
>
> _
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts PowerPoint presentation

2002-06-06 Thread James Mitchell

Hey, if you need any help with asp to java differences.  Just ask.

The hardest part of learning Java coming from ASP is simple the terminology.
Examples:
What’s the difference between an ASP redirect and JSP forward?
Where’s my global.asa?

I can’t tell you how many times I had to stare at a peice of code and wonder
what the equivalent was...only to have a “DOH!! So that’s the
Server.MapPath() in Java!!!” some time later.

If your developers are open minded (like the signature line says), and quick
learners, they can cross that bridge in 4 to 9 months flateasy.

I’m a private consultant in the North Georgia (Atlanta) area.
I’ve been writing ASP/COM for over 7 years.
For the last 2 years, I’ve been sliding down the slippery slope of
MVC/Java/Struts.
I still get paid to support a few ASP apps, but most new dev is Java/Struts.

I’ve briefly looked at .Net also, but never done anything serious.
I completed the HelloWorld.cs and don’t quite understand (or want to) the
whole ‘code-behind’ thing.  Sounds like someone’s copying the Struts
framework.hm


Might be that Munk from Germany



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Anders Rosén [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 4:20 PM
> To: [EMAIL PROTECTED]
> Subject: Struts PowerPoint presentation
>
>
> Hi,
>
> I will teach JSP for a group of ASP developers next week. Nice challenge
> ;-) I have the Java and JSP material ready to go, but I would like to
> introduce MVC as good way of building (web) applications. And what could
> be better than to use Struts as a reference for the architecture.
>
> Preparing and compiling training material is tedious, and that's why I
> post here. Has anyone on the list compiled a PowerPoint on Struts?
> Covering the basics, including some basics about coding and
> configuration of Struts? And who wants to share the work?
>
> "Every PowerPoint presentation is true, for certain values of true"
>
> Regards,
> /Anders
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread Jerry Jalenak

Thanks to everyone!  Finally got everything in place in struts-config,
tested, and it works like a charm!

Jerry

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 6:47 PM
To: Struts Users Mailing List
Subject: RE: JSP's under WEB-INF?


Yes, feel free to download that zip and drop in tomcat.  It's pretty
straight-forward.

Hope that helps!!!

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Nathan Anderson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:39 PM
> To: Struts Users Mailing List
> Subject: RE: JSP's under WEB-INF?
>
>
> Ignore my "I think you are using struts comment"  I just realized
> you are on
> the Struts list [not the JUG list I thought I was replying to -- DOE!]
>
> Nathan
>
> -Original Message-
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 4:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: JSP's under WEB-INF?
>
>
> Hi All,
>
> I'm trying to following some of the 'best practices' that I've
> seen on this
> mailing list, in particular the recommendation to put JSP's in a directory
> under WEB-INF.  I've got a test application where the INDEX.JSP is outside
> of WEB-INF, but all of my other JSP's are in a directory called
> 'test' that
> is under WEB-INF.  When I try to link to one of these pages (using
> , for example),  I get '404' errors saying the
> page cannot be found.  I know it's there, 'cause I can see it.
> How do I do
> this? Is there something in Tomcat that I am totally missing?
>
> Thanks!
>
> Jerry
> [EMAIL PROTECTED]
>
> This transmission (and any information attached to it) may be confidential
> and is intended solely for the use of the individual or entity to which it
> is addressed. If you are not the intended recipient or the person
> responsible for delivering the transmission to the intended recipient, be
> advised that you have received this transmission in error and
> that any use,
> dissemination, forwarding, printing, or copying of this information is
> strictly prohibited. If you have received this transmission in
> error, please
> immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread James Mitchell

Yes, feel free to download that zip and drop in tomcat.  It’s pretty
straight-forward.

Hope that helps!!!

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Nathan Anderson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:39 PM
> To: Struts Users Mailing List
> Subject: RE: JSP's under WEB-INF?
>
>
> Ignore my "I think you are using struts comment"  I just realized
> you are on
> the Struts list [not the JUG list I thought I was replying to -- DOE!]
>
> Nathan
>
> -Original Message-
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 4:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: JSP's under WEB-INF?
>
>
> Hi All,
>
> I'm trying to following some of the 'best practices' that I've
> seen on this
> mailing list, in particular the recommendation to put JSP's in a directory
> under WEB-INF.  I've got a test application where the INDEX.JSP is outside
> of WEB-INF, but all of my other JSP's are in a directory called
> 'test' that
> is under WEB-INF.  When I try to link to one of these pages (using
> , for example),  I get '404' errors saying the
> page cannot be found.  I know it's there, 'cause I can see it.
> How do I do
> this? Is there something in Tomcat that I am totally missing?
>
> Thanks!
>
> Jerry
> [EMAIL PROTECTED]
>
> This transmission (and any information attached to it) may be confidential
> and is intended solely for the use of the individual or entity to which it
> is addressed. If you are not the intended recipient or the person
> responsible for delivering the transmission to the intended recipient, be
> advised that you have received this transmission in error and
> that any use,
> dissemination, forwarding, printing, or copying of this information is
> strictly prohibited. If you have received this transmission in
> error, please
> immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread Nathan Anderson

Ignore my "I think you are using struts comment"  I just realized you are on
the Struts list [not the JUG list I thought I was replying to -- DOE!]

Nathan

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 4:23 PM
To: '[EMAIL PROTECTED]'
Subject: JSP's under WEB-INF?


Hi All,

I'm trying to following some of the 'best practices' that I've seen on this
mailing list, in particular the recommendation to put JSP's in a directory
under WEB-INF.  I've got a test application where the INDEX.JSP is outside
of WEB-INF, but all of my other JSP's are in a directory called 'test' that
is under WEB-INF.  When I try to link to one of these pages (using
, for example),  I get '404' errors saying the
page cannot be found.  I know it's there, 'cause I can see it.  How do I do
this? Is there something in Tomcat that I am totally missing?

Thanks!

Jerry
[EMAIL PROTECTED]

This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread Nathan Anderson

It sounds like you are using Struts in this application.  The way you would
simply forward to a .jsp in Struts would be to access that .jsp from a
"forward".  This requires a couple of changed to the struts-config.xml..

In the  section add this line:

NOTE: The above path may be wrong for your particular set-up, but I think
you can figure it out from here.

In the  section add this line:

NOTE: The ".do" is probably correct for your application but it can be
different depending on your configuration in web.xml

Nathan

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 4:23 PM
To: '[EMAIL PROTECTED]'
Subject: JSP's under WEB-INF?


Hi All,

I'm trying to following some of the 'best practices' that I've seen on this
mailing list, in particular the recommendation to put JSP's in a directory
under WEB-INF.  I've got a test application where the INDEX.JSP is outside
of WEB-INF, but all of my other JSP's are in a directory called 'test' that
is under WEB-INF.  When I try to link to one of these pages (using
, for example),  I get '404' errors saying the
page cannot be found.  I know it's there, 'cause I can see it.  How do I do
this? Is there something in Tomcat that I am totally missing?

Thanks!

Jerry
[EMAIL PROTECTED]

This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: nested img

2002-06-06 Thread James Mitchell

put border=0, that an html thing

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Keith Chew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 6:24 PM
> To: Struts Users Mailing List
> Subject: nested img
>
>
> Hi
>
> I was wondering why isn't there a  tag?
>
> I want to have a nested image with a link, ie:
>
> 
>
> Is there an alternative?
>
> I could do
>  src="someimage.gif">
>
> but it creates an ugly border around the image...
>
> Thanks
> Keith
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread James Mitchell

yes, that’s correct (i think)

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:31 PM
> To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
> Subject: RE: JSP's under WEB-INF?
>
>
> In looking at the Struts doc, is there any reason why the
> following wouldn't
> work just as well?
>
>   in the JSP
>
>   
>
>   in struts-config
>
>   
>   
>   
>
> I've tried it this was, and when I look at the generted HTML, the
> link looks
> OK - but I still get the 404 error. Any idea why?
>
> Jerry
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 6:30 PM
> To: Struts Users Mailing List
> Subject: RE: JSP's under WEB-INF?
>
>
> That's because you are not following the recommendation 100%
>
> You should always go through an action.
> even if next.jsp is a simple form..use "/next.do" instead
>
> that way you can put this in your struts-config:
> 
>  forward="/WEB-INF/jsp/next.jsp">
> 
>
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> ICQ: 27651409
> AOLIM: jmitchtx (and NO I don't use AOL;)
>
>
> > -Original Message-
> > From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 06, 2002 7:23 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: JSP's under WEB-INF?
> >
> >
> > Hi All,
> >
> > I'm trying to following some of the 'best practices' that I've
> > seen on this
> > mailing list, in particular the recommendation to put JSP's in
> a directory
> > under WEB-INF.  I've got a test application where the INDEX.JSP
> is outside
> > of WEB-INF, but all of my other JSP's are in a directory called
> > 'test' that
> > is under WEB-INF.  When I try to link to one of these pages (using
> > , for example),  I get '404' errors
> saying the
> > page cannot be found.  I know it's there, 'cause I can see it.
> > How do I do
> > this? Is there something in Tomcat that I am totally missing?
> >
> > Thanks!
> >
> > Jerry
> > [EMAIL PROTECTED]
> >
> > This transmission (and any information attached to it) may be
> > confidential and is intended solely for the use of the individual
> > or entity to which it is addressed. If you are not the intended
> > recipient or the person responsible for delivering the
> > transmission to the intended recipient, be advised that you have
> > received this transmission in error and that any use,
> > dissemination, forwarding, printing, or copying of this
> > information is strictly prohibited. If you have received this
> > transmission in error, please immediately notify LabOne at
> (800)388-4675.
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> This transmission (and any information attached to it) may be
> confidential and is intended solely for the use of the individual
> or entity to which it is addressed. If you are not the intended
> recipient or the person responsible for delivering the
> transmission to the intended recipient, be advised that you have
> received this transmission in error and that any use,
> dissemination, forwarding, printing, or copying of this
> information is strictly prohibited. If you have received this
> transmission in error, please immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources

2002-06-06 Thread James Mitchell

I agree, in fact, I wonder if it can be extended to load from other means
such as xml, rdbms, or call to a url (ftp/http/whatever)

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Anthony Martin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 12:36 PM
> To: Struts User List
> Subject: MessageResources
>
>
> Are there any plans to make the Struts MessageResources, in the utility
> package, part of Jakarta Commons?  I find myself using this feature in
> areas other than servlet development.  I also see a need to use it in
> applets so that the JSPs and applets use the same ApplicationResources.
> No luck with the applets due to security, but stand-alone GUI
> applications seem to work with it fine.  What are your thoughts about
> this?
>
>
> Anthony
>
> To decode this comment into a readable form, rot13 it twice.
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread Jerry Jalenak

In looking at the Struts doc, is there any reason why the following wouldn't
work just as well?

in the JSP



in struts-config





I've tried it this was, and when I look at the generted HTML, the link looks
OK - but I still get the 404 error. Any idea why?

Jerry

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 6:30 PM
To: Struts Users Mailing List
Subject: RE: JSP's under WEB-INF?


That's because you are not following the recommendation 100%

You should always go through an action.
even if next.jsp is a simple form..use "/next.do" instead

that way you can put this in your struts-config:






James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: JSP's under WEB-INF?
>
>
> Hi All,
>
> I'm trying to following some of the 'best practices' that I've
> seen on this
> mailing list, in particular the recommendation to put JSP's in a directory
> under WEB-INF.  I've got a test application where the INDEX.JSP is outside
> of WEB-INF, but all of my other JSP's are in a directory called
> 'test' that
> is under WEB-INF.  When I try to link to one of these pages (using
> , for example),  I get '404' errors saying the
> page cannot be found.  I know it's there, 'cause I can see it.
> How do I do
> this? Is there something in Tomcat that I am totally missing?
>
> Thanks!
>
> Jerry
> [EMAIL PROTECTED]
>
> This transmission (and any information attached to it) may be
> confidential and is intended solely for the use of the individual
> or entity to which it is addressed. If you are not the intended
> recipient or the person responsible for delivering the
> transmission to the intended recipient, be advised that you have
> received this transmission in error and that any use,
> dissemination, forwarding, printing, or copying of this
> information is strictly prohibited. If you have received this
> transmission in error, please immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread James Mitchell

I’ve re-written the struts-example to follow this pattern.
Here’s the link...

http://struts-atlanta.open-tools.org/struts-example-jsp-mod.zip

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: JSP's under WEB-INF?
>
>
> Hi All,
>
> I'm trying to following some of the 'best practices' that I've
> seen on this
> mailing list, in particular the recommendation to put JSP's in a directory
> under WEB-INF.  I've got a test application where the INDEX.JSP is outside
> of WEB-INF, but all of my other JSP's are in a directory called
> 'test' that
> is under WEB-INF.  When I try to link to one of these pages (using
> , for example),  I get '404' errors saying the
> page cannot be found.  I know it's there, 'cause I can see it.
> How do I do
> this? Is there something in Tomcat that I am totally missing?
>
> Thanks!
>
> Jerry
> [EMAIL PROTECTED]
>
> This transmission (and any information attached to it) may be
> confidential and is intended solely for the use of the individual
> or entity to which it is addressed. If you are not the intended
> recipient or the person responsible for delivering the
> transmission to the intended recipient, be advised that you have
> received this transmission in error and that any use,
> dissemination, forwarding, printing, or copying of this
> information is strictly prohibited. If you have received this
> transmission in error, please immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-06 Thread James Mitchell

That’s because you are not following the recommendation 100%

You should always go through an action.
even if next.jsp is a simple form..use “/next.do” instead

that way you can put this in your struts-config:






James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: JSP's under WEB-INF?
>
>
> Hi All,
>
> I'm trying to following some of the 'best practices' that I've
> seen on this
> mailing list, in particular the recommendation to put JSP's in a directory
> under WEB-INF.  I've got a test application where the INDEX.JSP is outside
> of WEB-INF, but all of my other JSP's are in a directory called
> 'test' that
> is under WEB-INF.  When I try to link to one of these pages (using
> , for example),  I get '404' errors saying the
> page cannot be found.  I know it's there, 'cause I can see it.
> How do I do
> this? Is there something in Tomcat that I am totally missing?
>
> Thanks!
>
> Jerry
> [EMAIL PROTECTED]
>
> This transmission (and any information attached to it) may be
> confidential and is intended solely for the use of the individual
> or entity to which it is addressed. If you are not the intended
> recipient or the person responsible for delivering the
> transmission to the intended recipient, be advised that you have
> received this transmission in error and that any use,
> dissemination, forwarding, printing, or copying of this
> information is strictly prohibited. If you have received this
> transmission in error, please immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JSP's under WEB-INF?

2002-06-06 Thread Jerry Jalenak

Hi All,

I'm trying to following some of the 'best practices' that I've seen on this
mailing list, in particular the recommendation to put JSP's in a directory
under WEB-INF.  I've got a test application where the INDEX.JSP is outside
of WEB-INF, but all of my other JSP's are in a directory called 'test' that
is under WEB-INF.  When I try to link to one of these pages (using
, for example),  I get '404' errors saying the
page cannot be found.  I know it's there, 'cause I can see it.  How do I do
this? Is there something in Tomcat that I am totally missing?

Thanks!

Jerry
[EMAIL PROTECTED]

This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: SQL STatements in a Properties file.

2002-06-06 Thread James Mitchell

The framework knows nothing of sql.

However, I have also pondered the using the message resources for something
like this.
I guess if your data layer had access to the message resourcesyou could
do something like this.

sql.customers.get=Select * from customers
sql.customer.get=Select * from customers where id = {0}
sql.customer.update=update customers set name={0}, address={1} where id =
{3}
sql.customer.delete=detete from customers where id = {0}

Although, this can get pretty messy quickly.
Have you considered using an OR tool???


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Olikkadavath, Bobby [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 1:57 PM
> To: [EMAIL PROTECTED]
> Subject: SQL STatements in a Properties file.
>
>
> Hi,
> A newbie question...
> I want to dynamically pickup SQL queries from a Properties file
> (Similar to
> how we use the bean : Message  and the ApplicationResourceProperties FIle
> for Static content in a JSP).
> Does the framework have an implementation exclusively for this or should I
> create something on my own.
>
> Thanks
> Bobby
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts and cookies

2002-06-06 Thread Chappell, Simon P

Easy one!

Reason:

It's because when you use a forward, you are not actually making a trip back to the 
client, so the new cookie has not made it to the browser yet and the JSP that you have 
forwarded to get's the last known state sent by the browser, which was before you 
generated the cookie.

Code Fragment:

if (databaseTransactionCompleted) {
//
// Put the username into a cookie.
//
Cookie c = new Cookie(SessionData.COOKIE_USERNAME, 
logonData.getUsername());
c.setMaxAge(-1); // Session only cookie
response.addCookie(c);

forward = mapping.findForward(SUCCESS);
forward.setRedirect(true);
} else {
forward = mapping.findForward(FAILURE);
}
return (forward);
}

The relevent line here from this fragment out of a logon action that I wrote is the 
"forward.setRedirect(true)" line. Now, I'm sure that in version 1.1 there is another 
way to do that, I seem to recall that there is an extra attribute that you can set 
somewhere in the struts-config.xml, but this is how I did it under version 1.0.

However you do it, make certain that when you set/change/remove a cookie, that you go 
back to the browser before you go anywhere else.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Brian Holzer [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, June 06, 2002 5:50 PM
>To: <
>Subject: Struts and cookies
>
>
>Hi all,
>   I am hoping that this is an easy question.  I have ActionA, 
>jspA and ActionB.  In ActionA I add a cookie to the response 
>passed into the perform() method.
>
> Cookie cookie1 = new Cookie( "SGI", "autodev01" );
> response.addCookie( cookie1 );
>
>  Then I exit ActionA with the following command
>
> return( mapping.findForward( fwd ) ); 
>
>I am then forwarded to jspA where I enter some search criteria 
>and press the submit button which forwards to ActionB.  In 
>ActionB I use some displays to show the contents of the 
>request passed into the perform() method 
>
>  System.out.println( "OUTPUTTING HEADERS: " );
>   Enumeration enum = request.getHeaderNames();
>   while ( enum.hasMoreElements() ) {
>  String k = (String) enum.nextElement();
>  Object v = request.getHeader( k );
>  System.out.println( "Key: " + k + "  Value: " + 
>v.toString() );
>   } // end of while
>
> Cookie sgiCookie[] = request.getCookies();
> System.out.println( "OUTPUTTING COOKIES: " );
> int w = 0;
> while( w < sgiCookie.length ){
>System.out.println( "Cookie number " + w );
>System.out.println( "Cookie name: " + sgiCookie[w].getName() );
>System.out.println( "Cookie value: " + 
>sgiCookie[w].getValue() );
>System.out.println( "---" );
>w++;
> }
>
>but the cookie I added is not there.  The only cookie still 
>there is the jsessionid cookie.  I am using Silverstream 3.7.3 
>app server.
>
>Does anyone know why my cookie is dissappearing?  or am I 
>somehow not adding it in the right place? 
>
>Thanks
>Brian
>
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JATO

2002-06-06 Thread greg rebuck

(or whatever they're calling it now)

Anyone out there used it?  Is it really a Struts competitor?



--
AKA Darth MacDougal, Jedi Knight from the Plaid Side of the Force



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts and cookies

2002-06-06 Thread Cutrell, George


When creating a cookie without setting its path, the path defaults to the
path of the request, e.g., /myapp/ActionA.  The browser will not send the
cookie back for subsequent request for anything other than /myapp/ActionA.
Set the cookie path via cookie.setPath() to something that will allow the
browser to send the cookie back on subsequent requests - either to something
like cookie.setPath("/") or cookie.setPath("/myapp").

Regards,
George.

-Original Message-
From: Brian Holzer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 6:50 PM
Subject: Struts and cookies


Hi all,
   I am hoping that this is an easy question.  I have ActionA, jspA and
ActionB.  In ActionA I add a cookie to the response passed into the
perform() method.

 Cookie cookie1 = new Cookie( "SGI", "autodev01" );
 response.addCookie( cookie1 );

  Then I exit ActionA with the following command

 return( mapping.findForward( fwd ) ); 

I am then forwarded to jspA where I enter some search criteria and press the
submit button which forwards to ActionB.  In ActionB I use some displays to
show the contents of the request passed into the perform() method 

  System.out.println( "OUTPUTTING HEADERS: " );
Enumeration enum = request.getHeaderNames();
while ( enum.hasMoreElements() ) {
   String k = (String) enum.nextElement();
   Object v = request.getHeader( k );
   System.out.println( "Key: " + k + "  Value: " + v.toString() );
} // end of while

 Cookie sgiCookie[] = request.getCookies();
 System.out.println( "OUTPUTTING COOKIES: " );
 int w = 0;
 while( w < sgiCookie.length ){
System.out.println( "Cookie number " + w );
System.out.println( "Cookie name: " + sgiCookie[w].getName() );
System.out.println( "Cookie value: " + sgiCookie[w].getValue() );
System.out.println( "---" );
w++;
 }

but the cookie I added is not there.  The only cookie still there is the
jsessionid cookie.  I am using Silverstream 3.7.3 app server.

Does anyone know why my cookie is dissappearing?  or am I somehow not adding
it in the right place? 

Thanks
Brian


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: wishlist

2002-06-06 Thread Joseph Barefoot

Keep preaching man.  The choir is here to back you up. :)

peace,
Joe Barefoot

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 3:39 PM
> To: Struts Users Mailing List
> Subject: RE: wishlist
>
>
> LOLI knowI dreaming..but one day mind you...;)
>
> I cannot tell you how many hours of my life have been wasted
> coding the same
> SH#T over and over again in ASP and COM.  From 1997 to 2000ish I thought I
> was the ASP/COM KING!  No doubt this was also at the height
> on the .bomb
> era (I mean .com)
>
> Then I started learning this cool thing called “Java Web Application
> Development with Struts” (I believe that’s also a book title
> somewhere right
> Ted??? ;)
>
> I remember (this happened a few times) picking up the phone and ordering
> dinner for a few other developers and myself from Dominoes.  We
> were working
> on a getting a nice new enhancement out the door by that week.  Only one
> problem, Dominoes had closed for the night, it was 3 AM!!!
>
> Sometime early last year, I sat down and rewrote an application that I had
> done for a client (originally in ASP).  I duplicated the
> functionality, but
> wrote it in Java (w/Struts no doubt).
>
>ASP  Struts
> Lines of code 1257   148
> *includes html, css, but not comments
>
> Features that were not in the ASP version:
> *logging
> *connection pooling
>
> That was with a pre 1.0 version when I was still working with Chuck at
> NetVendor.  I’m sure it could have been fewer lines, but I was new to this
> whole Struts business thing :-)
> This doesn’t even show the time savings by using tiles and the validator.
> Anyway, this is only one of several reasons why I put on my signature line
> “Struts Evangelist”.
>
>
> Anyway, I hope to complete my wish list be the end of the week.  If anyone
> cares to add to the list, I’ll add a section on there for you.
>
> I’m not sure how this (wishes/plans) all correlates to what the other
> developers/committers are doing with proposals and such.  One thing I’ve
> noticed is that the pages on the struts site are not consistent as far as
> layout and links.
>
> Anyone else notice this too???
>
> I had planned to re-write the struts-example that ships with the
> binary and
> source dist, but I’ve seen evidence that I’m not the first to tackle this.
> I hate doing doing duplicate work (that’s why I’m here) so if anyone else
> (Ted, Vic, James, anyone) is going to do this, please tell me so
> I can focus
> on something else.
>
> Ted, Vic, and Bryan are you doing anything with the struts site on
> sourceforge?
> I had been looking around last month for a place to post samples and docs,
> then I found your site.  I left a msg in public forums, but there’s no
> activity.  Would care to add me as a member/developer?  I’d like
> to offer my
> web hosting services to any of your projects.  It’s a DSL with static IP.
> Not the most robust bandwidth I know, but hey, its free!!!  Well,
> I have to
> pay for the line, but that’s minimal compared to what I get in return.
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> ICQ: 27651409
> AOLIM: jmitchtx (and NO I don’t use AOL;)
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 06, 2002 3:48 PM
> > To: Struts Users Mailing List
> > Subject: RE: wishlist
> >
> >
> >
> >
> >
> > Gee -
> >
> > If I didn't know better, I'd say James has gotten a pretty good start on
> > the Struts 2.0 requierments document -
> >
> >
> >
> >
> >
> >
> > "James Mitchell" <[EMAIL PROTECTED]> on 06/06/2002 02:32:44 PM
> >
> > Please respond to "Struts Users Mailing List"
> >   <[EMAIL PROTECTED]>
> >
> > To:   "Thigpen, David" <[EMAIL PROTECTED]>
> > cc:   "Struts Users Mailing List" <[EMAIL PROTECTED]> (bcc:
> >   Kevin Bedell/Systems/USHO/SunLife)
> > Subject:  RE: wishlist
> >
> >
> > I'm only 1/3 done with those notes/wishes.stay tuned.
> >
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > Struts-Atlanta, the "Open Minded Developer Network"
> > http://struts-atlanta.open-tools.org
> > ICQ: 27651409
> > AOLIM: jmitchtx (and NO I don't use AOL;)
> >
> >
> > > -Original Message-
> > > From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, June 06, 2002 11:26 AM
> > > To: [EMAIL PROTECTED]
> > > Subject:
> > >
> > >
> > > WOW...very ambitious; as an ultra newbie Struts user, I
> > > especially like the idea of examples for ALL core tags.  Bless you ;-)
> > >
> > > DT
> > >
> > >
> > > -Original Message-
> > > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, June 05, 2002 4:23 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Handling check for logged-inness using a tag?
> > >
> > >
> > > LOLok
> > >
> > > here's my notes
> > >
> > > h

Struts and cookies

2002-06-06 Thread Brian Holzer

Hi all,
   I am hoping that this is an easy question.  I have ActionA, jspA and ActionB.  In 
ActionA I add a cookie to the response passed into the perform() method.

 Cookie cookie1 = new Cookie( "SGI", "autodev01" );
 response.addCookie( cookie1 );

  Then I exit ActionA with the following command

 return( mapping.findForward( fwd ) ); 

I am then forwarded to jspA where I enter some search criteria and press the submit 
button which forwards to ActionB.  In ActionB I use some displays to show the contents 
of the request passed into the perform() method 

  System.out.println( "OUTPUTTING HEADERS: " );
Enumeration enum = request.getHeaderNames();
while ( enum.hasMoreElements() ) {
   String k = (String) enum.nextElement();
   Object v = request.getHeader( k );
   System.out.println( "Key: " + k + "  Value: " + v.toString() );
} // end of while

 Cookie sgiCookie[] = request.getCookies();
 System.out.println( "OUTPUTTING COOKIES: " );
 int w = 0;
 while( w < sgiCookie.length ){
System.out.println( "Cookie number " + w );
System.out.println( "Cookie name: " + sgiCookie[w].getName() );
System.out.println( "Cookie value: " + sgiCookie[w].getValue() );
System.out.println( "---" );
w++;
 }

but the cookie I added is not there.  The only cookie still there is the jsessionid 
cookie.  I am using Silverstream 3.7.3 app server.

Does anyone know why my cookie is dissappearing?  or am I somehow not adding it in the 
right place? 

Thanks
Brian


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: wishlist

2002-06-06 Thread James Mitchell

LOLI knowI dreaming..but one day mind you...;)

I cannot tell you how many hours of my life have been wasted coding the same
SH#T over and over again in ASP and COM.  From 1997 to 2000ish I thought I
was the ASP/COM KING!  No doubt this was also at the height on the .bomb
era (I mean .com)

Then I started learning this cool thing called “Java Web Application
Development with Struts” (I believe that’s also a book title somewhere right
Ted??? ;)

I remember (this happened a few times) picking up the phone and ordering
dinner for a few other developers and myself from Dominoes.  We were working
on a getting a nice new enhancement out the door by that week.  Only one
problem, Dominoes had closed for the night, it was 3 AM!!!

Sometime early last year, I sat down and rewrote an application that I had
done for a client (originally in ASP).  I duplicated the functionality, but
wrote it in Java (w/Struts no doubt).

   ASP  Struts
Lines of code 1257   148
*includes html, css, but not comments

Features that were not in the ASP version:
*logging
*connection pooling

That was with a pre 1.0 version when I was still working with Chuck at
NetVendor.  I’m sure it could have been fewer lines, but I was new to this
whole Struts business thing :-)
This doesn’t even show the time savings by using tiles and the validator.
Anyway, this is only one of several reasons why I put on my signature line
“Struts Evangelist”.


Anyway, I hope to complete my wish list be the end of the week.  If anyone
cares to add to the list, I’ll add a section on there for you.

I’m not sure how this (wishes/plans) all correlates to what the other
developers/committers are doing with proposals and such.  One thing I’ve
noticed is that the pages on the struts site are not consistent as far as
layout and links.

Anyone else notice this too???

I had planned to re-write the struts-example that ships with the binary and
source dist, but I’ve seen evidence that I’m not the first to tackle this.
I hate doing doing duplicate work (that’s why I’m here) so if anyone else
(Ted, Vic, James, anyone) is going to do this, please tell me so I can focus
on something else.

Ted, Vic, and Bryan are you doing anything with the struts site on
sourceforge?
I had been looking around last month for a place to post samples and docs,
then I found your site.  I left a msg in public forums, but there’s no
activity.  Would care to add me as a member/developer?  I’d like to offer my
web hosting services to any of your projects.  It’s a DSL with static IP.
Not the most robust bandwidth I know, but hey, its free!!!  Well, I have to
pay for the line, but that’s minimal compared to what I get in return.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 3:48 PM
> To: Struts Users Mailing List
> Subject: RE: wishlist
>
>
>
>
>
> Gee -
>
> If I didn't know better, I'd say James has gotten a pretty good start on
> the Struts 2.0 requierments document -
>
>
>
>
>
>
> "James Mitchell" <[EMAIL PROTECTED]> on 06/06/2002 02:32:44 PM
>
> Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
>
> To:   "Thigpen, David" <[EMAIL PROTECTED]>
> cc:   "Struts Users Mailing List" <[EMAIL PROTECTED]> (bcc:
>   Kevin Bedell/Systems/USHO/SunLife)
> Subject:  RE: wishlist
>
>
> I'm only 1/3 done with those notes/wishes.stay tuned.
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> ICQ: 27651409
> AOLIM: jmitchtx (and NO I don't use AOL;)
>
>
> > -Original Message-
> > From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 06, 2002 11:26 AM
> > To: [EMAIL PROTECTED]
> > Subject:
> >
> >
> > WOW...very ambitious; as an ultra newbie Struts user, I
> > especially like the idea of examples for ALL core tags.  Bless you ;-)
> >
> > DT
> >
> >
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 05, 2002 4:23 PM
> > To: Struts Users Mailing List
> > Subject: RE: Handling check for logged-inness using a tag?
> >
> >
> > LOLok
> >
> > here's my notes
> >
> > http://www.open-tools.org/wishlist.jsp
> >
> > I've been editing/adding for a few hours now, check back every so
> > often, it'
> > s getting bigger as the day goes on.
> >
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > Struts-Atlanta, the "Open Minded Developer Network"
> > http://struts-atlanta.open-tools.org
> >
> > > -Original Message-
> > > From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, June 05, 2002 2:58 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Handling ch

nested img

2002-06-06 Thread Keith Chew

Hi

I was wondering why isn't there a  tag?

I want to have a nested image with a link, ie:



Is there an alternative?

I could do


but it creates an ugly border around the image...

Thanks
Keith


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Back button skip a page?

2002-06-06 Thread Bartley, Chris P

Check out the javascript method "location.replace()"...i think that'll do
exactly whatcha want.

If i remember/understand correctly, i think your wait page could do a


location.replace("results.htm");


So, then, on results.htm, clicking the back button should indeed go to the
form page since the wait page was never added to the history.

chris

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 4:26 PM
> To: [EMAIL PROTECTED]
> Subject: Back button skip a page?
> 
> 
> Jerome, 
> 
> This may have only limited usefulness, but you may be able 
> use the document's history object to skip the "wait" page in 
> the browser's history.
> Something like: (Javascript)
>   window.history.go(-2)
> but I'm not exactly sure how to detect the event that the 
> user clicks the back button.
> 
> "Jerome Jacobsen" <[EMAIL PROTECTED]> wrote:
> 
> >This may not be possible, but I hope it is.  I have a "Your 
> request is being
> >processed, please wait.." page.  Once the user gets to the 
> results page and
> >hit their browser's Back button I want to skip that "Wait" page.
> >
> >Here is the page flow:
> >Form Page -> Wait Page -> Results Page
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   

>For additional commands, e-mail:

>
>


__
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: form validation

2002-06-06 Thread Noah Levitt

I'm nearly certain that the order is not guaranteed. 

You may want to use the "indexed" attribute of html: form
fields. 
http://husted.com/struts/resources/indexed-tags.htm

Here's a message I sent earlier today on the subject:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32975.html
You'll want to use String[] instead of Vector, of course.

Noah


On Thu, Jun 06, 2002 at 05:36:10PM -0400, [EMAIL PROTECTED] wrote:
> This input tag was listed first on the page and it is coming back first in the array 
>on the submit...  I don't know if the ordering is guaranteed, but so far so good.
> 
> Noah Levitt <[EMAIL PROTECTED]> wrote:
> 
> >Hello,
> >
> >I don't know the answer to your question, but I have a
> >question for you. How do you know the that the value
> >submitted from the input field
> >
> >property="foo[1]"/>
> >
> >will go into foo[1] and not some other index of foo?
> >
> >Noah
> >
> >
> >On Thu, Jun 06, 2002 at 05:05:10PM -0400, [EMAIL PROTECTED] wrote:
> >> I solved the scope problem on my form bean and have a new problem :)
> >> 
> >> I have a property in the form bean which is a String[].  I have several text 
>input fields on the JSP all using the same property name.  However I want the values 
>for each of the text areas to be initialized to a particular index of this property.
> >> 
> >> My JSP tags look like this: (where foo is the String[] property)
> >> 
> >> property="foo[1]"/>
> >> 
> >> Should work right? But my text fields are initiated with ->           
> "[Ljava.lang.String;@448d"
> >> 
> >> Seems like it's displaying the pointer instead of the value...which is initially 
>a blank String.
> >> 
> >> How can I correct?
> >> 
> >> Thanks
> >
> >--
> >To unsubscribe, e-mail:   
> >For additional commands, e-mail: 
> >
> >
> 
> 
> __
> Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
>convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
> 
> Get your own FREE, personal Netscape Mail account today at 
>http://webmail.netscape.com/
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Back button skip a page?

2002-06-06 Thread James Mitchell

You are trying to change the behavior of the users browser.
My best advice

Don’t do that!

Maybe you can salvage a hack from this
http://developer.irt.org/script/311.htm

Best of luck!!!

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 4:57 PM
> To: Struts User
> Subject: Back button skip a page?
>
>
> This may not be possible, but I hope it is.  I have a "Your
> request is being
> processed, please wait.." page.  Once the user gets to the
> results page and
> hit their browser's Back button I want to skip that "Wait" page.
>
> Here is the page flow:
> Form Page -> Wait Page -> Results Page
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: form validation

2002-06-06 Thread mtstruts

This input tag was listed first on the page and it is coming back first in the array 
on the submit...  I don't know if the ordering is guaranteed, but so far so good.

Noah Levitt <[EMAIL PROTECTED]> wrote:

>Hello,
>
>I don't know the answer to your question, but I have a
>question for you. How do you know the that the value
>submitted from the input field
>
>property="foo[1]"/>
>
>will go into foo[1] and not some other index of foo?
>
>Noah
>
>
>On Thu, Jun 06, 2002 at 05:05:10PM -0400, [EMAIL PROTECTED] wrote:
>> I solved the scope problem on my form bean and have a new problem :)
>> 
>> I have a property in the form bean which is a String[].  I have several text input 
>fields on the JSP all using the same property name.  However I want the values for 
>each of the text areas to be initialized to a particular index of this property.
>> 
>> My JSP tags look like this: (where foo is the String[] property)
>> 
>> property="foo[1]"/>
>> 
>> Should work right? But my text fields are initiated with ->           
> "[Ljava.lang.String;@448d"
>> 
>> Seems like it's displaying the pointer instead of the value...which is initially a 
>blank String.
>> 
>> How can I correct?
>> 
>> Thanks
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Back button skip a page?

2002-06-06 Thread mtstruts

Jerome, 

This may have only limited usefulness, but you may be able use the document's history 
object to skip the "wait" page in the browser's history.
Something like: (Javascript)
  window.history.go(-2)
but I'm not exactly sure how to detect the event that the user clicks the back button.

"Jerome Jacobsen" <[EMAIL PROTECTED]> wrote:

>This may not be possible, but I hope it is.  I have a "Your request is being
>processed, please wait.." page.  Once the user gets to the results page and
>hit their browser's Back button I want to skip that "Wait" page.
>
>Here is the page flow:
>Form Page -> Wait Page -> Results Page
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: form validation

2002-06-06 Thread Noah Levitt

Hello,

I don't know the answer to your question, but I have a
question for you. How do you know the that the value
submitted from the input field



will go into foo[1] and not some other index of foo?

Noah


On Thu, Jun 06, 2002 at 05:05:10PM -0400, [EMAIL PROTECTED] wrote:
> I solved the scope problem on my form bean and have a new problem :)
> 
> I have a property in the form bean which is a String[].  I have several text input 
>fields on the JSP all using the same property name.  However I want the values for 
>each of the text areas to be initialized to a particular index of this property.
> 
> My JSP tags look like this: (where foo is the String[] property)
> 
> property="foo[1]"/>
> 
> Should work right? But my text fields are initiated with ->
>"[Ljava.lang.String;@448d"
> 
> Seems like it's displaying the pointer instead of the value...which is initially a 
>blank String.
> 
> How can I correct?
> 
> Thanks

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Back button skip a page?

2002-06-06 Thread Roy Truelove

Maybe in your "show results" action, a session variable can be set that the
person saw the results.  Then if they go to the "Request is being processed"
page, the page can check to see the the results were seen, and if yes,
automatically redirect to the results page.  You'll probably have to make
sure that the "Request is being processed" page is not cached.. set the
cache-control header to "no-cache".

Hope this helps,
Roy

- Original Message -
From: "Jerome Jacobsen" <[EMAIL PROTECTED]>
To: "Struts User" <[EMAIL PROTECTED]>
Sent: Thursday, June 06, 2002 4:56 PM
Subject: Back button skip a page?


> This may not be possible, but I hope it is.  I have a "Your request is
being
> processed, please wait.." page.  Once the user gets to the results page
and
> hit their browser's Back button I want to skip that "Wait" page.
>
> Here is the page flow:
> Form Page -> Wait Page -> Results Page
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: form validation

2002-06-06 Thread mtstruts

I solved the scope problem on my form bean and have a new problem :)

I have a property in the form bean which is a String[].  I have several text input 
fields on the JSP all using the same property name.  However I want the values for 
each of the text areas to be initialized to a particular index of this property.

My JSP tags look like this: (where foo is the String[] property)



Should work right? But my text fields are initiated with ->
"[Ljava.lang.String;@448d"

Seems like it's displaying the pointer instead of the value...which is initially a 
blank String.

How can I correct?

Thanks


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Back button skip a page?

2002-06-06 Thread Jerome Jacobsen

This may not be possible, but I hope it is.  I have a "Your request is being
processed, please wait.." page.  Once the user gets to the results page and
hit their browser's Back button I want to skip that "Wait" page.

Here is the page flow:
Form Page -> Wait Page -> Results Page



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts PowerPoint presentation

2002-06-06 Thread Anders Rosén

Hi,

I will teach JSP for a group of ASP developers next week. Nice challenge
;-) I have the Java and JSP material ready to go, but I would like to
introduce MVC as good way of building (web) applications. And what could
be better than to use Struts as a reference for the architecture.

Preparing and compiling training material is tedious, and that's why I
post here. Has anyone on the list compiled a PowerPoint on Struts?
Covering the basics, including some basics about coding and
configuration of Struts? And who wants to share the work?

"Every PowerPoint presentation is true, for certain values of true"

Regards,
/Anders


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: wishlist

2002-06-06 Thread Kevin . Bedell




Gee -

If I didn't know better, I'd say James has gotten a pretty good start on
the Struts 2.0 requierments document -






"James Mitchell" <[EMAIL PROTECTED]> on 06/06/2002 02:32:44 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "Thigpen, David" <[EMAIL PROTECTED]>
cc:   "Struts Users Mailing List" <[EMAIL PROTECTED]> (bcc:
  Kevin Bedell/Systems/USHO/SunLife)
Subject:  RE: wishlist


I'm only 1/3 done with those notes/wishes.stay tuned.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 11:26 AM
> To: [EMAIL PROTECTED]
> Subject:
>
>
> WOW...very ambitious; as an ultra newbie Struts user, I
> especially like the idea of examples for ALL core tags.  Bless you ;-)
>
> DT
>
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 4:23 PM
> To: Struts Users Mailing List
> Subject: RE: Handling check for logged-inness using a tag?
>
>
> LOLok
>
> here's my notes
>
> http://www.open-tools.org/wishlist.jsp
>
> I've been editing/adding for a few hours now, check back every so
> often, it'
> s getting bigger as the day goes on.
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
>
> > -Original Message-
> > From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 05, 2002 2:58 PM
> > To: Struts Users Mailing List
> > Subject: RE: Handling check for logged-inness using a tag?
> >
> >
> > waiting anxiously ;-)
> >
> > timeframe?
> >
> > DT
> >
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 05, 2002 11:00 AM
> > To: Brian Holzer
> > Cc: Struts Users Mailing List
> > Subject: RE: Handling check for logged-inness using a tag?
> >
> >
> > Ok, better yet, let me drop it on my server.
> >
> > Here's the url for those interested.
> > Stay tuned though, the struts-example is about to get
> > better..trust me.
> >
> > http://struts-atlanta.open-tools.org/struts-example-jsp-mod.zip
> >
>
>


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







---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Struts Tips] #2 - Template Method Dispatch Action?

2002-06-06 Thread Robert Taylor

So if I had an Action that handled the following operations on an
account:

-createAccount
-retrieveAccount
-updateAccount
-deleteAccount

instead of having these 4 methods defined, in a single action class, you
would define a business bean in the action mapping and something similar to
the following operations would take place in sequence when the Action
was invoked.

-The Action class accesses business bean (creates or retrieves).
-The Action class converts (directly or indirectly) user input into
expected business input arguments .
-The Action class invokes business bean hotspot method with business
arguments.
-The business bean processes input and performs the appropriate command
logic.
-The business bean returns a business bean return object.
-The Action class processes the business bean return object to determine
the ActionForward.
-The Action class returns ActionForward to the web controller.

So you might end up having business beans/delegates like
CreateAccountCommand, RetrieveAccountCommand, UpdateAccountCommand, and
DeleteAccountCommand, instead of separate Action classes or a single
Action class with the four methods. Each of the four business beans
might then delegate to a common business service called something like
IAccountService to handle or delegate processing.

Did I interpret that correctly?

robert



> -Original Message-
> From: Molitor, Stephen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 2:46 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [Struts Tips] #2 - Template Method Dispatch Action?
>
>
> Yes, you're absolutely right.  The business bean approach is less
> connected
> to the web tier, for better or worse, and does not have to be a Singleton
> (didn't think of that one).   The framework approach is closer to the web
> tier.  The two approaches are similar in some respects, but different in
> others, and have different consequences in terms of convenience and reuse.
> I guess what I really meant is that they are not mutually
> exclusive.  If the
> common logic can be cleanly separated from the web tier, then the business
> bean approach makes more sense, as it's more reusable.  If the
> logic is tied
> to the web tier, then framework approach makes more sense as it's more
> convenient to access the web tier.  One could use both approaches in the
> same app, on a case by case basis.
>
> One question:  Do your business beans typically implement the
> business logic
> directly, or do they forward to another existing businesses tier (EJB's,
> whatever)?  If they forward, then they're kind of like business delegates.
> This is the situation I was thinking of when I said the framework and
> business bean approaches seemed similar.  The business delegate
> layer might
> be somewhat reusable outside a web app, but the real reusable
> logic would be
> in the true business backend that the business delegate forwards to.  In
> this case, it might partially be a style issue which to use.  Putting the
> mapping and delegating to the business backend logic in separate business
> delegate ('business bean') classes would be a bit more reusable, and more
> configurable, but would add another layer.  Putting this logic in
> framework
> actions might be a tad more convenient, but slightly less reusable.
>
> This business bean approach sounds really interesting.  It sounds like a
> business bean is a business tier version of an Action.   It has a known
> input type, similar to ActionForm, a known return type, similar to
> ActionForward, and a known signature, similar to Action.perform.
> One could
> introduce a business tier version of the ActionServlet controller, that
> could call business logic validation methods on the input object, manage
> transactions, etc.  In other words, apply the command and controller
> patterns to the business tier.  Cool!
>
> Steve Molitor
> [EMAIL PROTECTED]
>
>
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 9:50 AM
> To: Struts Users Mailing List
> Subject: Re: [Struts Tips] #2 - Template Method Dispatch Action?
>
>
> "Molitor, Stephen" wrote:
> > The business bean and framework +
> > approaches actually seem pretty similar to me.  The only difference is
> > whether the main extension point is a separate class, or a method of the
> > action class.  In either case the extension point is specified in the
> > configuration file.
>
>
> I would say that the consequences of the business bean approach include
>
> + the beans can be reused outside of a web application
> + a bean can be instantiated for every request or could be designed as a
> singleton
> + access to web-tier resources is indirect at best
> + business-beans can nest other business beans
>
>
> Consequences of the framework approach include
>
> + the framework Action is bound to Struts
> + the framework Action is always a singleton, instantiated once for the
> life of the application, a

RE: problems in displaying updated data..

2002-06-06 Thread Galbreath, Mark

Put the vector in request or session scope instead of page scope.

-Original Message-
From: Susmita Pati [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 3:15 PM
To: 'Struts Users Mailing List'
Subject: problems in displaying updated data..


Hi all

I have a jsp in which i display the data retrieved from a vector.
There is a column which I also update. How do i display the updated data in
my jsp without hitting the database again. (I want to update the vector that
I have on the pagecontext after i have updated the database).

Any thoughts, suggestions and solutions would be highly appreciated.
thanks

susmita

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




problems in displaying updated data..

2002-06-06 Thread Susmita Pati

Hi all

I have a jsp in which i display the data retrieved from a vector.
There is a column which I also update. How do i display the updated data in
my jsp without hitting the database again. (I want to update the vector that
I have on the pagecontext after i have updated the database).

Any thoughts, suggestions and solutions would be highly appreciated.
thanks

susmita

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Struts Tips] #2 - Template Method Dispatch Action?

2002-06-06 Thread Molitor, Stephen

Yes, you're absolutely right.  The business bean approach is less connected
to the web tier, for better or worse, and does not have to be a Singleton
(didn't think of that one).   The framework approach is closer to the web
tier.  The two approaches are similar in some respects, but different in
others, and have different consequences in terms of convenience and reuse.
I guess what I really meant is that they are not mutually exclusive.  If the
common logic can be cleanly separated from the web tier, then the business
bean approach makes more sense, as it's more reusable.  If the logic is tied
to the web tier, then framework approach makes more sense as it's more
convenient to access the web tier.  One could use both approaches in the
same app, on a case by case basis.

One question:  Do your business beans typically implement the business logic
directly, or do they forward to another existing businesses tier (EJB's,
whatever)?  If they forward, then they're kind of like business delegates.
This is the situation I was thinking of when I said the framework and
business bean approaches seemed similar.  The business delegate layer might
be somewhat reusable outside a web app, but the real reusable logic would be
in the true business backend that the business delegate forwards to.  In
this case, it might partially be a style issue which to use.  Putting the
mapping and delegating to the business backend logic in separate business
delegate ('business bean') classes would be a bit more reusable, and more
configurable, but would add another layer.  Putting this logic in framework
actions might be a tad more convenient, but slightly less reusable.  

This business bean approach sounds really interesting.  It sounds like a
business bean is a business tier version of an Action.   It has a known
input type, similar to ActionForm, a known return type, similar to
ActionForward, and a known signature, similar to Action.perform.  One could
introduce a business tier version of the ActionServlet controller, that
could call business logic validation methods on the input object, manage
transactions, etc.  In other words, apply the command and controller
patterns to the business tier.  Cool!

Steve Molitor
[EMAIL PROTECTED]


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 9:50 AM
To: Struts Users Mailing List
Subject: Re: [Struts Tips] #2 - Template Method Dispatch Action?


"Molitor, Stephen" wrote:
> The business bean and framework +
> approaches actually seem pretty similar to me.  The only difference is
> whether the main extension point is a separate class, or a method of the
> action class.  In either case the extension point is specified in the
> configuration file.


I would say that the consequences of the business bean approach include

+ the beans can be reused outside of a web application
+ a bean can be instantiated for every request or could be designed as a
singleton
+ access to web-tier resources is indirect at best
+ business-beans can nest other business beans


Consequences of the framework approach include 

+ the framework Action is bound to Struts
+ the framework Action is always a singleton, instantiated once for the
life of the application, and must be thread-safe
+ the framework Action has direct access to web-tier resources
+ forwarding or including other Actions involves outside agents, like
Struts and the container, which may introduce their own behaviours

Others?

"Molitor, Stephen" wrote:
> 
> Why are the Framework and Dispatch approaches mutually exclusive?  It
seems
> like you could do both -- have a base action with extension points (hot
> spots), and the main hotspot method (i.e. 'executeLogic') could optionally
> be a dispatch method.  This would help with create/update/delete
operations,
> where all the logic is the same except for which db operation to perform.
> Of course it's not the only way to do it -- the 'business bean' approach
you
> mention, where the mapping specifies the business class, would also work
> nicely.  But the framework + dispatch approach could cut down on the
number
> of classes (business bean or action).  The business bean and framework +
> approaches actually seem pretty similar to me.  The only difference is
> whether the main extension point is a separate class, or a method of the
> action class.  In either case the extension point is specified in the
> configuration file.
> 
> Steve Molitor
> 
> > I believe the Dispatch and Template (or Framework) class approaches may
> > be mutally exclusive. The idea of the Dispatch class is that you can
> > vector to an arbitrary method. The idea of a Framework class, like
> > SuperAction uses, is that a known entry method calls a number of
> > hotspots (or extension points) that you can override.
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 01, 2002 7:31 AM
> To: Struts Users Mailing List
> Subject: Re: [Struts Tip

RE: Handling check for logged-inness using a tag?

2002-06-06 Thread James Mitchell

http://struts-atlanta.open-tools.org/struts-example-jsp-mod.zip

check back in a few days as I am still modifying the example with other
functionality off of my wishlist.

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Umberto Nicoletti [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 1:46 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Handling check for logged-inness using a tag?
>
>
> Il mer, 2002-06-05 alle 02:17, James Mitchell ha scritto:
> > Well, that's the magic in it.
> > You never see the url with WEB-INF.
> >
> > Since we are using a "forward" and not a "redirect", the
> control thread can
> > go anywhere (its not a request from the browser).
> >
> > This forces the user to interact with your web app by using *ONLY* the
> > actions you've defined.
> > They can now no longer call a jsp directly (whether it would
> have given an
> > error or not)
> >
> > I'll send it to you personally.
> >
> > If anyone else would like a copy, just let me know
>
> Hi James,
> I would really appreciate if you could send me that...
> Thank you so much!
>
> Umberto
>
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > > -Original Message-
> > > From: Adam Hardy [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 04, 2002 4:27 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Handling check for logged-inness using a tag?
> > >
> > >
> > > That would be grand. I'm just having problems visualising a
> URL to a jsp
> > > in WEB-INF.
> > >
> > > Thanks
> > > Adam
> > >
> > > James Mitchell wrote:
> > >
> > > >I've modified the struts-example to do this.
> > > >
> > > >Would you care for a copy of the zip?
> > > >
> > > >James Mitchell
> > > >Software Engineer\Struts Evangelist
> > > >
> > > >
> > > >
> > > >
> > > >>-Original Message-
> > > >>From: Adam Hardy [mailto:[EMAIL PROTECTED]]
> > > >>Sent: Monday, June 03, 2002 4:00 PM
> > > >>To: Struts Users Mailing List
> > > >>Subject: Re: Handling check for logged-inness using a tag?
> > > >>
> > > >>
> > > >>What does the forward to a jsp that's in the WEB-INF look like?
> > > >>
> > > >>Adam
> > > >>
> > > >>James Mitchell wrote:
> > > >>
> > > >>
> > > >>
> > > >>>Assuming that the location of the jsp were decided for you, I
> > > would think
> > > >>>that you wouldn't want anyone hitting a 'struts-ified' jsp
> > > regardless of
> > > >>>authentication.  I think these are separate issues.
> > > >>>
> > > >>>I know with the QA at my last job, they would try just about
> > > >>>
> > > >>>
> > > >>anything to get
> > > >>
> > > >>
> > > >>>a stack trace in the browser.  I think they prided themselves
> > > on how many
> > > >>>bugs they could log against us.  Almost they acted as if
> they were paid
> > > >>>bonus' for logged defects.
> > > >>>
> > > >>>Personally, I don't like the idea of adding unnecessary
> tags in my jsp,
> > > >>>especially if it does functionality that could/should be
> in the action
> > > >>>class.  Ultimately, its up to you, that's what makes
> Struts so awesome.
> > > >>>
> > > >>>James Mitchell
> > > >>>Software Engineer\Struts Evangelist
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > -Original Message-
> > > From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> > > Sent: Sunday, June 02, 2002 2:43 PM
> > > To: Struts Users Mailing List
> > > Subject: Handling check for logged-inness using a tag?
> > > 
> > > 
> > > If you aren't going to put your JSPs inside the WEB-INF
> layer, would
> > > it be a good idea to do the check for a user being logged in by a
> > > simple tag at the top of each JSP?  This way at least if
> someone tries
> > > to type in a url to a jsp they would be redirected to log in?
> > > 
> > > --
> > > 
> > > Rick
> > > 
> > > mailto:[EMAIL PROTECTED]
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > >>>--
> > > >>>To unsubscribe, e-mail:
> > > >>>
> > > >>>
> > > >
> > > >
> > > >
> > > >>For additional commands, e-mail:
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > >>
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > >--
> > > >To unsubscribe, e-mail:
> > > >
> > > >For additional commands, e-mail:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:

> For additional commands, e-mail:

>




--
To unsubscribe, e-mail:   
For additio

RE: wishlist

2002-06-06 Thread Robert Taylor

Rock on James! Cool stuff.

robert

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 2:33 PM
> To: Thigpen, David
> Cc: Struts Users Mailing List
> Subject: RE: wishlist
>
>
> I’m only 1/3 done with those notes/wishes.stay tuned.
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> ICQ: 27651409
> AOLIM: jmitchtx (and NO I don’t use AOL;)
>
>
> > -Original Message-
> > From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 06, 2002 11:26 AM
> > To: [EMAIL PROTECTED]
> > Subject:
> >
> >
> > WOW...very ambitious; as an ultra newbie Struts user, I
> > especially like the idea of examples for ALL core tags.  Bless you ;-)
> >
> > DT
> >
> >
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 05, 2002 4:23 PM
> > To: Struts Users Mailing List
> > Subject: RE: Handling check for logged-inness using a tag?
> >
> >
> > LOLok
> >
> > here's my notes
> >
> > http://www.open-tools.org/wishlist.jsp
> >
> > I've been editing/adding for a few hours now, check back every so
> > often, it'
> > s getting bigger as the day goes on.
> >
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > Struts-Atlanta, the "Open Minded Developer Network"
> > http://struts-atlanta.open-tools.org
> >
> > > -Original Message-
> > > From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, June 05, 2002 2:58 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Handling check for logged-inness using a tag?
> > >
> > >
> > > waiting anxiously ;-)
> > >
> > > timeframe?
> > >
> > > DT
> > >
> > > -Original Message-
> > > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, June 05, 2002 11:00 AM
> > > To: Brian Holzer
> > > Cc: Struts Users Mailing List
> > > Subject: RE: Handling check for logged-inness using a tag?
> > >
> > >
> > > Ok, better yet, let me drop it on my server.
> > >
> > > Here's the url for those interested.
> > > Stay tuned though, the struts-example is about to get
> > > better..trust me.
> > >
> > > http://struts-atlanta.open-tools.org/struts-example-jsp-mod.zip
> > >
> >
> >
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




image buttons and dispatching events

2002-06-06 Thread Robert Taylor

I want to be able to processes similar events with a single Action class. I
know the Struts framework provides both DispatchAction and
LookupDispatchAction. All my events where method=post are invoked with an
input element of type image. The request parameters for such an element are
name.x and name.y with their corresponding values being the respective
coordinates of the image where it was clicked. If I weren't using image
buttons but rather submit buttons, then the LookupDispatchAction is what I
would need. But since I'm using image buttons and not submit buttons,
neither DispatchAction can handle dispatching to the appropriate
handler. ( Correct me if I'm missing something obvious here)

The logical premise in both DispatchAction and LookupDispatchAction  is a
known request parameter which will contain a value which is either the
explicite method to invoke or is the key to the explicite method to invoke.
Since image buttons parameter values are just x-y coordinates, then they
provide no such information.

A client-side solution would be to use Javascript, to set a particular value
when the image is clicked.

A server-side solution would be to provide a comma delimited list of
possible user gestures (ie. cancel, save, delete) in the parameter attribute
of the action element. A subclass of DispatchAction, call it
ImageButtonDispatchAction, captures and parses those values, and then looks
for the first one that appears as a request parameter name + ".x" . If
found, it invokes the approapriate method.





Is there a more elegant solution for this?


robert


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: wishlist

2002-06-06 Thread James Mitchell

I’m only 1/3 done with those notes/wishes.stay tuned.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 11:26 AM
> To: [EMAIL PROTECTED]
> Subject:
>
>
> WOW...very ambitious; as an ultra newbie Struts user, I
> especially like the idea of examples for ALL core tags.  Bless you ;-)
>
> DT
>
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 4:23 PM
> To: Struts Users Mailing List
> Subject: RE: Handling check for logged-inness using a tag?
>
>
> LOLok
>
> here's my notes
>
> http://www.open-tools.org/wishlist.jsp
>
> I've been editing/adding for a few hours now, check back every so
> often, it'
> s getting bigger as the day goes on.
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
>
> > -Original Message-
> > From: Thigpen, David [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 05, 2002 2:58 PM
> > To: Struts Users Mailing List
> > Subject: RE: Handling check for logged-inness using a tag?
> >
> >
> > waiting anxiously ;-)
> >
> > timeframe?
> >
> > DT
> >
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 05, 2002 11:00 AM
> > To: Brian Holzer
> > Cc: Struts Users Mailing List
> > Subject: RE: Handling check for logged-inness using a tag?
> >
> >
> > Ok, better yet, let me drop it on my server.
> >
> > Here's the url for those interested.
> > Stay tuned though, the struts-example is about to get
> > better..trust me.
> >
> > http://struts-atlanta.open-tools.org/struts-example-jsp-mod.zip
> >
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: subscribe to ASUG mailing list

2002-06-06 Thread James Mitchell

http://groups.yahoo.com/group/struts-atlanta/

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don’t use AOL;)


> -Original Message-
> From: Hertzel Karbasi - OPTinity eBusiness Solutions
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 5:45 AM
> To: James Mitchell
> Subject: subscribe to ASUG mailing list
>
>
> Hi james
>
> How can I subscribe to ASUG mailing list?
>
> Thanks
> Hertzel
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: BasicDataSource

2002-06-06 Thread wbchmura


If you are using IE, when it gives you the error, do View Source...

(If you don't have navigator)

-Original Message-
From: Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 11:24 AM
To: struts-user
Subject: RE: BasicDataSource


But you can't see it with IE - use Navigator.

-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 10:29 AM

Oops, here's the link to the DTD.

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd

-james

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Problem with Logic-iterate and enumeration (2)

2002-06-06 Thread Galbreath, Mark

Or perhaps something like?

<%! int count = 0 %>

  

  

  
  <% count += 3 %>


Mark

-Original Message-
From: struts (H2Opilot) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 10:40 AM

hi,
I have a List of Numbers and I like to use 3 columns and n rows.

Is there a possible way to realise this via Logic-iteration.

Normally, it look like that every next step in the iteration there is
always another row.

Like this:




  
  

  

  
** this should be the next element of Data, but how increment the
element??  *
   
  

  




any ideas?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: mapping

2002-06-06 Thread Joseph Barefoot

I have 2 or 3 ways:

The first is to place a boolean value into the request/session from your
summary Action and check for it in your JSP, something like
cameFromSummaryPage="true".  Or you can put a request type variable in the
request/session to check instead, something like requestType="Summary" or
requestType="init", you know?

If you're looking for something more generic to be used with all your JSPs,
you could add a hidden field to every form which contains the page name or a
logical identifier for the page.  Every ActionForm would have a field to
contain this value.  So, you have a hidden field with these pairs:
name="pageName" value="mySummaryPage.jsp".  Then you just have a field (with
getter/setter) named "pageName" in every ActionForm as well, and voila,
every ActionForm now knows what page it was invoked from.  You can easily
check these values from your JSP and take action accordingly.

Of course, you can get the URI for the last request from the ActionMapping
and store that in the form bean, too, and use it as the identifier for your
JSPs.  It's up to you.

happy coding,

Joe

> -Original Message-
> From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 10:40 AM
> To: Struts Users Mailing List
> Subject: RE: mapping
>
>
> I keep that to myself, if you know how to do it, I'd appreciate
> your answer
> and help, otherwise thanks!
>
> Carlos Fernandez
> www.s1.com
>
> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 1:09 PM
> To: 'Struts Users Mailing List'
> Subject: RE: mapping
>
>
> Why do you need to know which page invokes the data entry page?
>
> -Original Message-
> From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 12:00 PM
> To: Struts
> Subject: mapping
>
>
> Hi There,
>
> Can someone tell me the best way to know which page I am coming from?. I
> have a clue using mapping object in the action class. This is the
> scenario :
> The first page is a data entry one. Once you put the fields you click
> continue and go to the summary one that will ask to confirm the
> values just
> entered. This second page has two buttons "edit" and "continue".
>
> If I click "edit" button, I have to come back to the first page with the
> values I entered before in the fields. The question is : The
> first page gets
> invoked from two different pagesthe previous one (that invokes it the
> first time) and from the summary one. I need to know which page
> invoked it.
> Any ideas?
>
> Carlos Fernandez
> www.s1.com 
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




SQL STatements in a Properties file.

2002-06-06 Thread Olikkadavath, Bobby

Hi,
A newbie question...
I want to dynamically pickup SQL queries from a Properties file (Similar to
how we use the bean : Message  and the ApplicationResourceProperties FIle
for Static content in a JSP).
Does the framework have an implementation exclusively for this or should I
create something on my own.

Thanks
Bobby



RE: mapping

2002-06-06 Thread Leonardo Maciel

request.getHeader("referer");returns the URL of the caller page.
 
or you can set different property names "previous" and "summary" on your html:submit 
button
 

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:54 PM
To: 'Struts Users Mailing List'
Subject: RE: mapping


The reason I ask is, to return to the previous page, just use
onclick="javascript:history.go(-1)."  If you really need to know the URI of
the requesting page, go through an action mapping and get it from the
servlet Request object from an action class (see the API).

Mark

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:40 PM

I keep that to myself, if you know how to do it, I'd appreciate your answer
and help, otherwise thanks!

Carlos Fernandez
www.s1.com

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:09 PM

Why do you need to know which page invokes the data entry page?

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:00 PM
To: Struts
Subject: mapping


Hi There,

Can someone tell me the best way to know which page I am coming from?. I
have a clue using mapping object in the action class. This is the scenario :
The first page is a data entry one. Once you put the fields you click
continue and go to the summary one that will ask to confirm the values just
entered. This second page has two buttons "edit" and "continue".

If I click "edit" button, I have to come back to the first page with the
values I entered before in the fields. The question is : The first page gets
invoked from two different pagesthe previous one (that invokes it the
first time) and from the summary one. I need to know which page invoked it.
Any ideas?

Carlos Fernandez
www.s1.com 



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: mapping

2002-06-06 Thread Galbreath, Mark

The reason I ask is, to return to the previous page, just use
onclick="javascript:history.go(-1)."  If you really need to know the URI of
the requesting page, go through an action mapping and get it from the
servlet Request object from an action class (see the API).

Mark

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:40 PM

I keep that to myself, if you know how to do it, I'd appreciate your answer
and help, otherwise thanks!

Carlos Fernandez
www.s1.com

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:09 PM

Why do you need to know which page invokes the data entry page?

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:00 PM
To: Struts
Subject: mapping


Hi There,

Can someone tell me the best way to know which page I am coming from?. I
have a clue using mapping object in the action class. This is the scenario :
The first page is a data entry one. Once you put the fields you click
continue and go to the summary one that will ask to confirm the values just
entered. This second page has two buttons "edit" and "continue".

If I click "edit" button, I have to come back to the first page with the
values I entered before in the fields. The question is : The first page gets
invoked from two different pagesthe previous one (that invokes it the
first time) and from the summary one. I need to know which page invoked it.
Any ideas?

Carlos Fernandez
www.s1.com 



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: mapping

2002-06-06 Thread Sri Sankaran

You can pass some identifying information along with the request.  If you are coming 
from outside of the application (first case) you won't have this in the request, 
otherwise you will.

SS

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:40 PM
To: Struts Users Mailing List
Subject: RE: mapping


I keep that to myself, if you know how to do it, I'd appreciate your answer
and help, otherwise thanks!

Carlos Fernandez
www.s1.com

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:09 PM
To: 'Struts Users Mailing List'
Subject: RE: mapping


Why do you need to know which page invokes the data entry page?

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:00 PM
To: Struts
Subject: mapping


Hi There,

Can someone tell me the best way to know which page I am coming from?. I
have a clue using mapping object in the action class. This is the scenario :
The first page is a data entry one. Once you put the fields you click
continue and go to the summary one that will ask to confirm the values just
entered. This second page has two buttons "edit" and "continue".

If I click "edit" button, I have to come back to the first page with the
values I entered before in the fields. The question is : The first page gets
invoked from two different pagesthe previous one (that invokes it the
first time) and from the summary one. I need to know which page invoked it.
Any ideas?

Carlos Fernandez
www.s1.com 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Problem with Logic-iterate and enumeration

2002-06-06 Thread Galbreath, Mark

This seems like a kludge, but I don't know of another way of doing it with
Struts tags.  Anybody else?


  

  


 
   
  
  


  
  
  


  * * * 
do for how many more groups of 3 numbers you anticipate
will only print out if data is present
  * * *



Empty  tags shouldn't bloat table space.

Mark

-Original Message-
From: struts (H2Opilot) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 10:40 AM

hi,
I have a List of Numbers and I like to use 3 columns and n rows.

Is there a possible way to realise this via Logic-iteration.

Normally, it look like that every next step in the iteration there is
always another row.

Like this:




  
  

  

  
** this should be the next element of Data, but how increment the
element??  *
   
  

  




any ideas?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html -- img, link, map and parameters question with Struts

2002-06-06 Thread Sundar

Hello,

I used Struts one year back for an application and didn't have a chance 
to use it again till now.

My question is how do I put the following code in struts format and get 
to the action class.


 
   
   

The link is supposed to take to an Action class with a key=value pair -- 
tester=etts

Any help is appreciated.

Sundar



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: mapping

2002-06-06 Thread Carlos Fernandez

I keep that to myself, if you know how to do it, I'd appreciate your answer
and help, otherwise thanks!

Carlos Fernandez
www.s1.com

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:09 PM
To: 'Struts Users Mailing List'
Subject: RE: mapping


Why do you need to know which page invokes the data entry page?

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:00 PM
To: Struts
Subject: mapping


Hi There,

Can someone tell me the best way to know which page I am coming from?. I
have a clue using mapping object in the action class. This is the scenario :
The first page is a data entry one. Once you put the fields you click
continue and go to the summary one that will ask to confirm the values just
entered. This second page has two buttons "edit" and "continue".

If I click "edit" button, I have to come back to the first page with the
values I entered before in the fields. The question is : The first page gets
invoked from two different pagesthe previous one (that invokes it the
first time) and from the summary one. I need to know which page invoked it.
Any ideas?

Carlos Fernandez
www.s1.com 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Dynamic Criteria

2002-06-06 Thread Olikkadavath, Bobby

Hi,
We are in the process of converting a NetDynamics application into J2EE with
the Struts Framework.
The NetDynamics has a CSPSelect which can be used to add Dynamic Criteria.
As the criteria's are added it is stored into a properties file. It is also
appended to a StringBuffer.
The final SQL during execute will pickup all the criteria info and compose a
Query.

What can be the J2EE/Struts mapping for such an Object.

Thanks
Bobby



Re: form validation

2002-06-06 Thread mtstruts

Okay Strutters, 

I'm trying to solve the problem of losing my form data if the validate() function 
finds an error.  I have seen in this list that people have suggested having:

A) 2 actions each with it's own action mapping, one called before the form is rendered 
on the JSP (instantiating the corresponding form bean) and action for after the form 
is submitted.

B) 1 action with 2 action mappings (???) - How does the app know which action mapping 
to use?  Am I passing a parameter?

So I have tried the first solution, but I'm getting an error on the JSP which says 
that my form bean is not in scope.  My action mappings are as follows:











Is it something obvious?  How would I implement option 2?

Thanks in advance
-
Two ActionMappings, one with validate=false and the other with
validate=true. 

One Action class should be sufficient, though. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services



__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: mapping

2002-06-06 Thread Galbreath, Mark

Why do you need to know which page invokes the data entry page?

-Original Message-
From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:00 PM
To: Struts
Subject: mapping


Hi There,
 
Can someone tell me the best way to know which page I am coming from?. I
have a clue using mapping object in the action class. This is the scenario :
The first page is a data entry one. Once you put the fields you click
continue and go to the summary one that will ask to confirm the values just
entered. This second page has two buttons "edit" and "continue".
 
If I click "edit" button, I have to come back to the first page with the
values I entered before in the fields. The question is : The first page gets
invoked from two different pagesthe previous one (that invokes it the
first time) and from the summary one. I need to know which page invoked it.
Any ideas? 
 
Carlos Fernandez
www.s1.com  




Re: Problem with Logic-iterate and enumeration

2002-06-06 Thread dhay



I hate using scriptlets, but had to do so in the end for the problem - although
could have made a custom tag I guess.  Here's what I do:

  
 


   

   <%
  //insert rows where necessary
  int categoriesInRow = 3;
  if ((index.intValue() > 0 && ((index.intValue()+1)
 % categoriesInRow == 0)))
  {
   %>


   <%
  }
   %>

 
 
  

HTH,

cheers,

Dave




"struts (H2Opilot)" <[EMAIL PROTECTED]> on 06/06/2002
10:40:07 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>; Please respond to
  [EMAIL PROTECTED]

To:   "Struts Users Mailing List"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Problem with Logic-iterate and enumeration




hi,
I have a List of Numbers and I like to use 3 columns and n rows.

Is there a possible way to realise this via Logic-iteration.

Normally, it look like that every next step in the iteration there is
always another row.

Like this:




  
  

  

  
** this should be the next element of Data, but how increment the
element??  *
   
  

  




any ideas?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




MessageResources

2002-06-06 Thread Anthony Martin

Are there any plans to make the Struts MessageResources, in the utility 
package, part of Jakarta Commons?  I find myself using this feature in 
areas other than servlet development.  I also see a need to use it in 
applets so that the JSPs and applets use the same ApplicationResources.  
No luck with the applets due to security, but stand-alone GUI 
applications seem to work with it fine.  What are your thoughts about 
this?


Anthony

To decode this comment into a readable form, rot13 it twice.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Collection and form bean

2002-06-06 Thread Ted Husted

You probably want there to be a collection of beans, and a helper method
on the bean that returns a blank instead of 0. Then all the JSP has to
do is call the helper, without having to know anything about the blank
or 0 requirement. 

In a case like this, whether the bean object itself was born in a model
package or controller package isn't pertinent. The page is only bound to
the property name, not the object. You could switch the bean object at
any time, and so long as the property name stayed the same, the page
would be none the wiser.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

Jayaraman Dorai wrote:
> 
> I have a collection of Value objects which I iterate through the logic iterate in 
>JSP. This value object has a int. The requirement is to display a blank instead of a 
>0. I can convert this value object into a form bean which has a string equivalent for 
>this int and replace a 0 with an empty string. But the idea of iterating over a 
>collection of form beans doesn't sound well for me. Is that ok?
> 
> In the struts example, the collection of subscription is iterated and not the 
>subscriptionForm. If subscription had an int attribute would it be wise to iterate 
>through the collection of subscriptionForm. Which is more MVC? The jsp page iterating 
>over the model object or the form object.
> 
> Jayaraman

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: (newbie) WAR files and JDeveloper 3.2.3

2002-06-06 Thread Honman Lee

I dont have much experience with different IDEs but Jdev doesnt seem to bad.  I have 
seen it generate the war file but I havent just tried to run a war file.  You might 
want to think of creating a project then unzipping 
(/jdev/mywork/projectfolder) it in a project and then let Jdev recompile 
it. 

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 9:22 PM
To: Struts Users Mailing List
Subject: RE: (newbie) WAR files and JDeveloper 3.2.3


No, I don't use JDeveloper, but you can try to extract the war into the
directory.

Good Luck

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Glen Mazza [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 12:11 AM
> To: [EMAIL PROTECTED]
> Subject: (newbie) WAR files and JDeveloper 3.2.3
>
>
> Hello,
>
> I was able to run the sample .WAR (struts-blank.war,
> struts-example.war, etc.) files on Tomcat just by
> placing them under its "webapps" directory.
>
> However, I would like to use Oracle JDeveloper's
> default IDE servlet container.  However, placing it
> under the JDeveloper 3.2.3\myhtml\webapp directory
> doesn't appear to work.  I don't know if the
> JDeveloper IDE can work with .WAR files.  Has anyone
> been able to get Struts' sample .WAR files to work
> with JDeveloper?
>
> Thanks,
> Glen
>
> _
> Do You Yahoo!?
> Información de Estados Unidos y América Latina, en Yahoo! Noticias.
> Visítanos en http://noticias.espanol.yahoo.com
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts Generator

2002-06-06 Thread @Basebeans.com

Subject: Re: Struts Generator
From: "alt.cybercafes" <[EMAIL PROTECTED]>
 ===
Interested in using your Struts Generator but I keep getting the following
error messages:

"Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/velocity/context/Context"

My "layout\lib" countain all required jars. I had version 1.3 of velocity at
first, I later switch to velocity-dep-1.2.jar and still get the same errors.
I am using the latest xerces parser "xercesImpl.jar". Do you have any ideas
what's going on.?


"Azrul Azwar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi Matt,
>
> Thanks for trying. I haven't try Velocity 1.3, but if it is similar to
> the 1.2 version, it should have velocity-x.x.jar and
> velocity-dep-x.x.jar files. Use the velocity-dep.x.x.jar, and update the
> run.bat file. Hope this will work.
>
> -roel-
>
>
> ===
>
> Subject: Re: Struts Generator
> From: "Matt Raible" <[EMAIL PROTECTED]>
>  ===
> You've got my interest.  When I try to run this tool, however, I get the
> following error:
>
> D:\Tools\karapan>run.bat test.xml
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/commons/collections/ExtendedProperties
>at
> org.apache.velocity.runtime.RuntimeInstance.(RuntimeInstance.java:
> 203)
> at
> org.apache.velocity.runtime.RuntimeSingleton.(RuntimeSingleton.j
> ava:150)
> at org.apache.velocity.app.Velocity.init(Velocity.java:149)
> at
> com.javanovic.karapansapi.strutsgen.StrutsGenerator.generateFiles(Struts
> Generator.java:61)
> at
> com.javanovic.karapansapi.strutsgen.StrutsGenerator.main(StrutsGenera
> tor.java:40)
> D:\Tools\karapan>
>
>
> I am using:
> struts 1.1 b1
> castor-0.9.3.9
> velocity-1.3-rc1
> xerces-1_4_4
>
> on Windows XP with JDK 1.3.1_01
>
> Thanks,
>
> Matt
>
> __
> Do You Yahoo!?
> Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts Forms, ConvertUtils and Validation - need design advice

2002-06-06 Thread Peter Onthrops


I have a form that has one attribute - an instance of a value object. The object has 
multiple attributes that make up the form elements. These attributes are not all 
Strings and therefore ConvertUtils converts them to Strings for display on the jsp. 
When posting the html form, ConvertUtils attempts to convert the input Strings back to 
the proper object Types. If the input string is not in the .toString() format of the 
object, then an conversion exception is thrown. 

Does this mean that I would need to have all input attributes of type String? That is, 
unless I modify ConvertUtils to accept multiple string formats for my objects. What is 
the standard practice for creating form attributes that are not Strings (i.e. 
Timestamp), populating them, and validating them. Correct me if I'm wrong, but it 
seems that the validator assumes a String attribute for validation.

Thanks in advance,

P.



-
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup


Re: Multiple pararmeters from multiple links

2002-06-06 Thread Mark Nichols


- Original Message -
From: "Sri Sankaran" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, June 06, 2002 10:10 AM
Subject: RE: Multiple pararmeters from multiple links


>
> While I don't have an answer to your question, I have an alternative.
>
> An alternate strategy would be to include a getParameters() method in the
object you are iterating over.  This method should have access to the
current values of the id, firstName and lastName.  It would return a Map
containing the necessary parameters.  Your  would then be:
>
> name="nameSearchResults"
>property="parameters"/>
>

Much nicer indeed! Thank you


>
> Hope this helped.


Yes it did!


mark n.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mapping

2002-06-06 Thread Carlos Fernandez



Hi 
There,
 
Can someone tell me 
the best way to know which page I am coming from?. I have a clue using mapping 
object in the action class. This is the scenario : The first page is a data 
entry one. Once you put the fields you click continue and go to the summary one 
that will ask to confirm the values just entered. This second page has two 
buttons "edit" and "continue".
 
If I click "edit" 
button, I have to come back to the first page with the values I entered 
before in the fields. The question is : The first page gets invoked from 
two different pagesthe previous one (that invokes it the first time) and 
from the summary one. I need to know which page invoked it. Any ideas? 

 
Carlos 
Fernandez
www.s1.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: struts and excel

2002-06-06 Thread Jerome Jacobsen

Try adding out.clear() right before changing content type.  Like this:

<%
out.clear();
response.setContentType("application/vnd.ms-excel");
%>

-Original Message-
From: yanming lu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 11:45 AM
To: [EMAIL PROTECTED]
Subject: Re: struts and excel


Could you show me what is wrong in the following code?
-
<%
response.setContentType("application/vnd.ms-excel");
%>

Excel-Export



1997
2000
1999


12.3
13.4
15.6




--
This displays the file as HTML page instead of opening an excel file.


>From: "Roy Truelove" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: struts and excel
>Date: Thu, 6 Jun 2002 11:37:04 -0400
>
>Struts has nothing builtin for this (as far as I know).  Excel can read
>HTML
>tables however, so if your JSP's create a standard , and you set
>your
>content type :
>
>response.setContentType("application/vnd.ms-excel");
>
>the browser should know to open it with Excel.
>
>Take it easy,
>Roy
>
>- Original Message -
>From: "yanming lu" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, June 06, 2002 11:00 AM
>Subject: struts and excel
>
>
> > How to display an excel file in struts?
> >
> > _
> > MSN Photos is the easiest way to share and print your photos:
> > http://photos.msn.com/support/worldwide.aspx
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>


_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Assertions

2002-06-06 Thread Jennings, Christofer J.

Very good reasons! I'd sure like to see this feature supported as you
describe. 
It might also be nice to have global asserts for things like user 
authentication/authorization.

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 8:07 AM
To: Struts Users Mailing List
Subject: RE: Assertions


Yep, that may be the approach I take although it circumvents the front
controller. Not necessarily a bad thing. It just disperses business logic,
configuratin, and, in event that the assertion fails, navigation logic. It
would be nice to have this all reside within the front controller and
configurable via one source (the struts-config file).

robert



> -Original Message-
> From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 10:26 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Assertions
>
>
> How about using filters?



RE: Flash and Struts

2002-06-06 Thread micael

Imagine for a moment that you want to do things with the Java files 
"involved" with the images that are well-placed in a Model 2 architecture 
because you want to have that sort of relationship between the presentation 
and the other layers.  That is struts.  Stuts ain't just tags.

At 01:02 PM 6/6/2002 +0530, you wrote:
>The issue, again, is not the
>reference TO the swf files.  That is a piece of cake.  The issue is mainly
>the references FROM the swf files, that is a bit hairy.
>
>-- Aggreed..
>
>Again, the "talking" to the Flash can very well be a struts issue.  There
>are ways to do this that can be created, home-cooked, that make for really
>interesting applications, using i18n in Flash, for example.  Not that hard
>either.
>
>-- Disagree. I think that talking to Flash is not a struts issue. Your 
>basic point is that you want a DVO to talk to Flash and change its 
>parameters and vice versa right? That is purely understanding the Flash 
>file structure and manipulating it. I did a project once where we had to 
>play Flash files in a Java player by first parsing the Flash file 
>structure, making corresponding Java objects and finally playing them. It 
>was a nightmare to say the least. The whole point being, that it is very 
>Java centric and not Struts centric.
>
>Rgs
>V
>
>At 12:43 PM 6/6/2002 +0530, you wrote:
> >Ok I have not used Flash with struts but I would like to give this a
> >shot.. Apologies if this seems totally out of whack..
> >
> >Isn't Flash merely an embed in the jsp page? The browser does not know
> >that the current page is being driven by Flash + Struts. Sooo a Flash +
> >Struts development project would translate to developing your swf files,
> >embeding them into jsp's and then let struts handle the delivery.
> >
> >Of course, I dont know if we can talk to Flash directly and change data
> >within the Flash files. But then again thats a Java --> Flash topic and
> >not Struts --> Flash topic.
> >
> >My 2 cents..
> >V
> >
> >-Original Message-
> >From: micael [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, June 06, 2002 12:29 PM
> >To: Struts Users Mailing List
> >Subject: RE: Flash and Struts
> >
> >
> >Once again, Mark, you display your lack of knowledge about Flash.  I think
> >you must have learned about $.05 worth and think that is the whole
> >game.  You should suspect it is not.  Anyway, as we know, JSP pages are,
> >after all, servlets in the end, aren't they?
> >
> >
> >
> >At 05:32 PM 6/5/2002 -0400, you wrote:
> > >doh!
> > >
> > >Yeah, okay.  It's not a question about using Flash with Struts.  Rather,
> > >it's a question of using Flash with servlets.  And yes, you can, though I
> > >don't know how.  However, there was this guy named Pierre from France (go
> > >figure) on servlet-interest that was/is an expert, though I haven't 
> seen him
> > >post anything for months.  You can get on servlet-interest at
> > >java.sun.com/products/servlet.
> > >
> > >Was that better?  ;-)
> > >
> > >Mark
> > >
> > >-Original Message-
> > >From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> > >Sent: Wednesday, June 05, 2002 5:27 PM
> > >
> > >Well ... one more thing that we can't joke about, now that someone is
> > >actually looking to do this!
> > >
> > >Mark, I assume you'll be volunteering to beta test their application!? :-)
> > >
> > > >-Original Message-
> > > >From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> > > >Sent: Wednesday, June 05, 2002 4:05 PM
> > > >To: 'Struts Users Mailing List'
> > > >Subject: RE: Flash and Struts
> > > >
> > > >
> > > >Oh boy!  Just when I was getting bored, too!
> > > >
> > > >-Original Message-
> > > >From: Joe Rice [mailto:[EMAIL PROTECTED]]
> > > >Sent: Wednesday, June 05, 2002 5:03 PM
> > > >
> > > >I'm new to Flash but have still been charged with researching the
> > > >possibility of using Flash as the front end of a struts web
> > > >application that
> > > >
> > > >has already been built with JSP's.  Has anyone used Flash with
> > > >Struts, and
> > > >if so, do you have any suggestions, tutorials etc... you would
> > > >recommend?
> > > >
> > > >Thanks.
> > > >
> > > >--
> > > >To unsubscribe, e-mail:
> > > >
> > > >For
> > > >additional commands, e-mail:
> > >
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
> > >
> > >For additional commands, e-mail:
> > >
> > >
> > >--
> > >To unsubscribe,
> > e-mail:   
> > >For additional commands, e-mail:
> > 
> >
> >
> >--
> >To unsubscribe, 
> e-mail:   
> >For additional commands, e-mail: 
> 
> >
> >
> >--
> >To unsubscribe, 
> e-mail:   
> >For additional commands, e-mail: 
> 
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>--
>

RE: Need Advice using templates with Struts

2002-06-06 Thread Frost, Howard



Found the solution:

   
   




My HTML pages are made up of small rectangles of data which get reused
around the web site.  Each rectangle is painted from a bean.  Ideally, there
would be a paint action associated with each rectangle which populates this
bean and forwards to the jsp page for rendering the rectangle.  So far so
good.

To compose a given page, I would like to use  and/or struts
templating tags.  The 'page' for the include however need to be the paint
action rather than the jsp page so the bean is available.  But this
generates an IllegalStateException (in Tomcat4.0).  I do not want the action
for the top level page to be responsible for filling all the beans for all
the composite rectangles.  These rectangles are nested and cna change over
time.  Any suggestions?

This renders FolioViewFrag.jsp but the bean does not get populated:

 
  ...
 


This fails with IllegalStateException:

 
  ...
   


Tomcat exception:

 java.lang.IllegalStateException: Cannot forward after response has been
committed



**
This message, including any attachments, contains confidential information intended 
for a specific individual and purpose, and is protected by law.  If you are not the 
intended recipient, please contact sender immediately by reply e-mail and destroy all 
copies.  You are hereby notified that any disclosure, copying, or distribution of this 
message, or the taking of any action based on it, is strictly prohibited.
TIAA-CREF
**

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: BasicDataSource

2002-06-06 Thread Galbreath, Mark

But you can't see it with IE - use Navigator.

-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 10:29 AM

Oops, here's the link to the DTD.

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd

-james

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: No getter error

2002-06-06 Thread Sri Sankaran

Replying to my own post...

(Note to self) Take a good look at the the form action when an error is flagged with 
the form bean.

Turns out I had a wrong form action which pointed the framework to some other form 
bean which indeed didn't have any such getter.

Sigh!

SS

-Original Message-
From: Sri Sankaran 
Sent: Wednesday, June 05, 2002 4:59 PM
To: Struts-User (E-mail)
Subject:  No getter error


Using Struts 1.01b and Nesting extension on Win2k running Tomcat 4.0.3 

Could anyone point me to the reason why I am getting the following error?

No getter method for property products[0].name 

Situation:

Form bean is :

class DependenciesBean extends ActionForm {
  ..
  private ArrayList products;
  public Object[] getProducts() { return(products.toArray()); }
  ..
}

The collection products contains objects of type ProdDep

class ProdDep {
  ..
  private String name;
  public String getName() { return(name); }
  ..
}

The JSP is :
 <%-- Associated with form bean of type DependenciesBean --%>
  ..
  
..

..
  
  ..



  TIA

Sri


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: parametred name fields

2002-06-06 Thread Noah Levitt

Hello,

If I understand your question correctly, it is possible. You
need to use struts 1.1. In your ActionForm, you must have a
field that is a collection of some sort. E.g.

private Vector names;
public Vector getNames() { return names; }
// IIRC you don't you need a setter, could be wrong

The elements of "names" should be beans that have member
functions getName(), setName(String), getSurname(), and
setSurname(String).

Then, in your jsp, do this:


 
  Surname:
  
 
 
  Name:
  
 



Be sure to initialize "names" in your ActionForm's constructor
names = new Vector()
or you will get a null pointer exception.

You may also want to fill "names" with one or more empty
name beans so that you have some blank fields on your form
to start out with.

HTH
Noah



On Thu, Jun 06, 2002 at 01:54:07PM +0530, Sai Prasad Baba Subramanyan (Cognizant) 
wrote:
> I don't think this is possible in Struts.
> 
> -Original Message-
> From: Nicolas Lapenne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 01:51 PM
> To: Struts Users Mailing List
> Subject: Re: parametred name fields
> 
> 
> I know, but by this way I can't use the FormAction objects to fill the form.
> 
> - Original Message -
> From: "Sai Prasad Baba Subramanyan (Cognizant)" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, June 06, 2002 10:03 AM
> Subject: RE: parametred name fields
> 
> 
> Yes, as you can use HttpServletRequest parameter in public ActionErrors
> validate(ActionMapping mapping, HttpServletRequest request) method to do it.
> 
> -Sai
> 
> -Original Message-
> From: Nicolas Lapenne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 01:34 PM
> To: Struts Users Mailing List
> Subject: parametred name fields
> 
> 
> Hello,
> If I have a jsp file with an undeterminated number of components, how can I
> use the ActionForm validation with parametred name fields ? Is it possible
> with struts ? How ?
> 
> example :
> I want the user put the surname and name of n men in a form, and use a
> ActionForm
> without create n instance values.
> 
> *
> myFile.jsp
> *
> <%
>  int n = Integer.parseInt( (Integer) request.getAttribute("number"));
> 
>  for(int i=0, i %>
> 
> Surname :
> 
> 
> 
> 
> 
> Name :
> 
> 
> 
> 
> <% } %>
> 
> 
> **
> MyActionForm.java
> **
> package myStrutsProject.form;
> import javax.servlet.http.HttpServletRequest;
> import org.apache.struts.action.*;
> import myStrutsProject.commun.*;
> 
> public final class MyActionForm extends ActionForm {
> private String surname;
> private String name;
> 
> // Getters & Setters
> public String getSurname() {
> return surname;
>}
> 
> public String setName(String name) {
> this.name = name;
> }
> 
> public String getName() {
> return name;
>}
> 
> public String setName(String name) {
> this.name = name;
> }
> 
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request) {
> ActionErrors errors = new ActionErrors();
> if (surname = null || name = null) {
> errors.add("name and surname required", new
> ActionError("error.surnameAndNameRequired"));
> }
> return errors;
>  }
> }
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

> This e-mail and any files transmitted with it are for the sole use of the intended 
>recipient(s) and may contain confidential and privileged information.
> If you are not the intended recipient, please contact the sender by reply e-mail and 
>destroy all copies of the original message. 
> Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
>copying of this email or any action taken in reliance on this e-mail is strictly 
> prohibited and may be unlawful.
> 
>   Visit us at http://www.cognizant.com
> 

> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: I should know this, but....

2002-06-06 Thread Arron Bates

First off, no need for the name attribute. If it's not working off the 
same bean structure the other nested tags are, then use the original 
 tag using the name attribute to get to the separate bean.

Otherwise from face value the tag markup looks fine... you may want to 
vary the name of the property to the id for clarity however.


Another point which may save you having issues, is that you can use the 
"property" property like a directory structure with relative and 
absolute references...

Check this out for more informative info...

The "The relative references and the "property" property" part...

http://jakarta.apache.org/struts/api/org/apache/struts/taglib/nested/package-summary.html#doc.PropertyProperty


...with that you can just use the  tag where you need it, 
and use the absolute reference from the root of the bean to get to the 
right spot.

Hope any of this helps in some way.


Arron.



Jerry Jalenak wrote:

>Hi All,
>
>Really easy question, but I'm apparently too dumb to figure it out  ;)
>
>I get a run time error of 'Missing Term' (about var1 in the anchor tag) when
>I do the following:
>
>   
>   This is my anchor
>
>This is a simplistic example - I actually need to use 'var1' in several
>places throughout my jsp inside of deeper  tags.  Any ideas?
>
>Thanks!
>
>Jerry
>
>[EMAIL PROTECTED]
>
>This transmission (and any information attached to it) may be confidential and is 
>intended solely for the use of the individual or entity to which it is addressed. If 
>you are not the intended recipient or the person responsible for delivering the 
>transmission to the intended recipient, be advised that you have received this 
>transmission in error and that any use, dissemination, forwarding, printing, or 
>copying of this information is strictly prohibited. If you have received this 
>transmission in error, please immediately notify LabOne at (800)388-4675.
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Multiple pararmeters from multiple links

2002-06-06 Thread Sri Sankaran


While I don't have an answer to your question, I have an alternative.

An alternate strategy would be to include a getParameters() method in the object you 
are iterating over.  This method should have access to the current values of the id, 
firstName and lastName.  It would return a Map containing the necessary parameters.  
Your  would then be:




Hope this helped.

Sri

-Original Message-
From: Mark Nichols [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 10:56 AM
To: Struts User
Subject: Multiple pararmeters from multiple links


All -

I have a JSP which displays multiple rows of data. Each row starts with a
link based on the first column of data. The subsequent action class needs to
be passed the first three column values as parameters, like so:

/do/NameSearch/Details?id=123456?lastName=Smythe?firstName=Jon

In reading the archives I have come up with this:

[...snip...]




[...snip...]

 
  
  

  
 
  
  <%
   parms.put("id",request.getParameter("id")) ;
   parms.put("lastName",request.getParameter("lastName")) ;
   parms.put("firstName",request.getParameter("firstName")) ;
  %>
  

   
  
 
 
 
 
 
 

   
  

[...snip...]


However, when I compile this I get the following message:

JavaCompile: parms cannot be resolved.

How do I get the parms reference inside my iterate loop to resove?

TIA,

mark n.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Assertions

2002-06-06 Thread Robert Taylor

Yep, that may be the approach I take although it circumvents the front
controller. Not necessarily a bad thing. It just disperses business logic,
configuratin, and, in event that the assertion fails, navigation logic. It
would be nice to have this all reside within the front controller and
configurable via one source (the struts-config file).

robert



> -Original Message-
> From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 10:26 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Assertions
>
>
> How about using filters?
>
> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:12 AM
> To: [EMAIL PROTECTED]
> Subject: Assertions
>
> 1. Assertions that are common to all events.
> 2. Assertions that are common to a set of related events.
> 3. Assertions that are specific to an event.
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




struts and excel

2002-06-06 Thread yanming lu

How to display an excel file in struts?

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Multiple pararmeters from multiple links

2002-06-06 Thread Mark Nichols

All -

I have a JSP which displays multiple rows of data. Each row starts with a
link based on the first column of data. The subsequent action class needs to
be passed the first three column values as parameters, like so:

/do/NameSearch/Details?id=123456?lastName=Smythe?firstName=Jon

In reading the archives I have come up with this:

[...snip...]




[...snip...]

 
  
  

  
 
  
  <%
   parms.put("id",request.getParameter("id")) ;
   parms.put("lastName",request.getParameter("lastName")) ;
   parms.put("firstName",request.getParameter("firstName")) ;
  %>
  

   
  
 
 
 
 
 
 

   
  

[...snip...]


However, when I compile this I get the following message:

JavaCompile: parms cannot be resolved.

How do I get the parms reference inside my iterate loop to resove?

TIA,

mark n.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Re.Pool Connection DataBase

2002-06-06 Thread wbchmura


There was a notice for someone to take over poolman on the SourceForge 
site...

One of the things I liked about poolman was the SQL caching...  It made 
it really nice to have some tables be cached for days (such as drop down 
lists)...

-Original Message-
From: william.wws [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 10:32 AM
To: struts-user
Subject: Re.Pool Connection DataBase



Why the creator of the PoolMan is not supporting it anymore ?
The best practice should be use BasicDataSource ?
Thanks,
William.


>From: Struts Newsgroup (@Basebeans.com) <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re.Pool Connection DataBase
>Date: Thu, 6 Jun 2002 07:25:01 -0700
>
>Subject: Re.Pool Connection DataBase
>From: Vic C <[EMAIL PROTECTED]>
>  ===
>Best practice to post messages is to search first.
>
>I think very popular is
>http://sourceforge.net/project/showfiles.php?group_id=4899
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Struts Tips] #2 - Template Method Dispatch Action?

2002-06-06 Thread Ted Husted

"Molitor, Stephen" wrote:
> The business bean and framework +
> approaches actually seem pretty similar to me.  The only difference is
> whether the main extension point is a separate class, or a method of the
> action class.  In either case the extension point is specified in the
> configuration file.


I would say that the consequences of the business bean approach include

+ the beans can be reused outside of a web application
+ a bean can be instantiated for every request or could be designed as a
singleton
+ access to web-tier resources is indirect at best
+ business-beans can nest other business beans


Consequences of the framework approach include 

+ the framework Action is bound to Struts
+ the framework Action is always a singleton, instantiated once for the
life of the application, and must be thread-safe
+ the framework Action has direct access to web-tier resources
+ forwarding or including other Actions involves outside agents, like
Struts and the container, which may introduce their own behaviours

Others?

"Molitor, Stephen" wrote:
> 
> Why are the Framework and Dispatch approaches mutually exclusive?  It seems
> like you could do both -- have a base action with extension points (hot
> spots), and the main hotspot method (i.e. 'executeLogic') could optionally
> be a dispatch method.  This would help with create/update/delete operations,
> where all the logic is the same except for which db operation to perform.
> Of course it's not the only way to do it -- the 'business bean' approach you
> mention, where the mapping specifies the business class, would also work
> nicely.  But the framework + dispatch approach could cut down on the number
> of classes (business bean or action).  The business bean and framework +
> approaches actually seem pretty similar to me.  The only difference is
> whether the main extension point is a separate class, or a method of the
> action class.  In either case the extension point is specified in the
> configuration file.
> 
> Steve Molitor
> 
> > I believe the Dispatch and Template (or Framework) class approaches may
> > be mutally exclusive. The idea of the Dispatch class is that you can
> > vector to an arbitrary method. The idea of a Framework class, like
> > SuperAction uses, is that a known entry method calls a number of
> > hotspots (or extension points) that you can override.
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 01, 2002 7:31 AM
> To: Struts Users Mailing List
> Subject: Re: [Struts Tips] #2 - Template Method Dispatch Action?
> 
> "Molitor, Stephen" wrote:
> > As is, the DispatchAction in Struts 1.02  cool, but does not provide
> direct
> > support for eliminating or consolidating duplicate code from related
> tasks.
> > It's just a different style.  With DispatchAction, one can have one big
> > action class to handle related tasks, as opposed to  several little Action
> > classes.  However, related tasks often have some common logic that needs
> to
> > be performed for all the tasks, and other logic that is specific to each
> > task.  It would be cool if there was a DispatchAction that provided hooks
> > for the common logic.
> 
> For something similar, see the SuperAction in the Scaffold package.
> 
> http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/framework/
> main/org/apache/scaffold/http/SuperAction.java
> 
> I believe the Dispatch and Template (or Framework) class approaches may
> be mutally exclusive. The idea of the Dispatch class is that you can
> vector to an arbitrary method. The idea of a Framework class, like
> SuperAction uses, is that a known entry method calls a number of
> hotspots (or extension points) that you can override.
> 
> You could share common utility methods among various Dispatch methods by
> passing all needed parameters through the signature, but how to merge
> this idea with a framework class approach isn't jumping out at me.
> 
> The closest thing may to be use a relay action to forward the request to
> another Action based on a framework class. You then just override a
> business extension method on the framework Action (like
> SuperAction.ExecuteLogic). This doesn't reduce the number of Actions,
> but it does let you share as much code as possible
> 
> Personally, I use very few Struts Actions in an application. Instead I
> tend to specify a business class as part of the action mapping, and then
> have the Action call that, using a base Action like the above. The
> business beans have a hotspot method with a known signature. The Action
> just instantiates the business bean (like the ActionServlet instantiates
> a form bean), calls the signature, and copes with the result. (Just like
> the ActionServlet calls an Action.)
> 
> This trades Actions for business beans, but minimizes coupling to Struts
> and maximizes code reuse between platforms.
> 
> The Advanced Struts skeleton for Adalon, uses the same approach. (No
> surprise, I wrote it =

Re: Flash and Struts

2002-06-06 Thread John Nicholas

Joe Rice wrote:
> I'm new to Flash but have still been charged with researching the 
> possibility of using Flash as the front end of a struts web application 
> that has already been built with JSP's.  Has anyone used Flash with 
> Struts, and if so, do you have any suggestions, tutorials etc... you 
> would recommend?
> 
> Thanks.
> 

I do a lot of flash work so although I haven't used it with struts I 
think I have an idea of how this would be approached. Basically you are 
going to want to replace the JSP views with Flash views. This means you 
will lose the taglibs that are for specifically handling html forms 
because you are now using flash form elements which are slightly 
different. On the other hand, Flash gives you more programming control 
so you can do the validation in place.

For those who don't do much Flash work, a Flash can load other flash 
movies so rather than continually loading new html pages that contain a 
new flash movie you would be loading in new sub-movies. I think you 
would want it to work something like this:

Flash form -> Struts FormBean -> Action -> return new Flash sub movie 
with response

So the only part that is new is the response is a new dynamically 
created flash movie loaded into the container flash movie instead of new 
jsp loaded into the browser.

There is an open source project called jgenerator at www.flashgap.com. 
Though it has now been commercialized at www.jzox.com the original is 
under an apache style license. Usually used for online dynamic flash 
generation it can also act as API for a servlet to dynamically create 
flash movies.

The end result would be instead of a form getting an html response you 
would use the Flash LoadMovie() command to load a swt (Flash Template) 
file. So you would have struts return the swt instead of a jsp. The swt 
then loads the servlet/jsp/whatever-creates-a-data-text-file to get the 
data it needs.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Problem with Logic-iterate and enumeration

2002-06-06 Thread struts (H2Opilot)


hi,
I have a List of Numbers and I like to use 3 columns and n rows.

Is there a possible way to realise this via Logic-iteration.

Normally, it look like that every next step in the iteration there is
always another row.

Like this:




  
  

  

  
** this should be the next element of Data, but how increment the
element??  *
   
  

  




any ideas?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Flash and Struts

2002-06-06 Thread Daniel Jaffa

I am sick and tired of reading about flash and struts so i decide to do some
research for you
Looking at macromedia i found this about flash mx:
Develop Macromedia Flash services using Macromedia ColdFusion MX,

Java and Microsoft .Net. Macromedia Flash MX applications can easily

invoke logic and get data from services built and deployed on Macromedia

ColdFusion MX Server. Macromedia Flash can also use services built with

standard Java Servlets, Java Classes, EJBs, and Microsoft's .NET

components.


Check out the following link  (ps i found in on google)
http://www.virtual-fx.net/tutorials/html/flashjavaservlets.html



- Original Message -
From: "Galbreath, Mark" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, June 06, 2002 7:59 AM
Subject: RE: Flash and Struts


> I'm missing your barb...did I not just admit I don't know how this is
done,
> and directed the query to someone who would?  Care to play again?
>
> -Original Message-
> From: micael [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 2:59 AM
>
> Once again, Mark, you display your lack of knowledge about Flash.  I think
> you must have learned about $.05 worth and think that is the whole
> game.  You should suspect it is not.  Anyway, as we know, JSP pages are,
> after all, servlets in the end, aren't they?
>
>
> At 05:32 PM 6/5/2002 -0400, you wrote:
> >
> >Yeah, okay.  It's not a question about using Flash with Struts.  Rather,
> >it's a question of using Flash with servlets.  And yes, you can, though I
> >don't know how.  However, there was this guy named Pierre from France (go
> >figure) on servlet-interest that was/is an expert, though I haven't seen
> him
> >post anything for months.  You can get on servlet-interest at
> >java.sun.com/products/servlet.
> >
> >Mark
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re.Pool Connection DataBase

2002-06-06 Thread William W


Why the creator of the PoolMan is not supporting it anymore ?
The best practice should be use BasicDataSource ?
Thanks,
William.


>From: Struts Newsgroup (@Basebeans.com) <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re.Pool Connection DataBase
>Date: Thu, 6 Jun 2002 07:25:01 -0700
>
>Subject: Re.Pool Connection DataBase
>From: Vic C <[EMAIL PROTECTED]>
>  ===
>Best practice to post messages is to search first.
>
>I think very popular is
>http://sourceforge.net/project/showfiles.php?group_id=4899
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: BasicDataSource

2002-06-06 Thread James Holmes

Oops, here's the link to the DTD.

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd

-james

--- James Holmes <[EMAIL PROTECTED]> wrote:
> Take a look at the config file DTD for info on how
> to
> configure  elements in the config file.
> 
> The Struts Console software also makes easy work of
> doing this:
> 
> http://www.jamesholmes.com/struts/
> 
> -james
> [EMAIL PROTECTED]
> 
> 
> --- Ricardo de Souza Moura
> <[EMAIL PROTECTED]>
> wrote:
> > How Can I configure the parameters of
> > BasicDataSource at the datasource tag 
> > in struts_config.xml ?
> > 
> >
>
_
> > Converse com amigos on-line, conheça o MSN
> > Messenger: 
> > http://messenger.msn.com
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> >
> 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: BasicDataSource

2002-06-06 Thread James Holmes

Take a look at the config file DTD for info on how to
configure  elements in the config file. 
The Struts Console software also makes easy work of
doing this:

http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]


--- Ricardo de Souza Moura <[EMAIL PROTECTED]>
wrote:
> How Can I configure the parameters of
> BasicDataSource at the datasource tag 
> in struts_config.xml ?
> 
>
_
> Converse com amigos on-line, conheça o MSN
> Messenger: 
> http://messenger.msn.com
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Assertions

2002-06-06 Thread Jennings, Christofer J.

How about using filters?

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 7:12 AM
To: [EMAIL PROTECTED]
Subject: Assertions

1. Assertions that are common to all events.
2. Assertions that are common to a set of related events.
3. Assertions that are specific to an event.



Re.Pool Connection DataBase

2002-06-06 Thread @Basebeans.com

Subject: Re.Pool Connection DataBase
From: Vic C <[EMAIL PROTECTED]>
 ===
Best practice to post messages is to search first.

I think very popular is 
http://sourceforge.net/project/showfiles.php?group_id=4899


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Assertions

2002-06-06 Thread Robert Taylor

I'm using Struts 1.0, and have a process with a set of related event
handlers which I have grouped into a single DispatchAction class. Each
event has a set of assertions (some similar, some different) which must pass
before any (even form validation) processing occurs.

I have basically broken down the assertions into 3 categories:

1. Assertions that are common to all events.
2. Assertions that are common to a set of related events.
3. Assertions that are specific to an event.

Assertions that fall under the first category can be checked at
processPreprocess() level or using some Filter and circumvents any
processing if it fails.

Assertions that fall under the last two categories cannot be handled before
anything else related to the event gets processed. That is, assertions that
fall under category 2 would usually be handled by some SuperAction template
method, but the ActionForm is processed before the SuperAction gets
processed. And assertions that fall under category 3 could be handled at the
Action level, but is post ActionForm processing as well.

I guess, one way to handle this using standard Struts components, would be
to use Action chaining. Certain Action classes could act as wrappers around
an assertion or a group of assertions. The action mapping would
not define a form and would merely forward to the target handler or another
assertion upon successful processing. If the assertion failed, then it would
forward to the appropriate location.

I can see where this could potentially create quite a complex action mapping
definition in the struts-config file for a set of related events.

For example, creating a user account where assertions 1 and 2 must pass
before processing the request.


   
   



   
   



   
   



A potential problem here is the /do/user/account/create action could be
invoked directly, circumventing
the assertions.



Is it too convoluted to think that it might be nice to have something like
the following:


   
   
   
   



In this configuration, the assertions would be processed in order they
appear in the action element, and iff they all pass, then other processing
would proceed. The path attribute in each assertion element defines the url
to forward/redirect to if the assertion fails.

The assertion checks would either come after processing the mapping in
ActionServlet for Struts 1.0.x or
after role checking in the RequestProcessor in Struts 1.1x, in either case,
directly before processing the form.

I have been looking at the LivingLogic's Workflow Extension which contains
an authentication mechanism, but it doesn't appear to offer the forwarding
granularity that I need and I'm forced to extend their Action class.

My ultimate goal here is to have reusable assertions, be able to
declaratively define them and their order, and to isolate business
processing from assertions.


Is there a more elegant solution for this?


robert



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




BasicDataSource

2002-06-06 Thread Ricardo de Souza Moura

How Can I configure the parameters of BasicDataSource at the datasource tag 
in struts_config.xml ?

_
Converse com amigos on-line, conheça o MSN Messenger: 
http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >