Bean not in scope

2002-07-18 Thread Adarsh

Can someone tell me when this error comes

javax.servlet.ServletException: bean login  not found within scope 
I am stuck up in it

Adarsh Gupta
Software Engineer
Patni Computer Systems Limited
SDF-7, 4th Floor, Unit 17, SEEPZ
Tel : (022)-8290479/8291454  Extn : 5741 
Mobile : 9820224341
www.patni.com
World-Wide Partnerships.World-Class Solutions.





Re: how to Internationalized submit button?

2002-07-18 Thread Tadashi Ishikawa
You can use hidden field and Javascript.


function setAction(target) {
document.forms[0].actionName.value=target;
}


$B!D(B








Hoang, Hai wrote:

>I want to internationalize the submit buttons on a form and I don't know how
>to do it.  Currently, I mapped the value on the submit button to the
>property actionName in the ActionForm class.  Base on the button the use
>clicked, I handle it propriately in the Action class, just like event
>handling mechanism.  Now if I internationalize these buttons (property="actionName"/>, the
>value will change and my Action class will no longer work.  Is there a way
>to work around this problem?
>
>To be specific, following is the detail about my setup
>
>1. jsp page:
>
>
>
>
>
>2. actionForm class:
>
>public String getActionName() 
>{
>   return actionName;
>}
>
>public void setActionName( String actionName) 
>{
>   this.actionName = actionName;
>}
>
>
>3. action class:
>
>ApplicationForm applicationForm = (ApplicationForm)form;
>String action = applicationForm.getActionName();
>if (action == null)
>{
>   action = Constants.BUTTON_CANCEL;
>}
>
>if (action.equals(Constants.BUTTON_CANCEL))
>{
>   applicationForm.setActionName(null);
>   doAdd(mapping, applicationForm, request, response);
>}
>else if (action.equals(Constants.BUTTON_ADD)) 
>{
>doAdd(mapping, applicationForm, request, response);
>}
>else if (action.equals(Constants.BUTTON_SAVE)) 
>{
>doSave(mapping, applicationForm, request, response);
>}
>else if (action.equals(Constants.BUTTON_EDIT) || 
>   action.equals(Constants.BUTTON_REMOVE)) 
>{
>doEdit(mapping, applicationForm, request, response);
>}
>else if (action.equals(Constants.BUTTON_UPDATE)) 
>{
>doUpdate(mapping, applicationForm, request, response);
>}
>else if (action.equals(Constants.BUTTON_DELETE)) 
>{
>doDelete(mapping, applicationForm, request, response);
>}
>
>Thank you for your help
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>
>


Re: Need some help

2002-07-18 Thread hemant


No, it is a "trivialize the complexity" tactic which makes you feel good
momentarily.

all in jest
hemant


- Original Message -
From: "avinash" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, July 19, 2002 1:14 AM
Subject: Re: Need some help


> hi ,
> i don't know how some people say that they are new to the new and can ask
> such complex questions. ;-) is it humility ?
>
>
> - Original Message -
> From: "Asit Kumar Padhi" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 18, 2002 3:29 PM
> Subject: Need some help
>
>
> > All,
> >
> > I am new to the Struts Framework.I am involved in extending the
framework
> > for "Object Mapping" and "Testing" (Cactus or JUnit).Can anyone tell me
> how
> > to extend the Struts framework and integrate them.I want some good
> resources
> > in this regards.
> >
> > Thanks
> >
> > Asit
> >
> >
>
>
> --
--
> 
>
>
> > --
> > 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 some help

2002-07-18 Thread avinash

hi ,
i don't know how some people say that they are new to the new and can ask
such complex questions. ;-) is it humility ?


- Original Message -
From: "Asit Kumar Padhi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 3:29 PM
Subject: Need some help


> All,
>
> I am new to the Struts Framework.I am involved in extending the framework
> for "Object Mapping" and "Testing" (Cactus or JUnit).Can anyone tell me
how
> to extend the Struts framework and integrate them.I want some good
resources
> in this regards.
>
> Thanks
>
> Asit
>
>






> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



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




property="this/" VS property="something" in nested:iterate

2002-07-18 Thread hemant

Here is a snippet from my JSP


//Start of Snippet///



 

  
.
...
  
   - 
  

//End of Snippet///

Now the getters work fine. The setters for some reason do not work. Yes, I
have my reset() method and it is as follows

public void reset(ActionMapping mapping, HttpServletRequest request)
{
if (this.collectionOfRanges == null)
{
HttpSession session = request.getSession();
MpiServiceBean msb =
(MpiServiceBean)
session.getAttribute(MpiConstants.MPI_SERVICE_BEAN);

this.collectionOfRanges = msb.getRanges();
}
}

So the collectionOfRanges  is populated before the page is fired up and it
is expected that this method is called before Submit data is fed into
collectionOfRanges .

But for some reason, the setter() methods are not being called.

Is this because of having



instead of



???


If that is true, then it would mean I need a bean for every property that I
want to set. Isnt that cumbersome?

Thanks in Advance
hemant












- Original Message -
From: "hemant" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 6:11 PM
Subject: Re: Setter Methods not being called in nested:iterate scenario :+(


> Adam
> Thanks for responding..
>
> The Actionform (rangesform) itself is my root and I have a collection
> reference "collectionOfPairs" in "rangesform",  replete with getter/setter
> methods.
>
> The collectionOfPairs is instantiated and populated. If not, I would not
be
> seeing the page with the correct data. right?
>
> As I said earlier, the getters work, the setters do not work. All this
> inspite of having the bean in the form.
>
> Thanks
> hemant
>
>
> - Original Message -
> From: "Adam Hardy" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 18, 2002 4:39 PM
> Subject: Re: Setter Methods not being called in nested:iterate scenario
:+(
>
>
> > nested tags / indexed properties / nested beans gotcha. You have to
> > instantiate the beans yourself in the form reset() if you want to
> > capture the indexed properties.
> >
> >
> > [this answer was automated, virtually]
> >
> > hemant wrote:
> > > Comrades,
> > >
> > > I am trying to Iterate over a Collection of Collections of
ValueObjects
> and after some real painful experimentation (With VA 3.5.3 + Apache Tomcat
+
> Poolman ), I got the page to come up properly :). So far so good. I went
out
> and celebrated for a few minutes...
> > >
> > > The getter methods seem to work fine. But the user data is not being
> captured on Submit :(
> > >
> > > Please throw some light on this...
> > >
> > > Here is the snippet from my JSP.
> > >
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > >   type="com.xxx.operations.mplanning.mpi.util.ValueObjectPair">
> > >
> > >
> > >   
> > >
> > > ...
> > > ...
> > >
> > >
> > > 
> > >Description
> > > property="twVo.description"/>
> > > 
> > >
> > >
> > >
> > > For some reason, the setter Method of setDescription(String xyz) is
not
> being called.
> > >
> > >
> > > Please help...
> > >
> > >
> > > Many Thanks for Your Time
> > >
> > > Regards
> > > hemant
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > 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: 




calling a ActionMapping from a structs template page

2002-07-18 Thread Kevin Scott

here is the template page:
<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>


  
  
  


here the structs-config.xml
   
   


   
 

I would like to be call the SaveRegistrationAction class before displaying the 
="/admin/UserEdit.jsp page.  Can this be done?  Or am I missing somthing?

I can not get any template page to call any action class.  I can only get the 
templates to work with a jsp or html file.

Is there a work around to get this to work if it can not be done?

Kevin Scott


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




Re: Struts/Container-Managed Authentication Question

2002-07-18 Thread Mete Kural

Hello Max,

> > One thing that I want to implement is providing
> the
> > login form within the home-page to make it a
> > single-step job for them, so they'll see the login
> > form on the side of the page when they first come
> in.
> > Otherwise there are two steps involved, first
> click on
> > the login link to go to the login form and then
> submit
> > the login form. How do you think I can do that?
> 
> I don't know of an easy way to do that with
> container-managed
> authentication. The reason is that the caontainer
> wants to decide when to
> show the login form. If you always show a form, it
> won't know where to send
> the user when you submit. Tomcat chokes on this
> (rightly so, considering the
> spec) and WebLogic sends the user to the context
> root or something like
> that.
> 
> I can think of a really ugly (and insecure) way to
> have the login form on
> every page with container-based security:
> 1. user submits login form from any page
> 2. server stores username/password in session and
> responds with redirect to
> protected page
> 3. browser makes request for protected page
> 4. server responds with login form that you
> configured, which is setup to
> send a redirect to
> j_security_check?username=user&password=passwd if it
> finds the username/password in the session (or
> perhaps a pre-populated form
> that will automagically submit itself)
> 5. the server accepts the login and sends you to the
> protected page, which
> may just be a redirect back to the home page
> 
> Holy crap is that a scary mess! You might be able to
> clean it up a bit by
> using HTTPS (for security), some sort of frames
> setup (to lessen the chance
> of disorienting the user as things flash by), or the
> login form could have a
> "We're processing your login request..." message
> with the username and
> password in a hidden form within the page that
> submits itself when the page
> finishes loading. That might keep the user from
> freaking out when the screen
> starts flashing and it takes a while for the login
> (lots of back-and-forth
> between browser and server). Okay, I am now of the
> mind that this just might
> work.

Wow!!! It is indeed scary.. but God bless you for
solving this interesting problem. Yes indeed that
would enable me to put a login form on every page. I
hope you didn't have brain cramps while trying to
figure this out. I kinda did earlier today while
coming up with a different solution than yours, but
less functional, although I think more secure since
the password and username need not be stored in the
session.

Basically I made my welcome-page a dummy page that
redirects the request to /login.do. I made /login.do a
protected resource and what is ironic is that I made
my home page the "login page" !! (in ).
This kinda turns container-managed authentication on
its head since the protected page becomes the login
action while the login page becomes the homepage. But
surprisingly it seems to work. So when the user goes
to the page, after a redirect they arrive at the home
page. On the home page, they can either fill in the
login form and submit, or click on any one of the
other links in which case the authentication process
is dropped and the user is let go to other unprotected
pages. While this may seem like another big mess, it
satisfies the container since the form-based
authentication is done normally.

All I can say is I wish the servlet specs provided
more methods to make it possible to log the user in
through a method interface. Or maybe all they need to
do is not requiring the login submission to
j_security_check to happen only after the user has
encountered a protected page. Simply, the user should
be allowed to log in even before encountering a
protected page. Maybe they should introduce a new
sub-element in web.xml under login-config that
declares from which pages a login to j_securiy_check
could be submitted and make the login form portable
rather than binded on a single page. That could be a
viable alternative to providing a method interface
cause again which a method interface for logging in a
user, the app developer could poke holes in the
security mechanism. So basically the key phrase is
"make the login form portable".

I'd appreciate hearing your thought on this. Perhaps I
will make make a suggestion to the JCP about it. If
you would like to help that would be great.

Thanks,
Mete

> 
> Note: You can write a filter to mimic
> container-based security that does
> allow you to specify where to send the user after a
> submit when the login
> form was not shown out of necessity. I like the idea
> of the app using the
> methods defined for container-based security
> (getRemoteUser(), etc.) because
> they are standard and you can switch between
> container-based an filter-based
> with no impact to the rest of the app. We have done
> just such a switch on a
> project that I worked on, and it worked great.
> 
> > Think about Amazon. You can either be logged-in
> and
> > not logged

how to Internationalized submit button?

2002-07-18 Thread Hoang, Hai

I want to internationalize the submit buttons on a form and I don't know how
to do it.  Currently, I mapped the value on the submit button to the
property actionName in the ActionForm class.  Base on the button the use
clicked, I handle it propriately in the Action class, just like event
handling mechanism.  Now if I internationalize these buttons (, the
value will change and my Action class will no longer work.  Is there a way
to work around this problem?

To be specific, following is the detail about my setup

1. jsp page:





2. actionForm class:

public String getActionName() 
{
return actionName;
}

public void setActionName( String actionName) 
{
this.actionName = actionName;
}


3. action class:

ApplicationForm applicationForm = (ApplicationForm)form;
String action = applicationForm.getActionName();
if (action == null)
{
action = Constants.BUTTON_CANCEL;
}

if (action.equals(Constants.BUTTON_CANCEL))
{
applicationForm.setActionName(null);
doAdd(mapping, applicationForm, request, response);
}
else if (action.equals(Constants.BUTTON_ADD)) 
{
doAdd(mapping, applicationForm, request, response);
}
else if (action.equals(Constants.BUTTON_SAVE)) 
{
doSave(mapping, applicationForm, request, response);
}
else if (action.equals(Constants.BUTTON_EDIT) || 
action.equals(Constants.BUTTON_REMOVE)) 
{
doEdit(mapping, applicationForm, request, response);
}
else if (action.equals(Constants.BUTTON_UPDATE)) 
{
doUpdate(mapping, applicationForm, request, response);
}
else if (action.equals(Constants.BUTTON_DELETE)) 
{
doDelete(mapping, applicationForm, request, response);
}

Thank you for your help

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




new MVC with Standard Tags and DB sample

2002-07-18 Thread @Basebeans.com

Subject: new MVC with Standard Tags and DB sample
From: "Vic C." <[EMAIL PROTECTED]>
 ===
I have posted initial build of  a new learning application on 
SourceForge "basicPortal" under CVS 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/basicportal

It is using Struts with Standard Tags and X: Transform from DB, Realm 
base security, CURD, etc. etc. I have big plans for this, to be 20% of 
code that gets used 80% of time and "faces" and expression language 
compliant.

(Err.. this build is not for newbies, but I will update it  a lot 
and often.)

To keep up on this and related topics, there is a mail list
http://www.netbean.net/mailman/listinfo/mvc-programmers
that also gets you password to other baseBeans.com features.

and a newsgroups readers news.baseBeans.com.

Hope you like,
Vic C.


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




RE:

2002-07-18 Thread Keith Chew


Nope, the resulting html looks like:



Since the name cannot be set, we get the appended index at the beginning,
which does not help.

Maybe a bug? I am surprised that no one picked this up...

Keith


-Original Message-
From: Joseph Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Friday, 19 July 2002 12:55 p.m.
To: Struts Users Mailing List
Subject: RE: 


I think maybe it's the "property" attribute instead?  Not sure about that,
but you could give it a try.

> -Original Message-
> From: Keith Chew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 5:45 PM
> To: Struts Users Mailing List
> Subject: 
>
>
> Hi
>
> Why doesn't the  tag allow for the name attribute? I am trying
> to use it within the iterate tag, ie
>
> 
>property="someAttribute"/>
> 
>
> It does not recognise the name attribute. Any ideas?
> Keith
>
>
> --
> 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: File upload Maximum limit

2002-07-18 Thread $BDD!!>A(B
hi, this is Andy.
i received below when i uploaded a file that size crosses 1MB:

WebGroup  X Servlet Error: IOException while reading file element:
Premature end of stream while reading multipart request:
java.io.IOException: Premature end of stream while reading multipart request
 at
org.apache.struts.upload.MultipartIterator.createLocalFile(MultipartIterator
.java:520)
 at
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.
java:217)
 at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:76)
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
 at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827)
 at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:159)
 at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:286)
 at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:106)
 at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2)
 at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012)
 at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:499)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:278)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:105)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:123)
 at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
 at
com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl
eInvocationContext.java:106)
 at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:125)
 at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315)
 at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60)
 at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
 at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
 at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

my envirement:
Struts 1.0.2 (09-Feb-2002)
IBM Websphere 4.0 AES
Windows2000Prefressional

thanks
Andy.


RE: Welcome file, servlet mapping in web.xml file

2002-07-18 Thread James Mitchell


>  localhost:8080/EGPS/banking/action/login.jsp

It looks like you are confusing pathmapping with welcome file list

Try this instead:
http://localhost:8080/EGPS/banking/login.jsp

I removed "/action" because that's what you need to call an action, which
will forward to your jsp.

Good luck.

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta



> -Original Message-
> From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:55 PM
> To: [EMAIL PROTECTED]
> Subject: Welcome file, servlet mapping in web.xml file
>
>
> Subject: Welcome file, servlet mapping in web.xml file
> From: "BillB" <[EMAIL PROTECTED]>
>  ===
>
> Given the following web.xml entry:
>
>   
> banking
> org.apache.struts.action.ActionServlet
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> 
>   debug
>   3
> 
> 
>   detail
>   3
> 
> 
>   validating
>   true
> 
> 1
>   
>
>   
> banking
> /action/*
>   
>
>
> login.jsp -file-list
> >
>
> and a jsp file called login.jsp in the root webapp directory, what else is
> required to view the page
> with the URL: localhost:8080/EGPS/banking/action/login.jsp? I continually
> get a 500 error saying the
> resource isn't found. Is there something I'm missing?
>
> Thanks,
> Bill
>



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




Re: Validator/Tiles config question

2002-07-18 Thread Eddie Bush

And one less obvious question, which you may or may not have inferred 
from that - will Tiles + Validator = OMG it works!?  My guess is yes, 
but I haven't got my test fully implemented yet.

Thanks! :-D

Eddie

Eddie Bush wrote:

> Do we still need to make the following substitution in  our config 
> files if we're running tiles?  I haven't tried it without it yet - was 
> just curious.  If we do have to have it, will that bundle work ok with 
> the validator?
>
>  
>  
>   parameter="org.apache.struts.webapp.tiles.dev1-1.ApplicationResources" 
> null="false" />
>
> Thanks so much! :-)
>
> Eddie 




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




RE: HTTP Status 500 - What does the following mean?

2002-07-18 Thread James Mitchell

Yes, Struts is not finding your resource file (typically called
ApplicationResources.properties)

It's configured in the struts-config.xml (for Struts 1.1b1) or the web.xml
(for Struts 1.0.x)

It looks like you are using Tomcat 4.1.x, make sure you've configured the
files for your Struts version.  See any of the examples that come with
binary and source distributions for sample configurations.

HTH


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:25 PM
> To: [EMAIL PROTECTED]
> Subject: HTTP Status 500 - What does the following mean?
>
>
> Subject: HTTP Status 500 - What does the following mean?
> From: "BillB" <[EMAIL PROTECTED]>
>  ===
> Can someone give me a hint on what the problem might be?
>
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
>   at
> org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
>   at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
> Source)
>   at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
>   at
> org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invok
> eNext(Unknown Source)
>   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invok
> eNext(Unknown Source)
>   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
>   at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invok
> eNext(Unknown Source)
>   at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invok
> eNext(Unknown Source)
>   at
> org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invok
> eNext(Unknown Source)
>   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invok
> eNext(Unknown Source)
>   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>   at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
>   at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.pr
> ocessConne
> ction(Http11Protocol.java:358)
>   at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:495)
>   at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thre
> adPool.jav
> a:518)
>   at java.lang.Thread.run(Thread.java:484)
>
>
> root cause
>
> javax.servlet.ServletException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
>   at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
> Source)
>   at org.apache.jsp.login$jsp._jspService(login$jsp.java:450)
>   at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
>   at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
> Source)
>   at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
>   at
> org.apache.catal

Validator/Tiles config question

2002-07-18 Thread Eddie Bush

Do we still need to make the following substitution in  our config files 
if we're running tiles?  I haven't tried it without it yet - was just 
curious.  If we do have to have it, will that bundle work ok with the 
validator?

  
  
  

Thanks so much! :-)

Eddie



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




Re: Struts-Validator

2002-07-18 Thread Eddie Bush

http://home.earthlink.net/~dwinterfeldt/


Check that out.  I think it may contain what you're after.

Jerry Jalenak wrote:

>Can validator perform a comparison between two (or more) fields on a form?
>If so, does anyone have a quick example from the validator-rules.xml that
>they could post?
>
>Thanks.
>
>Jerry Jalenak
>
>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: Setter Methods not being called in nested:iterate scenario:+ (

2002-07-18 Thread Martin Cooper

That your data is presented correctly means that the form bean was set up
correctly when it reached the JSP page. However, when the form is submitted,
Struts will call your reset() method before populating the form bean from
the request parameters. Your reset() method needs to be instantiating the
beans, or your nested properties will not be populated.

--
Martin Cooper


> -Original Message-
> From: hemant [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 3:11 PM
> To: Struts Users Mailing List
> Subject: Re: Setter Methods not being called in 
> nested:iterate scenario
> :+(
> 
> 
> Adam
> Thanks for responding..
> 
> The Actionform (rangesform) itself is my root and I have a collection
> reference "collectionOfPairs" in "rangesform",  replete with 
> getter/setter
> methods.
> 
> The collectionOfPairs is instantiated and populated. If not, 
> I would not be
> seeing the page with the correct data. right?
> 
> As I said earlier, the getters work, the setters do not work. All this
> inspite of having the bean in the form.
> 
> Thanks
> hemant
> 
> 
> - Original Message -
> From: "Adam Hardy" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 18, 2002 4:39 PM
> Subject: Re: Setter Methods not being called in 
> nested:iterate scenario :+(
> 
> 
> > nested tags / indexed properties / nested beans gotcha. You have to
> > instantiate the beans yourself in the form reset() if you want to
> > capture the indexed properties.
> >
> >
> > [this answer was automated, virtually]
> >
> > hemant wrote:
> > > Comrades,
> > >
> > > I am trying to Iterate over a Collection of Collections 
> of ValueObjects
> and after some real painful experimentation (With VA 3.5.3 + 
> Apache Tomcat +
> Poolman ), I got the page to come up properly :). So far so 
> good. I went out
> and celebrated for a few minutes...
> > >
> > > The getter methods seem to work fine. But the user data 
> is not being
> captured on Submit :(
> > >
> > > Please throw some light on this...
> > >
> > > Here is the snippet from my JSP.
> > >
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > >   type="com.xxx.operations.mplanning.mpi.util.ValueObjectPair">
> > >
> > >
> > >   
> > >
> > > ...
> > > ...
> > >
> > >
> > > 
> > >Description
> > > property="twVo.description"/>
> > > 
> > >
> > >
> > >
> > > For some reason, the setter Method of 
> setDescription(String xyz) is not
> being called.
> > >
> > >
> > > Please help...
> > >
> > >
> > > Many Thanks for Your Time
> > >
> > > Regards
> > > hemant
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > 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: 




Welcome file, servlet mapping in web.xml file

2002-07-18 Thread @Basebeans.com

Subject: Welcome file, servlet mapping in web.xml file
From: "BillB" <[EMAIL PROTECTED]>
 ===

Given the following web.xml entry:

  
banking
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


  debug
  3


  detail
  3


  validating
  true

1
  

  
banking
/action/*
  


login.jsp

and a jsp file called login.jsp in the root webapp directory, what else is
required to view the page
with the URL: localhost:8080/EGPS/banking/action/login.jsp? I continually
get a 500 error saying the
resource isn't found. Is there something I'm missing?

Thanks,
Bill




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




HTTP Status 500 - What does the following mean?

2002-07-18 Thread @Basebeans.com

Subject: HTTP Status 500 - What does the following mean?
From: "BillB" <[EMAIL PROTECTED]>
 ===
Can someone give me a hint on what the problem might be?


description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:358)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:495)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:518)
at java.lang.Thread.run(Thread.java:484)


root cause

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
Source)
at org.apache.jsp.login$jsp._jspService(login$jsp.java:450)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok

Re: Runtime expression not evaluated

2002-07-18 Thread Max Cooper

You can't mix a string and a <%= %> in an attribute value. It has to be one
or the other. I know, it seems weird, but try it and you'll see.

You should be able to do one of these instead:

<% String idValue = "multiValue" + String.valueOf(index); %>


or



^ note single quote usage

-Max


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 2:23 PM
Subject: Runtime expression not evaluated


>
>
> Hi,
>
> Can anyone tell me why, in the following code, the id of the image is
> "checkBox<%=index%>" rather than "checkBox1", "checkBox2" etc.?  The id of
the
>  works just fine!
>
>  property="comboValues" indexId="index">
> 
> name="comboValue"/>
>
>style="cursor:default">
>   page="/images/checkbox_empty.gif" border="0"/>
>   
>
>  
> 
>
> Thanks,
>
> David
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




RE:

2002-07-18 Thread Joseph Barefoot

I think maybe it's the "property" attribute instead?  Not sure about that,
but you could give it a try.

> -Original Message-
> From: Keith Chew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 5:45 PM
> To: Struts Users Mailing List
> Subject: 
>
>
> Hi
>
> Why doesn't the  tag allow for the name attribute? I am trying
> to use it within the iterate tag, ie
>
> 
>property="someAttribute"/>
> 
>
> It does not recognise the name attribute. Any ideas?
> Keith
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>



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




struts-user@jakarta.apache.org

2002-07-18 Thread Keith Chew

Hi

Why doesn't the  tag allow for the name attribute? I am trying
to use it within the iterate tag, ie


  


It does not recognise the name attribute. Any ideas?
Keith


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





RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Joseph Barefoot

I usually refer to it as the "ostrich syndrome", as in:

"The majority of the people in the U.S. are suffering from ostrich syndrome
regarding the country's foreign policy.  Most are  unfortunately also
suffering from tunnel-vision and temporal myopia, two conditions which
commonly afflict people world-wide".

;)






> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 3:53 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now available
>
>
> Ah, but in English, there's a saying about ostriches sticking
> their heads in
> the sand. From Mirriam-Webster Online:
>
> ostrich:
> 2 [from the belief that the ostrich when pursued hides its head
> in the sand
> and believes itself to be unseen] : one who attempts to avoid danger or
> difficulty by refusing to face it.
>
> Not a good connotation for Struts!
>
> --
> Martin Cooper
>
>
> > -Original Message-
> > From: Tero P Paananen [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 18, 2002 1:49 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now
> > available
> >
> >
> > > or maybe an ostridge...  Strut -- To walk with a lofty, proud
> > > gait, and
> > > erect head; to walk with affected dignity.
> > > http://www.dictionary.com/cgi-bin/dict.pl?term=strut&r=67
> >
> > +2 for ostrich (please note the correct spelling :)
> >
> > Perfect!
> >
> > -TPP - ostrich = strutsi in Finnish
> >
> > --
> > 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: 




[HELP!] Save token for errors

2002-07-18 Thread Jacob Hookom

I'm running into a little issue, in my action, if an error occurs I need
to rollback while including the sent parameters, this is causing some
issues, for some reason, it's not appending the params:

// 1 or more errors occurred, rollback to insert page
if (errors.size() > 0)
{
this.saveErrors(arg2, errors);
this.saveToken(arg2);
return new ActionForward(arg0.getInput());
}
// everything went okay, return to success page
else
{
return new ActionForward(
arg0.findForward("success").getPath()
+ "?folderId="
+ info.getFolderId());
}

This same snippet is used in my other actions, but this one is screwy
and always returns nothing for parameters.

HELP PLEASE! :-)

-jake

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 


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




Re: Struts/Container-Managed Authentication Question

2002-07-18 Thread Max Cooper

Hello Mete,

> > One thing that you cannot do with container-managed
> > security is direct the
> > users to the login form page to force them to login.
> > As an alternative, you
> > can protect a page and send users there, so the
> > container will send them
> > through the login form. For instance, if your login
> > form is /loginForm.do,
> > you could make a page (even a redirect back to your
> > home page if you want
> > users to end up there) named /protected.do and then
> > setup a security
> > constraint for that page. Your Login link would be
> >  > href="(contextPath)/protected.do">Login with
> > this setup.
>
> This alternative seems attractive to me, but I'm not
> sure I have truly grasped how it works. I'm going to
> try to paraphrase, so please correct me if I'm wrong:
> - I would provide a link on the public homepage that
> says "Login here" on it. When users click the link
> they would go to a dummy protected page that simply
> redirects the user back to the homepage. Once they
> login through that they're automatically back in the
> homepage and they're logged in!

That's it -- you've got it.

> One thing that I want to implement is providing the
> login form within the home-page to make it a
> single-step job for them, so they'll see the login
> form on the side of the page when they first come in.
> Otherwise there are two steps involved, first click on
> the login link to go to the login form and then submit
> the login form. How do you think I can do that?

I don't know of an easy way to do that with container-managed
authentication. The reason is that the caontainer wants to decide when to
show the login form. If you always show a form, it won't know where to send
the user when you submit. Tomcat chokes on this (rightly so, considering the
spec) and WebLogic sends the user to the context root or something like
that.

I can think of a really ugly (and insecure) way to have the login form on
every page with container-based security:
1. user submits login form from any page
2. server stores username/password in session and responds with redirect to
protected page
3. browser makes request for protected page
4. server responds with login form that you configured, which is setup to
send a redirect to j_security_check?username=user&password=passwd if it
finds the username/password in the session (or perhaps a pre-populated form
that will automagically submit itself)
5. the server accepts the login and sends you to the protected page, which
may just be a redirect back to the home page

Holy crap is that a scary mess! You might be able to clean it up a bit by
using HTTPS (for security), some sort of frames setup (to lessen the chance
of disorienting the user as things flash by), or the login form could have a
"We're processing your login request..." message with the username and
password in a hidden form within the page that submits itself when the page
finishes loading. That might keep the user from freaking out when the screen
starts flashing and it takes a while for the login (lots of back-and-forth
between browser and server). Okay, I am now of the mind that this just might
work.

Note: You can write a filter to mimic container-based security that does
allow you to specify where to send the user after a submit when the login
form was not shown out of necessity. I like the idea of the app using the
methods defined for container-based security (getRemoteUser(), etc.) because
they are standard and you can switch between container-based an filter-based
with no impact to the rest of the app. We have done just such a switch on a
project that I worked on, and it worked great.

> Think about Amazon. You can either be logged-in and
> not logged-in and it will still work. If you're
> logged-in the website treats you like a familiar
> customer, if not just default. That's the exact same
> functionality that I'm trying to implement here. I
> hope this gives a wider picture of what I want to do
> and perhaps you know a better way to do this than how
> I was currently planning on doing it above.

Yes, your app will work like that with this setup. The login scope is the
context, and since both of your sub-apps are in the same context, the login
state is shared between them. Just write your pages to handle both the
authenticated and non-authenticated users. request.getRemoteUser() will
return null if the user is not authenticated.

-Max



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




multiple selected values

2002-07-18 Thread Billy Ng

I have a html:select that enabled multiple attribute.

 
  
 

I know I can use the 's value attribute to mark a pre-selected item.  But 
if I have more than 1 item to be selected, what variable should I pass to the value 
attribute?

Thanks in advance!

Billy Ng



RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Martin Cooper

Ah, but in English, there's a saying about ostriches sticking their heads in
the sand. From Mirriam-Webster Online:

ostrich:
2 [from the belief that the ostrich when pursued hides its head in the sand
and believes itself to be unseen] : one who attempts to avoid danger or
difficulty by refusing to face it.

Not a good connotation for Struts!

--
Martin Cooper


> -Original Message-
> From: Tero P Paananen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 1:49 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now 
> available
> 
> 
> > or maybe an ostridge...  Strut -- To walk with a lofty, proud 
> > gait, and
> > erect head; to walk with affected dignity.
> > http://www.dictionary.com/cgi-bin/dict.pl?term=strut&r=67
> 
> +2 for ostrich (please note the correct spelling :)
> 
> Perfect!
> 
>   -TPP - ostrich = strutsi in Finnish
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 


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




RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Martin Cooper

Nah. I don't think we'd want to give the impression that the existence of
Struts is not yet proven...

--
Martin Cooper


> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 1:42 PM
> To: Struts Users Mailing List
> Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now 
> available
> 
> 
> > I think it's taking them a long time to figure out
> > which animal they want on the cover :)
> 
> +1 for sasquatch.
> http://www.bfro.net/
> 
> 
> 
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://www.open-tools.org/struts-atlanta
> 
> 
> 
> 
> > -Original Message-
> > From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 18, 2002 4:35 PM
> > To: Struts Users Mailing List
> > Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book 
> now available
> >
> >
> > Simon,
> >
> >I have to be finished by the end of the month. O'Reilly has
> > done a good
> > thing and forced me to finish the book this month. What this
> > means is that
> > several chapters will not make it into this first edition. 
> They will be
> > covered in the 2nd edition, which I've already had 
> discussions with them
> > about. The simple truth is that I was trying to cover to 
> much material in
> > one book and I'm a slow writer.
> >
> > This is both good and bad. Good because the book is getting 
> so large and
> > would have been huge if I actually put every chapter into it. Not to
> > mention that it wouldn't be out for 10 more years :) But 
> unfortunately,
> > several chapters will not make it into this edition.
> >
> > Having said all of that, I expect the book to be out in very late
> > August or
> > early September. O'Reilly told me that it should be available for
> > pre-ordering this month.
> 
> >
> > Chuck
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:




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




Runtime expression not evaluated

2002-07-18 Thread dhay



Hi,

Can anyone tell me why, in the following code, the id of the image is
"checkBox<%=index%>" rather than "checkBox1", "checkBox2" etc.?  The id of the
 works just fine!



   
   
  
 
  
   
 


Thanks,

David





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




Re: Setter Methods not being called in nested:iterate scenario :+(

2002-07-18 Thread hemant

Adam
Thanks for responding..

The Actionform (rangesform) itself is my root and I have a collection
reference "collectionOfPairs" in "rangesform",  replete with getter/setter
methods.

The collectionOfPairs is instantiated and populated. If not, I would not be
seeing the page with the correct data. right?

As I said earlier, the getters work, the setters do not work. All this
inspite of having the bean in the form.

Thanks
hemant


- Original Message -
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 4:39 PM
Subject: Re: Setter Methods not being called in nested:iterate scenario :+(


> nested tags / indexed properties / nested beans gotcha. You have to
> instantiate the beans yourself in the form reset() if you want to
> capture the indexed properties.
>
>
> [this answer was automated, virtually]
>
> hemant wrote:
> > Comrades,
> >
> > I am trying to Iterate over a Collection of Collections of ValueObjects
and after some real painful experimentation (With VA 3.5.3 + Apache Tomcat +
Poolman ), I got the page to come up properly :). So far so good. I went out
and celebrated for a few minutes...
> >
> > The getter methods seem to work fine. But the user data is not being
captured on Submit :(
> >
> > Please throw some light on this...
> >
> > Here is the snippet from my JSP.
> >
> > 
> > 
> >
> > 
> > 
> >
> >  
> >
> >
> >   
> >
> > ...
> > ...
> >
> >
> > 
> >Description
> >
> > 
> >
> >
> >
> > For some reason, the setter Method of setDescription(String xyz) is not
being called.
> >
> >
> > Please help...
> >
> >
> > Many Thanks for Your Time
> >
> > Regards
> > hemant
> >
> >
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




Struts-Validator

2002-07-18 Thread Jerry Jalenak

Can validator perform a comparison between two (or more) fields on a form?
If so, does anyone have a quick example from the validator-rules.xml that
they could post?

Thanks.

Jerry Jalenak

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: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Joseph Barefoot

Or a peacock.  They definitely strut, and are all about their visual
display. :)

h...it appears that O'Reilly has already used a peacock thoughor,
ahem, a peafowl, excuse me.
http://www.oreilly.com/catalog/xmlnut/colophon.html

Just a headshot though, not what I was thinking.


peace,
Joe



> -Original Message-
> From: Tero P Paananen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 1:49 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now available
>
>
> > or maybe an ostridge...  Strut -- To walk with a lofty, proud
> > gait, and
> > erect head; to walk with affected dignity.
> > http://www.dictionary.com/cgi-bin/dict.pl?term=strut&r=67
>
> +2 for ostrich (please note the correct spelling :)
>
> Perfect!
>
>   -TPP - ostrich = strutsi in Finnish
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>



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




RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Tero P Paananen

> or maybe an ostridge...  Strut -- To walk with a lofty, proud 
> gait, and
> erect head; to walk with affected dignity.
> http://www.dictionary.com/cgi-bin/dict.pl?term=strut&r=67

+2 for ostrich (please note the correct spelling :)

Perfect!

-TPP - ostrich = strutsi in Finnish

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




RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Michael Marrotte

+2 for sasquatch.

or maybe an ostridge...  Strut -- To walk with a lofty, proud gait, and
erect head; to walk with affected dignity.
http://www.dictionary.com/cgi-bin/dict.pl?term=strut&r=67

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 4:42 PM
To: Struts Users Mailing List
Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now available


> I think it's taking them a long time to figure out
> which animal they want on the cover :)

+1 for sasquatch.
http://www.bfro.net/



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 4:35 PM
> To: Struts Users Mailing List
> Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now available
>
>
> Simon,
>
>I have to be finished by the end of the month. O'Reilly has
> done a good
> thing and forced me to finish the book this month. What this
> means is that
> several chapters will not make it into this first edition. They will be
> covered in the 2nd edition, which I've already had discussions with them
> about. The simple truth is that I was trying to cover to much material in
> one book and I'm a slow writer.
>
> This is both good and bad. Good because the book is getting so large and
> would have been huge if I actually put every chapter into it. Not to
> mention that it wouldn't be out for 10 more years :) But unfortunately,
> several chapters will not make it into this edition.
>
> Having said all of that, I expect the book to be out in very late
> August or
> early September. O'Reilly told me that it should be available for
> pre-ordering this month.

>
> Chuck


--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Re: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Adam Hardy

That's unfair - I'd have a beaver.


And no smart comments on that thanks.



James Mitchell wrote:
>>I think it's taking them a long time to figure out
>>which animal they want on the cover :)
> 
> 
> +1 for sasquatch.
> http://www.bfro.net/
> 
> 
> 
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://www.open-tools.org/struts-atlanta
> 
> 
> 
> 
> 
>>-Original Message-
>>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, July 18, 2002 4:35 PM
>>To: Struts Users Mailing List
>>Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now available
>>
>>
>>Simon,
>>
>>   I have to be finished by the end of the month. O'Reilly has
>>done a good
>>thing and forced me to finish the book this month. What this
>>means is that
>>several chapters will not make it into this first edition. They will be
>>covered in the 2nd edition, which I've already had discussions with them
>>about. The simple truth is that I was trying to cover to much material in
>>one book and I'm a slow writer.
>>
>>This is both good and bad. Good because the book is getting so large and
>>would have been huge if I actually put every chapter into it. Not to
>>mention that it wouldn't be out for 10 more years :) But unfortunately,
>>several chapters will not make it into this edition.
>>
>>Having said all of that, I expect the book to be out in very late
>>August or
>>early September. O'Reilly told me that it should be available for
>>pre-ordering this month.
> 
> 
>>Chuck
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 



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




RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread James Mitchell

> I think it's taking them a long time to figure out
> which animal they want on the cover :)

+1 for sasquatch.
http://www.bfro.net/



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 4:35 PM
> To: Struts Users Mailing List
> Subject: RE: [ANN] Chapter 18 of the O'Reilly Struts book now available
>
>
> Simon,
>
>I have to be finished by the end of the month. O'Reilly has
> done a good
> thing and forced me to finish the book this month. What this
> means is that
> several chapters will not make it into this first edition. They will be
> covered in the 2nd edition, which I've already had discussions with them
> about. The simple truth is that I was trying to cover to much material in
> one book and I'm a slow writer.
>
> This is both good and bad. Good because the book is getting so large and
> would have been huge if I actually put every chapter into it. Not to
> mention that it wouldn't be out for 10 more years :) But unfortunately,
> several chapters will not make it into this edition.
>
> Having said all of that, I expect the book to be out in very late
> August or
> early September. O'Reilly told me that it should be available for
> pre-ordering this month.

>
> Chuck


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




Re: Setter Methods not being called in nested:iterate scenario :+(

2002-07-18 Thread Adam Hardy

nested tags / indexed properties / nested beans gotcha. You have to 
instantiate the beans yourself in the form reset() if you want to 
capture the indexed properties.


[this answer was automated, virtually]

hemant wrote:
> Comrades,
> 
> I am trying to Iterate over a Collection of Collections of ValueObjects and after 
>some real painful experimentation (With VA 3.5.3 + Apache Tomcat + Poolman ), I got 
>the page to come up properly :). So far so good. I went out and celebrated for a few 
>minutes... 
> 
> The getter methods seem to work fine. But the user data is not being captured on 
>Submit :(
> 
> Please throw some light on this...
> 
> Here is the snippet from my JSP.
> 
> 
> 
> 
> 
> 
> 
>  type="com.xxx.operations.mplanning.mpi.util.ValueObjectPair">
> 
> 
>   
> 
> ...
> ...
> 
> 
> 
>Description
>property="twVo.description"/>
> 
> 
> 
> 
> For some reason, the setter Method of setDescription(String xyz) is not being called.
> 
> 
> Please help...
> 
> 
> Many Thanks for Your Time
> 
> Regards
> hemant
> 
> 
> 
> 



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




RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Chuck Cavaness

Simon,

   I have to be finished by the end of the month. O'Reilly has done a good 
thing and forced me to finish the book this month. What this means is that 
several chapters will not make it into this first edition. They will be 
covered in the 2nd edition, which I've already had discussions with them 
about. The simple truth is that I was trying to cover to much material in 
one book and I'm a slow writer.

This is both good and bad. Good because the book is getting so large and 
would have been huge if I actually put every chapter into it. Not to 
mention that it wouldn't be out for 10 more years :) But unfortunately, 
several chapters will not make it into this edition.

Having said all of that, I expect the book to be out in very late August or 
early September. O'Reilly told me that it should be available for 
pre-ordering this month. I think it's taking them a long time to figure out 
which animal they want on the cover :)

Chuck

At 03:13 PM 7/18/2002 -0500, you wrote:
>Chuck,
>
>Any word on your expected publication date yet? I have $$$ burning a hole 
>in my pocket waiting for your book. I see that Sue Spielman's book is 
>expected in October, according to Amazon, but I couldn't find your book on 
>there.
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
>
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, July 18, 2002 12:21 PM
> >To: [EMAIL PROTECTED]
> >Subject: [ANN] Chapter 18 of the O'Reilly Struts book now available
> >
> >
> >Chapter 18 "Logging in a Struts Application" has been
> >posted on theserverside.com.
> >
> >http://www.theserverside.com/resources/strutsreview.jsp
> >
> >The EJB Chapter is finished and will be posted within
> >the next day or so, followed by Tiles and the
> >Performance chapter.
> >
> >Chuck
> >
> >--
> >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: Good/Bad Practices

2002-07-18 Thread Joseph Barefoot

My .02:

I don't there's a right/wrong way to go about this, so long as you are
consistent with your architecture.  Our team has come to the agreement that
less Actions = less files = less headaches, to a certain degree.  We try to
use a single Action class for screens that logically belong together.  For
instance, we have a set of menu options "Select Service Plan", "Edit Service
Plan", and "Add Service Plan".  As you would expect the "edit" and "add"
options both have confirmation screens, and the "add" is a multi-step
process.

So, I used a single Action class (HandleServicePlanAction) for these
functions.  The initial 3 screens each have an action-mapping that use this
action, and we use the "parameter" attribute to specify the method in the
action to be called to initialize/forward to the first screen.  The
"perform" (or execute, in 1.1) method checks for this parameter and invokes
the method by reflection.  After the initial screen, we use an encoding
method on submit buttons, and the value of a button would look something
like "submit(updatePlan)".  Our perform method will 'decode' this from the
request, simply by looking for a parameter that starts with "submit(".  It
then uses the value in parentheses as the name of the method to invoke for
that submit.

It's actually a bit more organized than that, as we use a custom tag to
encode the submit ID and a method in our Action superclass to decode it, so
the only thing in the perform method is the reflective invocation.  We
should argubably create another base class that does even this bit for you,
but we haven't gotten around to it.  You could even optimize the reflective
invocation the way Struts does by caching the Method objects after the first
invocation, but we haven't bothered to do this either, as the performance
hit is nominal.  Searching the request paremeters for the one that starts
with "submit(" is also pretty speedy and thus not really a performance
issue.  If you have so many request parameters that it DOES become a
performance issue, I'd say you have bigger problems anyway--probably a
poorly designed interface.

We have found it easier to deal with config files this way, because there
are fewer action-mappings, and also with our codebase, with fewer files to
deal with.  Of course, you always run the danger of creating a bloated class
this way, but if all of your actions are modeled on this pattern, it's
fairly trivial to move a set of methods to a new class -- you just have to
change the class name in your action-mappings.


peace,
Joe Barefoot



> -Original Message-
> From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:58 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Good/Bad Practices
>
>
> Yeah, that's what I prefer too, but I didn't know if having a shitload of
> JSP's and action mappings meant that I was doing something wrong.  Thanks
> for the input and the reassurance that I'm not doing something stupid.
>
> ~ Keith
> http://www.buffalo.edu/~kkamholz
>
>
>
> -Original Message-
> From: Mark Nichols [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 12:00 PM
> To: Struts Users Mailing List
> Subject: RE: Good/Bad Practices
>
>
> I prefer the more granular approach, with many actions and JSPs
> over a more
> complex and generalized approach. In my case I find that having
> single-function actions and JSPs leads to easier coding today
> (and therefore
> easier maintenance tomorrow). I can also split the work up over more
> developers, rather than "single threading" development through one complex
> action.
>
> Our intranet application has about 60 separate 'screens', each
> with its own
> action. Maybe overkill, but for a first attempt at Struts this pattern has
> made life easier by far.
>
> 
>
> > -Original Message-
> > From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 18, 2002 9:32 AM
> > To: Struts (E-mail)
> > Subject: Good/Bad Practices
> >
> >
> > > Hey everyone,
> > >
> > > I've been trying to get in the habit of using good struts programming
> > > practices, (without making things too hard on myself).  I have another
> > > question for anyone that could give me some input on it.
> > >
> > > I'm working on a data entry application, and the user can make three
> > > different types of entries.  Let's call them A, B, and C.  They
> > each have
> > > some form fields in common with each other, but each has a
> couple unique
> > > fields.  To add an entry, I have a separate JSP for each, and
> different
> > > action mappings for each (that all refer back to the same
> action class).
> > > This works fine.
> > >
> > > Now I'm working on an edit function for the entries.  I have a
> > link within
> > > a  tag that displays a link to an edit form.  I
> > tried using
> > > one action and one JSP for the edits, but it gets very messy trying to
> > > allow for the different types of entries.
> > >
> > > Is it a

strange error not finding org/apache/struts/action/Action class

2002-07-18 Thread Emerson Cargnin - SICREDI Serviços

Have anyone seem this error

2002-07-18 17:14:06,737 DEBUG 
[org.apache.struts.action.RequestProcessor]  Looking for Action instance 
for class br.com.sicredi.cobranca.cliente.web.PesquisaPracaAction
2002-07-18 17:14:06,737 DEBUG 
[org.apache.struts.action.RequestProcessor]   Creating new Action instance
2002-07-18 17:14:07,326 ERROR 
[org.apache.struts.action.RequestProcessor] No action instance for path 
/PesquisaPraca could be created
java.lang.NoClassDefFoundError: org/apache/struts/action/Action
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
.
.
.



-- 
Emerson Cargnin - MSA
SICREDI - Tel : 3358-4860


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




RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Chappell, Simon P

Chuck,

Any word on your expected publication date yet? I have $$$ burning a hole in my pocket 
waiting for your book. I see that Sue Spielman's book is expected in October, 
according to Amazon, but I couldn't find your book on there.

Simon

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


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, July 18, 2002 12:21 PM
>To: [EMAIL PROTECTED]
>Subject: [ANN] Chapter 18 of the O'Reilly Struts book now available 
>
>
>Chapter 18 "Logging in a Struts Application" has been 
>posted on theserverside.com. 
>
>http://www.theserverside.com/resources/strutsreview.jsp
>
>The EJB Chapter is finished and will be posted within 
>the next day or so, followed by Tiles and the 
>Performance chapter.
>
>Chuck
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>

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




Re: getting nested tags to work with DynaActionForm???

2002-07-18 Thread Adam Hardy

I am now using nested tags everywhere and not programming my action 
forms with getter and setter methods for anything except one or two 
properties, and the nested beans of course.

Is there any reason to regard this as bad practice?

I also write my value beans with two properties for every real property, 
one is typed, e.g. Date, and the other is the string representation of 
the type. So I also have two getters and two setters.

Also again I have the validation code in the value bean which populates 
the typed property from the string representation property. The action 
form loops through the beans calling the validate methods.

It means I have all my properties in one bean rather than also in the 
form bean - easier to change when the entity changes.



Adam



Craig R. McClanahan wrote:
> 
> On Wed, 17 Jul 2002, Rick Reumann wrote:
> 
> 
>>Date: Wed, 17 Jul 2002 20:57:26 -0400
>>From: Rick Reumann <[EMAIL PROTECTED]>
>>To: Craig R. McClanahan <[EMAIL PROTECTED]>
>>Cc: Roman Fail <[EMAIL PROTECTED]>,
>> Struts Users Mailing List <[EMAIL PROTECTED]>,
>> [EMAIL PROTECTED]
>>Subject: Re[4]: getting nested tags to work with DynaActionForm???
>>
>>On Wednesday, July 17, 2002, 7:39:23 PM, Craig wrote:
>>
>>
 Agreed, that does walk into the realm of Big Brother code.  I guess
it's just going to be a rough spot for DynaNewbies.
>>>
>>CRM> Not any rougher than it is for people trying to understand standard
>>CRM> ActionForms :-)
>>
>> Correct me if I'm wrong here Craig, but where I noticed it was
>> quite a bit more difficult is when you decide not to use Session
>> scope for FormBeans that have ArrayLists with beans inside that
>> also have ArrayLists (etc. with nesting ). I say this because if
>> I remember correctly isn't one of the main differences between
>> the DynaActionForm and the standard ActionForm is that the
>> DynaActionForm ALWAYS calls the reset method (regardless of
>> scope) whereas the ActionForm only calls it when in it's in
>> request scope (or explicitly called?). This is where I think I
>> was running into trouble, since even though my DynaActionForm had
>> session scope it was always calling reset whereas my standard
>> ActionForm in session scope was not calling it.
>>
> 
> 
> That's not quite accurate.
> 
> Struts (all versions) always calls reset() when you flow through the
> controller servlet.  However, if you went directly to a JSP page, and the
>  tag creates the form bean (quite common if the form bean is
> defined to be in request scope), Struts 1.0 did not call reset() but
> Struts 1.1 does.  In the 1.1 case, it makes no difference at all whether
> it is an ActionForm or a DynaActionForm.
> 
> 
>> So in my case if I wanted request scope for the ActionForm I
>> still would have had to override the reset method to provide a
>> way to initialize the ArrayLists (and I take it the beans inside
>> with ArrayLists as well).
> 
> 
> That is true for both kinds of beans.  In either case, you can also choose
> to make the constructor do this sort of initialization (requires a
> DynaActionForm subclass in the dynamic case, but it's still possible).
> 
> 
>>In my case however it's not too big of
>> a deal that this UserFormBean hang around for a while with
>> Session scope so it seems much easier to use it with an
>> ActionForm than with the DynaActionForm (since with the later
>> case I'm forced to override the reset method and populate nested
>> beans).
>>
> 
> 
> That should be the case for either kind of form bean.  Can you show me an
> example of where it's different?
> 
> 
>> This is probably a dumb question and I suppose I could try it
>> before posting, but what would happen if I just wanted to use the
>> DynaActionForm in session scope and then just overrode the reset
>> method to do nothing?
> 
> 
> You'd mess up the initializations based on the "initial" attribute :-).
> 
> 
>>Wouldn't it still keep the values in the
>> DynaActionForm since it had session scope and wouldn't try to
>> set up unitialized ArrayLists, etc? (of course this would only
>> help if the bean was in Session scope..but just curious if it
>> would even work).
>>
>> Thanks again for all of your comments so far
>>
> 
> 
> It might do what you want, but for the wrong reasons.
> 
> I think it's time to get into specific use cases to further this
> discussion.
> 
> 
>>--
>>
>>Rick
>>mailto:[EMAIL PROTECTED]
>>
>>
> 
> 
> Craig
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 



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




RE: Newbie Struts requirements question

2002-07-18 Thread Mark Nichols

For what it's worth I'm running (slow, but running) Tomcat 4.x, struts 1.1b1
on an old IBM ThinkPad with a 166MHz CPU and 80 MB RAM. It has Windows ME
installed. Also I've got Eclipse 2.0 with EasyStruts loaded and running here
too.

Of course just as soon as some one is nice enough to gift me a new 2.4 GHz
laptop I'll pitch this one into the nearest lake. =)



> -Original Message-
> From: Ballard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 1:57 PM
> To: [EMAIL PROTECTED]
> Subject: Newbie Struts requirements question
>
>
> I've got a question. I want to run this Struts sample app at home but I'm
> running Windows ME. I've downloaded the Apache web server but it isn't
> really supported on ME. I don't want to make this exercise any harder than
> it needs to be, so I'm thinking of upgrading my OS to Windows XP
> Professional. What I can't figure out from the Microsoft site is:
> Can I run
> services on Windows XP Professional? Or can I run them on the regular XP?
> Would I be better of upgrading to Windows 2000 Professional? I know I can
> run services on that. I know the missus wouldn't be pleased if I switched
> our PC to Linux so it's either 2000 Pro or some kind of XP. (I think).
>
> You don't happen to have any insight here, do you?
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>


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




Re: getting nested tags to work with DynaActionForm???

2002-07-18 Thread Adam Hardy

Arron,
I wonder how your lazy initialisation works. I'm afraid I didn't look at 
the code - since you said you wanted to explain it to the masses anyway, 
perhaps you won't mind explaining, rather than telling me not to be so 
lazy myself. Basically, if you have your example:

In the request parameters:

monkey[1].bunch[2].banana[3].color

how does your collection wrapper know what class to instantiate for 
monkey, bunch, etc etc? Is this something that you configure in xml 
somewhere? Presumably an extension to dynaform configuration?


Adam


Arron Bates wrote:
> Craig, wouldn't this be fixed by getting the collections in the DynaForm
> to be wrapped by the lazy lists I commited a few weeks ago to
> commons?... then when they're being created when the request comes in,
> it'll all grow as needed and it'd just happen.
> 
> 
> Been missing the past couple of weeks due to bad flu among other things.
> Love to get in there and code it, but time is hard to find at the moment
> and there's other things I need to get on to, but the above feels like a
> good marriage.
> 
> One of the things I have to do is describe the lazy collections to the
> masses. Seems a few have had list constrcution issues with request scope
> beens in the last fortnight.
> 
> 
> 
> On Wed, 2002-07-17 at 12:45, Craig R. McClanahan wrote:
> 
>>
>>On Tue, 16 Jul 2002, Rick Reumann wrote:
>>
>>
>>>Date: Tue, 16 Jul 2002 22:04:54 -0400
>>>From: Rick Reumann <[EMAIL PROTECTED]>
>>>To: Craig R. McClanahan <[EMAIL PROTECTED]>
>>>Cc: Struts Users Mailing List <[EMAIL PROTECTED]>
>>>Subject: Re[2]: getting nested tags to work with DynaActionForm???
>>>
>>>On Tuesday, July 16, 2002, 9:04:04 PM, Craig R. McClanahan wrote:
>>>
>>>CRM> Setting stuff like this up in the reset() method is the standard approach.
>>>CRM> Arrays have to exist already for either standard JavaBean-based
>>>CRM> ActionForms, as well as DynaActionForms.
>>>
>>> I'm still a bit confused by this. When I use a standard
>>> ActionForm I don't have to do anything special with my ArrayList
>>> in the ActionForm. A page that uses this ArrayList works fine.
>>> However as soon as I try to use this ArrayList as property in a
>>> DynaActionForm I run into problems trying to submit a jsp page
>>> that was populated with the ArrayList info (the display works
>>> fine, it's just upon submission).
>>>
>>
>>If you're using request scope beans, a new instance gets created on every
>>request.  And I will bet that you probably have an initialization of this
>>array happening in your constructor, or in an initialization expression,
>>right?
>>
>>For DynaActionForm instances, the default initialization of all
>>non-primitives in null.  That's why you still need to initialize in
>>reset(), or use the new "initial" property described below.
>>
>>
>>>CRM> In recent nightly builds, we added support for an additional mechanism --
>>>CRM> you can declare an intiialization expression for arrays in the
>>>CRM>  for a DynaActionForm bean, using the "initial" attribute.
>>>CRM> The syntax is basically like what you use in Java to initialize an array
>>>CRM> to a set of values in a variable declaration -- for example:
>>>
>>>CRM>   >>CRM>  type="org.apache.struts.action.DynaActionForm">
>>>
>>>CRM> >>CRM> initial="{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }"/>
>>>
>>>CRM>   
>>>
>>>   What if the information in an ArrayList of beans that you want in a
>>>   DynaActionForm is to first be populated by some database info.
>>>   Do you need to first initialize it like a above to a bunch of
>>>   nulls? If so what if the list size fluctuates (hence use of
>>>   ArrayList) how do you know how many to initialize the ArrayList
>>>   with?
>>>
>>
>>That's definitely a place where loading the arrays in the reset() method
>>makes sense.
>>
>>Having an "intArray" property of type "int[]" on a DynaBean is very much
>>like having the following method signatures on a standard JavaBean:
>>
>>  public int[] getIntArray();
>>  public void setIntArray(int intArray[]);
>>
>>so you don't have to pre-initialze the array to nulls or anything.  Just
>>set up the array you want as a local variable (of any desired
>>length), populate its values, and call:
>>
>>  int intArray[] = ...;
>>  dynaform.set("intArray", intArray);
>>
>>One really common scenario is that you don't know ahead of time how many
>>items you're going to read from the database.  An approach I use a lot is
>>to use an ArrayList to accumulate the values, then convert them to an
>>array.  Something like this (assuming you have a "labels" property of
>>type "java.lang.String[]"):
>>
>>  ArrayList temp = new ArrayList();
>>  Connection conn = ...;
>>  Statement stmt = conn.createStatement();
>>  ResultSet rs = stmt.executeQuery("select label from customer_types");
>>  while (rs.next()) {
>>temp.add(rs.getString(1));
>>  }
>>  String labels[] = (String[]) temp.toArray(new String[temp.size()])

RE: Newbie Struts requirements question

2002-07-18 Thread Niall Pemberton

You don't have to have a web server to run struts - you do need a servlet
container such as Tomcat. I don't know anything about Windows ME, but I used
to run Tomcat of Windows 98 at home, before I upgraded to Win2000.

Niall

> -Original Message-
> From: Ballard [mailto:[EMAIL PROTECTED]]
> Sent: 18 July 2002 19:57
> To: [EMAIL PROTECTED]
> Subject: Newbie Struts requirements question
>
>
> I've got a question. I want to run this Struts sample app at home but I'm
> running Windows ME. I've downloaded the Apache web server but it isn't
> really supported on ME. I don't want to make this exercise any harder than
> it needs to be, so I'm thinking of upgrading my OS to Windows XP
> Professional. What I can't figure out from the Microsoft site is:
> Can I run
> services on Windows XP Professional? Or can I run them on the regular XP?
> Would I be better of upgrading to Windows 2000 Professional? I know I can
> run services on that. I know the missus wouldn't be pleased if I switched
> our PC to Linux so it's either 2000 Pro or some kind of XP. (I think).
>
> You don't happen to have any insight here, do you?
>
> --
> To unsubscribe, e-mail:
>  [EMAIL PROTECTED]>
> For
> additional commands, e-mail:
> 
>


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




Re: Related Select lists

2002-07-18 Thread Adam Hardy

I would output the data into javascript arrays in a JSP. The tags work 
just as well mixed in with javascript as they do with html.

Depends what your target browser is. If it includes NS4 you've got more 
problems, but otherwise it should be fairly simple - use the onchange 
event on the select boxes to rewrite the options in the next select 
using the DOM manipulation methods.

Adam

Ben A. Geyer wrote:
> I have an application that needs to provide a way for a user to drill down
> through hierarchical data.  I'd like to do what heavyweight clients are
> able to do and relate two select lists to each other.  That way, when a
> choice is made from the first select, the options in the second are
> filtered to those relating.  ColdFusion has a custom tag which generates a
> bunch of Javascript to do this.  I'd like to find the best way to do it
> with Struts.
> 
> Any thoughts?
> 
> Thanks,
> Ben Geyer
> Caterpillar Inc.
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 



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




Re: the context

2002-07-18 Thread Adam Hardy

Sounds like Deep Thought you're dealing with there. Similarly to 
Magicthighs and Broomfondle, you have unfortunately not defined your 
question enough and the answer would take 7.5 million years to formulate.

Adolfo Miguelez wrote:
> Hi All,
> 
> we are are developing a framework based on Struts, and adapting Struts 
> to a propietary middleware which, in turns, as usually, deals with the 
> backends. Struts would make up the presentation layer, more or less, 
> delegating in other layers for the business stuff.
> 
> It has been suggested a patter model, which I did not know before, and, 
> approximately, it is based in a XML which holds all the application data 
> in a tree structure grouped by functional roles. In that way, the data 
> is not spread all around the app, but it is wrapped in this functional 
> abstraction. It could be seen as a central structure for holding all the 
> model (and i.e. the state) of the app. It is termed THE CONTEXT
> 
> Actions fills the context, and send it to the middleware, which, in 
> turns, sends it to business layer. It has empty fields for the data that 
> has not been obtained yet (actually all the app data is wrapped inside 
> the context). Business layer fills the new data into the context, and 
> the whole context is sent back to the action which, in turns, extract 
> the output data from it to fill the value objects and send this to the 
> JSP for rendering.
> 
> Well, we are having actually, quite a lot of problems in integrating  
> this new element with Struts, with the ActionForms, with the validator.
> 
> It is actually as a huge value object holding all the data of the app, 
> travelling forwards and backwards along the app layers.
> 
> My questions are:
> - has any of you seen a similar pattern? Any pointer is welcome. I do 
> not identify anything in the GoF patterns, but maybe I am not realising 
> of some of them.
> - what is your opinion about it?
> - could Struts, in future releases, include a context for wrapping the 
> data model for the app?
> 
> Thanks in advance and sorry for the philosophical question,
> 
> Adolfo
> 
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 



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




RE: Newbie Struts requirements question

2002-07-18 Thread Kamholz, Keith (corp-staff) USX

I don't do much hardcore programming on my home computer, but I do have
Windows XP on it.  For non-programming reasons, I couldn't live without XP.
I love it.  On my work computer I have Windows 2000 Pro, and all of my
programming software runs fine on it.  However, I am using WSAD, so I don't
know if the Apache web server would be much different.  I do love my XP
though...

~ Keith
http://www.buffalo.edu/~kkamholz


-Original Message-
From: Ballard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: Newbie Struts requirements question


I've got a question. I want to run this Struts sample app at home but I'm
running Windows ME. I've downloaded the Apache web server but it isn't
really supported on ME. I don't want to make this exercise any harder than
it needs to be, so I'm thinking of upgrading my OS to Windows XP
Professional. What I can't figure out from the Microsoft site is: Can I run
services on Windows XP Professional? Or can I run them on the regular XP?
Would I be better of upgrading to Windows 2000 Professional? I know I can
run services on that. I know the missus wouldn't be pleased if I switched
our PC to Linux so it's either 2000 Pro or some kind of XP. (I think).

You don't happen to have any insight here, do you?

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Using Struts Tags in Dreamweaver MX

2002-07-18 Thread Matt Raible

This is the best tip I've seen in a long time!

http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg36364.ht
ml

Thanks!

Matt


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




Re: Problem with session ojects: memory size, updates

2002-07-18 Thread Adam Hardy

Value objects that can be serialized can be automatically saved to disk 
by your application server, if it provides memory management 
configuration options.

If your session fills up with data, then the app server can be 
configured to remove the data from memory and store it on disk. I think! 
  Never actually done it myself.




Heligon Sandra wrote:
> I read Value Object pattern on J2EE design pattern
> http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html.
> 
> I understood that JavaBean are an implementation of ValueObjects.
> "a value object represents a business object, but it doesn't need to provide
> business methods on top of its data; it only provides methods to read its
> data, which makes it an ideal candidate for local access rather than remote
> access." 
> 
> So I don't understand your remark "Another possible solution is to create
> Value Objects and serialize them". Did you want to say that EJB is a
> solution?
> Because we don't want to work with EJB.
> In my architecture I get data from an enterprise back-end
> system and then Action class create Value Objects(JavaBean) if the object
> required doesn't exist. 
> If I need to update data on the back-end server, then a manager is in charge
> of serializing and sending JavaBean across the Network.
> But to maintain user information (JavaBeans) over multiple requests and pass
> data between
> Action and JSP I need to store ValueObject in a cache(session or request
> scope).
> Could you detail please why ValueObejct serialization can be a solution to
> session size
> growth ?
> 
> Thanks a lot in advance
> 
> -Original Message-
> From: Manish_Purang [mailto:[EMAIL PROTECTED]]
> Sent: 16 July 2002 07:31
> To: Struts Users Mailing List
> Subject: RE: Problem with session ojects: memory size, updates
> 
> 
> hi,
> 
> Maybe you could take a look at any of the ejb or java bean design pattern
> books to get an exhaustive idea about the value objects ..! you can download
> one free pdf version from the serverisde.com-- (Ejb Design patterns by Floyd
> Marinescu ) 
>  
> Rgds
> 
> -Original Message-
> From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 10:52 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Problem with session ojects: memory size, updates
> 
> 
> Perhaps my question is  stupid but I am not sure to know the Value object
> notion well.
> Could you give more details about Value Objects?
> What is the difference between JavaBean and ValueObject(or Data Transfer
> Object also I believe)?
> Value objects are shared by the web and the back-end tier.
> 
> Thanks
> Sandra 
> 
> -Original Message-
> From: Dave Hodson [mailto:[EMAIL PROTECTED]]
> Sent: 16 July 2002 00:38
> To: Struts Users Mailing List
> Subject: RE: Problem with session ojects: memory size, updates
> 
> 
> Another possible solution is to create Value Objects and serialize them...
> 
> Dave
> 
> ---
> Dave Hodson 
> MessageCast, inc.
> Email: [EMAIL PROTECTED]  
> www.messagecast.net
> 
> 
> 
>>-Original Message-
>>From: Jesse Alexander (KADA 11) [mailto:[EMAIL PROTECTED]]
>>Sent: Sunday, July 14, 2002 10:56 PM
>>To: Struts Users Mailing List
>>Subject: RE: Problem with session ojects: memory size, updates
>>
>>
>>Hi Sandra,
>>
>>I prefer to remove the objects from the session as soon as I can 
>>declare that they are not usefull anymore.
>>EG.: In action_1 I build a model-object, use it in jsp_1 and
>>process the users action in action_2. If the usecase is finished here,
>>I remove the object from the session.
>>
>>As for session size: The 4kB recommendation comes from servers that
>>support clustering. Because the session must be propagated to all
>>members of the cluster, it should be kept as small as possible.
>>We have a few application running with substantial numbers of 
>>concurrent
>>users that can have up several megabytes of session-data. If 
>>the usecase
>>needs it, do it. Often we have the case that a few users need lots of 
>>session data, and most users just a few bytes...
>>Ok for us session-data is used, because our persistance level is on a 
>>CORBA-backend host and we have no jdbc on our midrange. Therefor we 
>>calculate it is cheaper to a few Gig of memory to our servers in order
>>to save on network-data-transfer.
>>
>>hope this helps
>>Alexander
>>
>>-Original Message-
>>From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
>>Sent: Freitag, 12. Juli 2002 13:11
>>To: 'Struts Users Mailing List'
>>Subject: RE: Problem with session ojects: memory size, updates
>>Importance: High
>>
>>
>>Thanks John for your response,
>>
>>I have already read the message
>>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
>>34592.html
>>but I would like to have more details with real examples. 
>>I believe that the best way is to try.
>>I read that objects in the session must be removed unlike the request
>>objects. 
>>Is it good to do that when the applicati

Newbie Struts requirements question

2002-07-18 Thread Ballard

I've got a question. I want to run this Struts sample app at home but I'm
running Windows ME. I've downloaded the Apache web server but it isn't
really supported on ME. I don't want to make this exercise any harder than
it needs to be, so I'm thinking of upgrading my OS to Windows XP
Professional. What I can't figure out from the Microsoft site is: Can I run
services on Windows XP Professional? Or can I run them on the regular XP?
Would I be better of upgrading to Windows 2000 Professional? I know I can
run services on that. I know the missus wouldn't be pleased if I switched
our PC to Linux so it's either 2000 Pro or some kind of XP. (I think).

You don't happen to have any insight here, do you?

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




RE: Form not keeping changed values

2002-07-18 Thread Brian Holzer

Hi Pam,
   I believe that if you set the scope of your form to session, rather than request 
and set redirect="true" for the definition of your local forward in the 
struts-config.xml file. I think that your changes should remain in tact when you get 
to the next Action ( this assumes, of course that your reset() method on the form does 
nothing).  I don't know if this will fit into your design but I believe that this will 
work.

Brian

>>> "Wilinski, Pamela M." <[EMAIL PROTECTED]> 07/18/02 09:35am >>> 
That's where the issue lies...it forwards to an action. It seems that an 
action calling an action isn't a workable solution. I'll have to revisit 
the design and see if I can come up with a better solution. 

Thanks for your help. 

-Original Message- 
From: James Mitchell [ mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 18, 2002 1:04 AM 
To: Struts Users Mailing List 
Subject: RE: Form not keeping changed values 


This will work just fine if forwarding to a jsp and not another action. 


James Mitchell 
Software Engineer\Struts Evangelist 
Struts-Atlanta, the "Open Minded Developer Network" 
http://www.open-tools.org/struts-atlanta 




> -Original Message- 
> From: Wilinski, Pamela M. [ mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 17, 2002 5:46 PM 
> To: 'Struts Users Mailing List' 
> Subject: RE: Form not keeping changed values 
> 
> 
> public ActionForward perform( 
> ActionMapping mapping, 
> ActionForm form, 
> HttpServletRequest request, 
> HttpServletResponse response) 
> throws ServletException 
> { 
> KRLogger.addContext(KRActionUtil.getUserId(request)); 
> 
> ActionForward forward = mapping.findForward("success"); 
> ActionErrors errors = new ActionErrors(); 
> //ReportForm reportForm = null; 
> 
> if (form instanceof ReportForm) { 
> ReportForm reportForm = (ReportForm) form; 
> 
> < determining value of forward based upon field from form>> 
> 
> request.setAttribute(mapping.getName(),reportForm); 
> 
> return (forward); 
> } 
> 
> Once I get to the action I forward to the changes I made are gone. 
> 
> -Original Message- 
> From: James Mitchell [ mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 17, 2002 4:27 PM 
> To: Struts Users Mailing List 
> Subject: RE: Form not keeping changed values 
> 
> 
> What do you mean it didn't work? 
> 
> Can you provide a few snippets of code? 
> 
> 
> James Mitchell 
> Software Engineer\Struts Evangelist 
> Struts-Atlanta, the "Open Minded Developer Network" 
> http://www.open-tools.org/struts-atlanta 
> 
> 
> 
> 
> > -Original Message- 
> > From: Wilinski, Pamela M. [ mailto:[EMAIL PROTECTED]] 
> > Sent: Wednesday, July 17, 2002 5:16 PM 
> > To: 'Struts Users Mailing List' 
> > Subject: RE: Form not keeping changed values 
> > 
> > 
> > I tried that and it didn't work. 
> > 
> > -Original Message- 
> > From: James Mitchell [ mailto:[EMAIL PROTECTED]] 
> > Sent: Wednesday, July 17, 2002 4:04 PM 
> > To: Struts Users Mailing List 
> > Subject: RE: Form not keeping changed values 
> > 
> > 
> > Are you saving the form in the request (or session) before forwarding? 
> > 
> > James Mitchell 
> > Software Engineer\Struts Evangelist 
> > Struts-Atlanta, the "Open Minded Developer Network" 
> > http://www.open-tools.org/struts-atlanta 
> > 
> > 
> > 
> > 
> > > -Original Message- 
> > > From: pmwilinski [ mailto:[EMAIL PROTECTED]] 
> > > Sent: Wednesday, July 17, 2002 8:57 AM 
> > > To: [EMAIL PROTECTED] 
> > > Subject: Form not keeping changed values 
> > > 
> > > 
> > > Hi all, 
> > > 
> > > I have a problem with changes that are made in the action to values 
> > > in my form being thrown out when it forwards to the next page. Does 
> > > anyone know why this might be happening and how to make the changes 
> > > stick??? 
> > > 
> > > Thanks, 
> > > 
> > > Pam 
> > > 
> > > 
> > > -- 
> > > To unsubscribe, e-mail: 
> > > < mailto:[EMAIL PROTECTED] > 
> > > For additional commands, e-mail: 
> > > < mailto:[EMAIL PROTECTED] > 
> > > 
> > > 
> > 
> > -- 
> > To unsubscribe, e-mail: 
> > < mailto:[EMAIL PROTECTED] > 
> > For additional commands, e-mail: 
> > < mailto:[EMAIL PROTECTED] > 
> > 
> > -- 
> > To unsubscribe, e-mail: 
> > < mailto:[EMAIL PROTECTED] > 
> > For additional commands, e-mail: 
> > < mailto:[EMAIL PROTECTED] > 
> > 
> > 
> 
> -- 
> To unsubscribe, e-mail: 
> < mailto:[EMAIL PROTECTED] > 
> For additional commands, e-mail: 
> < mailto:[EMAIL PROTECTED] > 
> 
> -- 
> To unsubscribe, e-mail: 
< mailto:[EMAIL PROTECTED] > 
For additional commands, e-mail: 
< mailto:[EMAIL PROTECTED] > 



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



Setter Methods not being called in nested:iterate scenario :+(

2002-07-18 Thread hemant

Comrades,

I am trying to Iterate over a Collection of Collections of ValueObjects and after some 
real painful experimentation (With VA 3.5.3 + Apache Tomcat + Poolman ), I got the 
page to come up properly :). So far so good. I went out and celebrated for a few 
minutes... 

The getter methods seem to work fine. But the user data is not being captured on 
Submit :(

Please throw some light on this...

Here is the snippet from my JSP.







 


  

...
...



   Description
   




For some reason, the setter Method of setDescription(String xyz) is not being called.


Please help...


Many Thanks for Your Time

Regards
hemant






[OT] Keystrokes

2002-07-18 Thread Mark Nichols

I know it's not Friday (here) (yet) but I wanted to share this mindless bit
of fluff. Go to http://dolphin.bitdevil.com and download the client there
and install it on your PC. It counts the keystrokes you make and ranks you
against the other dolphin users. Some parts of web application development
are surprisingly keystroke intensive while others not so much.

Just for grins I have created a team where like minded Struts users can
combine their keystrokes. Once you have an account established, join
'teamStruts' (password: jakarta). The leading team has 486 members and over
315 million keystrokes to their name. Are Struts users up to the challenge?
Join up and find out...


dolphin account: zan5hin


--
-- mark h nichols
-- principal consultant
-- par-ti-tion Software
--


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




Does anybody know how to use Javascript Version 1.2 with the struts tag

2002-07-18 Thread Declan O'Shanahan (CAPE)

Hi there,

I am using Javascript with Struts for validation of input fields and I need
to be able to use Javascript version 1.2. I have checked the struts-html.tld
and there is no attribute to set the Javascript version. In the html that
gets generated the Javascript version is set to 1.1.

I have checked the class
org.apache.struts.taglib.html.JavascriptValidatorTag and the method
getJavascriptBegin sets the Javascript version to 1.1. If anybody knows of a
way to change the Javascript version to 1.2 without changing the struts code
base I would like to know how to do it.

Regards,

Declan.



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




Struts problem

2002-07-18 Thread olivier . fousse

> Hi ,
>
> I am using Struts framework to fecilitate MVC architecture for my
> application.
> After runing my tomcat server it is not finding
> ApplicationResources.properties file.
> its in tomcat\jakarta-tomcat-3.2.3\webapps\struts-blank\WEB-INF\classes
> dir
> where index.title is defined in ApplicationResources.properties file
>
> tomcat ver 3.2.3
> struts ver 1.0
>
> pls see the Error log below.
>
> Thanks,
> Olivier.
>
> Error: 500
>
> Location: /struts-blank/index.jsp
>
> Internal Servlet Error:
>
> javax.servlet.ServletException: Missing message for key index.title
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
> mpl.java:459)
> at
> _0002findex_0002ejspindex_jsp_0._jspService
(_0002findex_0002ejspindex_jsp_
> 0.java:227)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.
> java:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.
> java:282)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:
> 812)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Htt
> pConnectionHandler.java:213)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> at java.lang.Thread.run(Thread.java:484)
>
> Root cause:
>
> javax.servlet.jsp.JspException: Missing message for key index.title
> at
> org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
> at
> _0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_
> 0.java:90)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.
> java:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.
> java:282)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:
> 812)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Htt
> pConnectionHandler.java:213)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> at java.lang.Thread.run(Thread.java:484)
>




This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

-

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permett

Lost bean ?

2002-07-18 Thread Bugra Cakir


Hi,

I have forwarded to jsp from an action servlet a bean
called "modform" then in this jsp file I populated
a form with information in this bean. Then post to
another action servlet. But within this servlet it is
lost i think. What is the matter ?

BUGRA CAKIR


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




RE: What does locale="true" really do?

2002-07-18 Thread Kurosaka, Teruhiko

> Unless the application overrides it.  However, AFAIK, containers will
> all implement ServletRequest.getLocale() in terms of the 
> highest priority

Let me see if I understand it properly.

If a Japanese user sets browser so that his preferred
language is Japanese (accept-language: ja), and sends it to a German
speaking Struts application, the application will respond with
, even though it should have said "de" for
German.  Is this what will happen?

This is what I suspected and I fear Struts may be broken in this area.
There needs a way for application to insert its own logic to
interpret the acceptable languages from the request, determine the best 
language available, and set its decision on the request object.  Then,
locale="true" generating  makes sense.  Otherwise,
it is a mechanism that create a false information, and is rather
harmful than useful.

> language listed on the Accept-Language header -- that's what Tomcat 4
> does -- so this represents the *requested* language unless 
> the application
> changes to something else.

Is there anyway for Struts application to call setLocale on the request
object before it constructs Content-Language header?

-kuro

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




RE: Struts/Container-Managed Authentication Question

2002-07-18 Thread Nelson, Laird

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]

(First off, I take your point, but am just stupid enough to think that an
implementation is nevertheless possible.  The following is just to spur
further thought.)

> What'a a "user" (i.e. what properties does one have)?

Exactly what it is in container-managed authentication, e.g. a Principal.
Container implementations could hold whatever the container decides they
should hold.  *That* data would *not* be portable across containers--only
the Principalness would be, and the addUser(Principal) method (or some
such).

> What's a "role"?

Exactly what it is in container-managed authentication, e.g. a String.

> How about "groups"?

Groups are roles, just as they are in container-managed authentication.

> Oh, and now I need SSL certificates.

No, not necessarily, because container-managed authentication via the
mechanisms supported out of the box does not need them.

(And so on.)

Cheers,
Laird


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




RE: Model 2 and Caching

2002-07-18 Thread Jacob Hookom

Thanks, I will take a look!

Jacob Hookom

-Original Message-
From: John Nicholas [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 18, 2002 10:18 AM
To: Struts Users Mailing List
Subject: Re: Model 2 and Caching

Jacob Hookom wrote:
> Would writing the xml data out statically and storing it, then using
> translets for XSLT offer any speed improvements over simply caching
with
> OSCache or other similar tags?
> 

Check out Cocoon at http://xml.apache.org/cocoon/index.html. It's 
dynamic xml/xslt publishing system written in java and has a nice 
caching approach so it doesn't do the transform every time. it's not 
based around struts or jsp but it seems very nice if you're in an xml 
heavy setting.It also has that friendly Apache license.

John Nicholas
Sr Interactive Programmer
Temerlin McClain





--
To unsubscribe, e-mail:

For additional commands, e-mail:


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 


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




RE: (newbie) html:text tag, enforcing numeric input

2002-07-18 Thread René Eigenheer

have a look at "struts validator"

> -Original Message-
> From: Glen Mazza [mailto:[EMAIL PROTECTED]]
> Sent: Donnerstag, 18. Juli 2002 19:38
> To: [EMAIL PROTECTED]
> Subject: (newbie) html:text tag, enforcing numeric input
>
>
> Quick question (I couldn't find the answer in the
> Struts documentation):  How do I enforce numeric (as
> opposed to alphanumeric) entry into html:text tags.
>
> For example:
>
>  maxlength="5"/>
>
> I would the user just to be able to type numbers for
> this field.
>
> 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: 




RE: (newbie) html:text tag, enforcing numeric input

2002-07-18 Thread Kamholz, Keith (corp-staff) USX

You should generally use Strings for your form bean properties.  When you
validate it, check to see if the numbers were entered.  Then in either the
form or the action, you can convert the String to some kind of number, using
the Integer class.  The class has some kick ass methods for type
conversions.
Good luck.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: Glen Mazza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 1:38 PM
To: [EMAIL PROTECTED]
Subject: (newbie) html:text tag, enforcing numeric input


Quick question (I couldn't find the answer in the
Struts documentation):  How do I enforce numeric (as
opposed to alphanumeric) entry into html:text tags.  

For example:



I would the user just to be able to type numbers for
this field.

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: 




RE: Struts/Container-Managed Authentication Question

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, Nelson, Laird wrote:

> Date: Thu, 18 Jul 2002 13:14:49 -0400
> From: "Nelson, Laird" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Struts/Container-Managed Authentication Question
>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > I do not believe there will ever be such a thing as a "generic"
> > application security solution that meets a large majority of people's
> > needs.  The problem is that the needs (well, at least their
> > wants :-) vary
> > too much, so any given "application security solution" is
> > going to have
> > its own design limits that people are going to run into.
>
> A nice middle ground that would not require boiling the ocean would be a
> simple interface that allows callers to add, update and remove users and
> roles.

What'a a "user" (i.e. what properties does one have)?  What's a "role"?
How about "groups"?  Oh, and now I need SSL certificates.  And
public/private keys.  And application-specific extension properties.  Oh,
don't forget to link into external authentication infrastructures (like
Project Liberty, or Passport in the MS world).  But I've already *got*
users defined in my database, and just want to use those.  And ...

Is that global warming I'm feeling?  :-)

>  I find that the only thing I usually need above and beyond the
> current container-managed security API is the ability to create new users
> and roles.  Every container I've worked with has the ability to make these
> calls with their own APIs--all the concepts and logical objects are the
> same--but the implementations basically suffer from name incompatibilities.
>

Answering these kinds of questions for a single server or application is
fairly easy.  Answering them globally for a portable standard is quite a
bit of work.

> Cheers,
> Laird

Craig


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




(newbie) html:text tag, enforcing numeric input

2002-07-18 Thread Glen Mazza

Quick question (I couldn't find the answer in the
Struts documentation):  How do I enforce numeric (as
opposed to alphanumeric) entry into html:text tags.  

For example:



I would the user just to be able to type numbers for
this field.

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: 




[ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread chuckcavaness

Chapter 18 "Logging in a Struts Application" has been 
posted on theserverside.com. 

http://www.theserverside.com/resources/strutsreview.jsp

The EJB Chapter is finished and will be posted within 
the next day or so, followed by Tiles and the 
Performance chapter.

Chuck

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




RE: Struts/Container-Managed Authentication Question

2002-07-18 Thread Nelson, Laird

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> I do not believe there will ever be such a thing as a "generic"
> application security solution that meets a large majority of people's
> needs.  The problem is that the needs (well, at least their 
> wants :-) vary
> too much, so any given "application security solution" is 
> going to have
> its own design limits that people are going to run into.

A nice middle ground that would not require boiling the ocean would be a
simple interface that allows callers to add, update and remove users and
roles.  I find that the only thing I usually need above and beyond the
current container-managed security API is the ability to create new users
and roles.  Every container I've worked with has the ability to make these
calls with their own APIs--all the concepts and logical objects are the
same--but the implementations basically suffer from name incompatibilities.

Cheers,
Laird

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




RE: Struts event sequence

2002-07-18 Thread Roman Fail

> I don't personally agree with your philosophy on setting autoCommit to
> true, but I liked the page other than that :-) 

We only use stored procedures on our database, so autoCommit(true) is appropriate for 
us since all transactions are committed/rolled back within the stored procs 
themselves.  That was sort of an internal assumption within our company that wasn't 
mentioned in the doc.
 
Roman

-Original Message- 
From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
Sent: Wed 7/17/2002 7:06 PM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: Struts event sequence (WAS: getting nested tags to work 
withDynaActionForm???)



Hey - I wish I'd had that when I started with Struts!

I don't personally agree with your philosophy on setting autoCommit to
true, but I liked the page other than that :-) Add
Bookmark  I just feel having autoCommits off is a good thing.
 That way you have explicit control over the transaction.  If, however,
you typically don't need it, I can understand setting autoCommit(true).
 Maybe I'm just too anal ;-)

Thanks :-)

Eddie


Roman Fail wrote:

>This is the very basic outline of Struts events (with some helpful comments) 
that I worked up when I was using Struts 1.0, although most of it is still the same.  
Basically I've just expanded steps 3 & 4 of Dan's diagram a bit.  Chapter 5 of Chuck's 
book is much more detailed than this, and an excellent resource (Thanks, Chuck!).  In 
fact I think chapter 5 might be a bit overwhelming for a newbie, and reading the 
ever-changing Struts source code is not comfortable at first. 
>
>I've found that this little outline has helped our new Struts developers a 
lot.  Craig suggested a nice UML sequence diagram for the docs, which would be great - 
but I'm not fluent in UML yet.  Here's my document - keep in mind it's been about a 
year since I wrote this, but I'd be happy to take suggestions on updating it:
>
>http://www.posportal.com/StrutsOverview.html
>
>Roman Fail
>Sr. Web Application Developer
>POS Portal, Inc.
>







Re: CachedRowset with logic:iterate tag

2002-07-18 Thread aps olute

Ok from what I gather from the responses, it is not
necessary to use Struts Tags to iterate the contents
of the CachedRowSet.  However I would still like how
to do this. I've looked at webPIM, and were not able
to download as there are no jar files or zip files
package I saw at sourceforge.net, am not about to
pick bits and pieces and spend so much time putting it
together, if a better download site is provided i'd
apprecite it.
Am still not clear if it requires a Collection type
to do any of these iterations, not just logic, but in
html: tags too and what have you.

aps

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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




RE: Struts/Container-Managed Authentication Question

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, Joe Celentano wrote:

> Date: Thu, 18 Jul 2002 12:02:27 -0400
> From: Joe Celentano <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: Struts/Container-Managed Authentication Question
>
> Max Cooper wrote:
>
> > Another alternative is to use a filter to mimic container-managed security
> > [including wrapping the request with your implementations of
> > getRemoteUser()
> > and isUserInRole()]. This way, you could provide a programmatic
> > interface to
> > log users in with an Action, ...
>
> I have read MANY previous discussions on this list debating container vs.
> app managed security. Usually they end up suggesting that since container
> managed is limited, if you can't use it, then roll your own, similar to the
> above comment. Craig's reply also said basically the same thing.
>

Container managed security is just like any other technology -- it is
designed to meet a specific set of requirements.  If your requirements
match up with those features, great ... it's easy to use it.  If they
don't, then you can't.

My caution to you, though, is that rolling your own security makes it way
too easy to write insecure applications, because almost nobody who writes
apps is a security expert.  Plus, it's a pretty large amount of work to
get this right.  And those developer manhours are expensive.  And those
hours could have been used to work on your application instead of your
infrastructure ...

Also, if your app needs (or ever will need) EJBs, you're going to have to
use container managed security anyway.

> So is anybody aware of an Apache-like project that is attempting to
> implement a "generic" application security solution for this problem? I
> mean, with filters and the ability wrap the request, as Max mentioned, a
> pretty robust solution could be developed that could be easily extended for
> different db schemas, etc. Yet I feel like we're all reinventing the wheel
> here, each of us implementing tactical rather than strategic solutions.
>

I do not believe there will ever be such a thing as a "generic"
application security solution that meets a large majority of people's
needs.  The problem is that the needs (well, at least their wants :-) vary
too much, so any given "application security solution" is going to have
its own design limits that people are going to run into.

> Sorry if there's already been a discussion of these projects, but I looked
> and couldn't find any...
>
> Thanks,
> Joe
>

Craig


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




RE: Good/Bad Practices

2002-07-18 Thread Kamholz, Keith (corp-staff) USX

Yeah, that's what I prefer too, but I didn't know if having a shitload of
JSP's and action mappings meant that I was doing something wrong.  Thanks
for the input and the reassurance that I'm not doing something stupid.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: Mark Nichols [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 12:00 PM
To: Struts Users Mailing List
Subject: RE: Good/Bad Practices


I prefer the more granular approach, with many actions and JSPs over a more
complex and generalized approach. In my case I find that having
single-function actions and JSPs leads to easier coding today (and therefore
easier maintenance tomorrow). I can also split the work up over more
developers, rather than "single threading" development through one complex
action.

Our intranet application has about 60 separate 'screens', each with its own
action. Maybe overkill, but for a first attempt at Struts this pattern has
made life easier by far.



> -Original Message-
> From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:32 AM
> To: Struts (E-mail)
> Subject: Good/Bad Practices
>
>
> > Hey everyone,
> >
> > I've been trying to get in the habit of using good struts programming
> > practices, (without making things too hard on myself).  I have another
> > question for anyone that could give me some input on it.
> >
> > I'm working on a data entry application, and the user can make three
> > different types of entries.  Let's call them A, B, and C.  They
> each have
> > some form fields in common with each other, but each has a couple unique
> > fields.  To add an entry, I have a separate JSP for each, and different
> > action mappings for each (that all refer back to the same action class).
> > This works fine.
> >
> > Now I'm working on an edit function for the entries.  I have a
> link within
> > a  tag that displays a link to an edit form.  I
> tried using
> > one action and one JSP for the edits, but it gets very messy trying to
> > allow for the different types of entries.
> >
> > Is it a bad idea to use lots of different action mappings and different
> > JSP's for each operation for each type of entry, even though they are
> > similar and all have to perform very similar operations?  Or should I go
> > to great lengths to make very complex generalized actions and JSP's that
> > can handle any type of entry?  I'm not sure how understandable
> my question
> > is, or if it's a stupid question, but I want to get this figured out
> > before I spend too much more time on the 'edit' functionality.
> I'm having
> > some issues, and I keep redesigning the operation, so I'ld
> appreciate some
> > input before I rewrite this shiznat too many more times.  Thanks a lot
> > everyone!
> >
> >
> > ~ Keith
> > http://www.buffalo.edu/~kkamholz
> >
>
> --
> 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: weirdness in Websphere 3.5.5

2002-07-18 Thread Kamholz, Keith (corp-staff) USX

I see...
I don't know why you're using  though.  You
should have the 'do' extension in your JSP.  You shouldn't have to forward
like that, or expect it to be outputted when run.  So if I'm understanding
your situation correctly, you should just have  in your JSP, then you won't have to worry about forwarding or any of
that other stuff you're doing.  Does that make sense?

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 11:40 AM
To: [EMAIL PROTECTED]
Subject: Re:  weirdness in Websphere 3.5.5


Subject: Re:  weirdness in Websphere 3.5.5
From: "Reginald Ister" <[EMAIL PROTECTED]>
 ===
Oh, let me clarify,

In the VisualAge WTE,   is correctly rendered
as:


while in WebSphere 3.5.5, it is being rendered as:


I ended writing a servlet for WebSphere 3.5.5 that takes the
/app/login call and forwards it to the correct /app/do/login path.  Not a
big
deal, but I really wanted to try and figure out what was going on.

What I really need to do is to see if this behavior exists in other
WebSphere
environments.  Maybe 3.5.6 or 4.0.x. time permitting, I haven't seen anyone
else complain in this forum, so it's probably not a reoccurring problem.

Reg


"Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> H
> I'm not sure what to tell you.
> Are you saying it works with the proxy servlet, or that's what's not
> working?
>
> ~ Keith
> http://www.buffalo.edu/~kkamholz
>
>
> -Original Message-
> From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 6:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re:  weirdness in Websphere 3.5.5
>
>
> Subject: Re:  weirdness in Websphere 3.5.5
> From: "Reginald Ister" <[EMAIL PROTECTED]>
>  ===
> Keith, thanks for your input.
>
> The funny thing is that it works fine within the VisualAge test
environment.
> I just ran into this problem during deployment.  Haven't tried WebSphere
4.0
> yet.
> As I work around, I just wrote a proxy servlet to forward calls like
> /app/login to /app/do/login
>
> Reg
> "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > I think part of your problem is the way you specify your form in your
JSP.
> > You have action="login", but what you need is action="/do/login".  The
> 'do'
> > extension must be in the jsp, it isn't created when the page is visited.
> > Does that help you at all?
> >
> > ~ Keith
> > http://www.buffalo.edu/~kkamholz
> >
> >
> > -Original Message-
> > From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 16, 2002 1:10 PM
> > To: [EMAIL PROTECTED]
> > Subject:  weirdness in Websphere 3.5.5
> >
> >
> > Subject:  weirdness in Websphere 3.5.5
> > From: "Reginald Ister" <[EMAIL PROTECTED]>
> >  ===
> > Hi,
> >
> > I have the following action define in struts-config.xml:
> >
> >  >   type="com.mycompany.actions.LoginAction"
> >   name="loginForm"
> >   scope="request"
> >   validate="true"
> >   input="/jsp/login.jsp" />
> >
> > with the corresponding formbean:
> > 
> >
> > In my login jsp I have the form defined as
> > 
> >
> > When this is rendered in Websphere, the form action is:
> >
> > 
> >
> > While the correct rendering should be:
> > 
> >
> > Notice the missing "/do" pattern.  Has anyone else seen this behavior?
> >
> > I am using Struts 1.0.2 with Tiles
> >
> > Reg
> >
> >
> >
> > --
> > 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: Struts/Container-Managed Authentication Question

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, Mete Kural wrote:

> Date: Thu, 18 Jul 2002 08:46:46 -0700 (PDT)
> From: Mete Kural <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: Struts/Container-Managed Authentication Question
>
> Hello Craig,
>
> --- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> > If you are using container-managed security, you
> > either declare a security
> > constraint (to force a login) or you don't -- there
> > is no middle ground.
> > However, if the user went to your second sub-app
> > first, and then went to
> > the first one, the fact that they have logged in is
> > visible to your
> > application, because getRemoteUser() will still
> > return the logged-in
> > user's identity.
>
> That's exactly what I want to happen. To preserve the
> loggedinness of the user even when they go out of the
> protected area into the public area.
>
> > There is no such mechanism that is portable across
> > containers.  If you
> > want to use container managed security, you should
> > architect your
> > application inside its boundaries -- otherwise, you
> > should roll your own.
>
> Hmm.. I hope the JCP will include such a mechanism in
> Servlet 2.4. It would be nice to enable pre-processing
> on the form-based login submission in a servlet and
> then submit that to the container. Perhaps this is not
> a valid use case, but it seems to me that it may be
> attractive in certain scenarios.
>

It's not going to make it for Servlet 2.4 (which is currently in public
review, so you can see the proposed changes for yourself).  Dealing with
*all* of the issues required to make some sort of authentication plugin to
containers is probably a year's worth of of Expert Group work to define an
appropriate specification.


> > Quite frankly, I'm not convinced your use case is
> > very compelling, but I
> > undoubtedly don't understand the whole picture,
> > either.
>
> Think about Amazon.com. On Amazon, you can surf
> through the shopping pages with or without being
> logged in to your Amazon account. If you're logged in,
> some special features are enabled such as personal
> book recommendations on the sides of the pages. If
> you're not logged in it just treats you like a default
> customer that it doesn't know about. In this case, it
> is necessary to provide a login mechanism to better
> serve the customer even if login is not required.
>

Nothing stops you from accomplishing exactly this functionality.  The
page you describe would *not* be protected by a security constraint -- but
the logic that produces that page can tell if a user is logged in or not
(call request.getUserPrincipal() or request.getRemoteUser()) and vary the
generated HTML based on whether this value is null or not.

> >
> > Craig
>
> Thanks,
> Mete
>

Craig


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




Re: Form bean properties data types and conversions

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002 [EMAIL PROTECTED] wrote:

> Date: Thu, 18 Jul 2002 16:52:28 +0200
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Form bean properties data types and conversions
>
>
> I have seen, that in Struts 1.0 there is some support for automatic
> conversion of request parameters to form bean properties, which seems to be
> extending in the 1.1beta (i did not use it, but i navigated through the
> sources). There seem to be converters for date and time data types in the
> beta. So far, so fine.
>
> But i could not get any hint on the localisation. As Struts knows in his
> request the locale of the user and offers it to the Action programmer, will
> this locale be used to make any automatic conversions, too? For Struts 1.0
> this seems not to be the case, as far as i could see in the sources in half
> an hour. And the calls to the new DynaBean classes from the jakarta.commons
> project seem to lack any locale support, too. I can not see much use in an
> automatic conversion function of Dates (but also numbers), whithout any
> respect to the users locale, so i wondered if i am missing something.
>

The APIs for Converters is not currently Locale-sensitive, although it
could probably be made possible through an extended interface
(LocaleConverter or something) that passed an extra Locale argument along.

> Could someone shed som light on this?
>
> Regards,
>
> Jens Stutte
>

Craig


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




Re: CachedRowset with logic:iterate tag

2002-07-18 Thread Chad Johnson

You could use the "forEach" tag from JSTL
(http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html).  "forEach"
can iterate over ResultSet's (and RowSet's via inheritance) with the
assistance from the helper class: javax.servlet.jsp.jstl.sql.ResultSupport .
ResultSupport can convert ResultSet's to the JSTL friendly Result class.

-Chad Johnson

- Original Message -
From: "aps olute" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 6:19 PM
Subject: CachedRowset with logic:iterate tag


> How to iterate over a CachedRowSet using
>  tags? I have filled the CachedRowset
> with a select
> statement and am able to iterate using the
> crs.getString(1) or the crs.getString(colname)
> methods,
> but no am ready to use Struts tags but dont know how.
> Do I need to convert it a Collection type? but that
> will eat up more memory as two copies CRS and the
> Collection with same contents?
> Is it necessary to use the Struts tags to work with
> the rest of the Struts features?
>
> 
> <%@ page language="java" %>
> <%@ page contentType="text/html" %>
> <%@ page
> import="sun.jdbc.rowset.CachedRowSet,javax.naming.InitialContext"%>
>  class="sun.jdbc.rowset.CachedRowSet" scope="session">
> <% InitialContext ctx = new InitialContext();
>   javax.sql.DataSource ds =
> (javax.sql.DataSource)ctx.lookup("java:/DefaultDS");
>   java.sql.Connection con = ds.getConnection();
>   Contacts.setCommand("SELECT name,
> owner,species,sex,birth,death from pet");
>   Contacts.execute(con);
>   Contacts.first(); %> 
> 
>   type="sun.jdbc.rowset.CachedRowSet">
> 
> 
> 
>
>
> But nothing is ever printed. if i take out the
> logic:present and logic:iterate and replaced with a
> while (Contacts.next()  Contacts.getString(1)  at
> least
> i gets some output.
>
>
>
>
> __
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




Re: Retrieving mapping props as a Map

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, MacLeod, Kenny wrote:

> Date: Thu, 18 Jul 2002 12:00:29 +0100
> From: "MacLeod, Kenny" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Retrieving mapping props as a Map
>
> Folks,
>
> Is it possible to obtain the  items of an action mapping as a
> Map object, rather than have the digester attempt to invoke them as bean
> properties?
>
> I have a situation where I need to be able to pass arbitrary properties to
> the mapping, so the reflection mechnaism won't work.  Rather, I need access
> to those properties as a data structure.
>
> Any suggestions much appreciated,
>

There is no current mechanism to do this kind of thing.  One approach
would be to use the general purpose "parameter" property to pass a
reference to some external resource file that contains all the stuff that
your particular action needs to configure itself.

> kenny
>

Craig


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




Re: Need some help

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, Asit Kumar Padhi wrote:

> Date: Thu, 18 Jul 2002 15:29:28 +0530
> From: Asit Kumar Padhi <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Need some help
>
> All,
>
> I am new to the Struts Framework.I am involved in extending the framework
> for "Object Mapping" and "Testing" (Cactus or JUnit).Can anyone tell me how
> to extend the Struts framework and integrate them.I want some good resources
> in this regards.
>

Besides the Struts Test Case reference from another poster, you'll be
interested to know that both Cactus and JUnit tests are included in the
Struts sources, and can be run from the build.xml scripts.  To see them,
grab a nightly distribution of the sources
 and start at
the "test.junit" and "test.tomcat.all" targets in the top-level build.xml
file.

Similar techniques can be used to incorporate tests of your own apps that
are based on Struts.

> Thanks
>
> Asit
>
>

Craig



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




RE: RES: Objects In Session

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, DeVincentiis Giustino wrote:

> Date: Thu, 18 Jul 2002 11:31:35 +0200
> From: DeVincentiis Giustino <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: RES: Objects In Session
>
> Hi Craig,
>
> What about using database session state caching (see
> http://martinfowler.com/isa/databaseSessionState.html)
>

This article seems more concerned with the issues regarding a logical
transaction that takes more than one HTTP request to complete -- you don't
want to keep an actual database transaction open across requests.  But a
side effect of this approach will definitely help reduce memory occupancy
if you don't cache the data in memory.

You should also note that an app server could have built in facilities to
"swap" active but idle sessions out to a database or other persistent
storage mechanism, the same way that an operating system can swap out idle
processes.  It's worth checking the docs for your server to see what is
available in this regard.

Craig


> Oracle too, in his "Oracle 9iAS Best Practices White Paper", posted last
> week on OTN, suggests considering database session state (BP- SESSIONS-1:
> PERSIST SESSION STATE IF APPROPRIATE).
>
> Giustino De Vincentiis
>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 17, 2002 9:14 PM
> > To: Struts Users Mailing List
> > Subject: Re: RES: Objects In Session
> >
> >
> >
> >
> > On Wed, 17 Jul 2002, julio wrote:
> >
> > > Date: Wed, 17 Jul 2002 16:08:34 -0300
> > > From: julio <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > > Subject: RES: Objects In Session
> > >
> > > Hi Craig,
> > >
> > > How do you solve this problem for your site(like yahoo) with 1000
> > > users??
> > >
> >
> > * Save anything I need in hidden variables that are
> > resubmitted with the
> >   form, so I can still use request scope form beans.  That
> > way the info
> >   is effectively "cached" in the browser, instead of the
> > server.  (This
> >   is the biggest payoff, and the primary one that app developers have
> >   much control over.)
> >
> > * Reduce the amount of stuff that must be cached to an
> > absolute minimum,
> >   by not caching rarely used things (or things that don't affect
> >   performance visibly if you get them from the database every time).
> >
> > * For non-user-specific data, do your caching separately from the
> >   session, so that the same cached instance data can be reused.
> >
> > * Improve performance of my database server so that session caching
> >   becomes less important.
> >
> > * Buy more web server memory and/or more web servers (i.e. distribute
> >   the application).
> >
> > >
> > > Julio Cesar
> > >
> >
> > Craig
> >
> >
> > --
> > 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: 




Advantages of Container-Managed Authentication ??

2002-07-18 Thread Mete Kural

Hello,

So far I thought that container-managed authentication
was the way to go. Why I thought so? I thought:

1) Since such authentication is implemented by experts
in the field there's a much greater chance that their
implementation would be much more secure to attacks
then my own application-managed implementation.

2) The container has much more control in a servlet
environment than a web-app. Therefore if the container
is aware of the user who is making requests rather
than just the web-app, this would be an added security
incentive.

3) Struts tag library provides some neat tags such as
conditional tags based on the logged-in user's
identity and roles, and probably such tags will
flourish even more in the future. These tags support
only container-based authentication (am I right
here?). So if you're using container-managed
authentication you can use these tags, otherwise
you'll have to implement your own.

Do you guys think that three so-called advantages that
I've listed are really valid advantages and is there
any more advantages associated to container-managed
authentication?

Basically I'm asking all these questions because I'm
trying to decide whether I should abandon
container-managed authentication and implement my own.

Thanks,
Mete


__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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




RE: Arrgh!!! my property has been cursed and my bean doesnt likethe field on my farm , uhh form I mean

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, Andrew Hill wrote:

> Date: Thu, 18 Jul 2002 14:29:22 +0800
> From: Andrew Hill <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: Arrgh!!! my property has been cursed and my bean  doesnt
> like the field on my farm , uhh form I mean
>
> Ah well now, its funny you should be mentioning that.
>
> As it happens Old Mc Andrew did once have a method to set the field with a
> boolean, but changed it to take a string instead as he is quite set in his
> ways and has never liked booleans (as he learnt from a young age that
> providing a certain true or false answer instead of 'maybe' tends to create
> a few too many expectations in folk not wise to the ways of software
> development...).
>
> He has looked at his ActionForm code to try and determine is there is a
> second setter somewhere (he even looked behind the grassyKnoll() method) but
> found nothing. Old McAndrew has been known to occasionally miss things that
> are right under his nose however, and will continue to look.
>
> There ARE however multiple getter methods, or to be precise there is a
> method getHeaderTransform() and an  isHeaderTransform() the latter of the
> two returning a boolean. (The other similar fields also have these but they
> still work.)
>

Despite their protestations to the contrary, having two getters like this
is also a violation of the rules (the JavaBeans rules, that is).  It would
also be improper to have a getter that returns one type, and a setter that
accepts a different one.

"So where are these rules?" you might ask.  "How can I avoid such faux pas
in the future?"

http://java.sun.com/products/javabeans/

has a link that gets you to the JavaBeans specification, which includes a
whole chapter on how well mannered JavaBeans properties expose themselves
to the world.

Craig


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 14:05
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Arrgh!!! my property has been cursed and my bean doesnt
> like the field on my farm , uhh form I mean
>
>
>
>
> On Thu, 18 Jul 2002, Andrew Hill wrote:
>
> > Date: Thu, 18 Jul 2002 13:23:02 +0800
> > From: Andrew Hill <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
> >  [EMAIL PROTECTED]
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Arrgh!!! my property has been cursed and my bean  doesnt like
> > the field on my farm , uhh form I mean
> >
> > Or to be a little bit more specific...
> >
> > Old Mc Andrew had a form
> > and on that form he had a field
> > with the name "headerTransformation"
> > but naughty Mr Struts simply would NOT call the method
> > setHeaderTransformation in his ActionForm
> > even though it had not been a problem yesterday!
> >
>
> I hope old McAndrew isn't trying to have his cake and eat it too, by
> having more than one mistress, err, setHeaderTransformation() method that
> takes a different type of argument :-).  Such things violate the JavaBeans
> specification's design patterns, and will cause the JVM to think your
> property doesn't have any setter method at all.
>
> > No matter what Andrew looked at everything still seemed fine but it just
>
> >
> > didnt work!
> > He tried changing the field from a checkbox to a boring old text field
> > He tried dumping the request parameters to see if anything was dodgy there
> > - maybe multiple values were being submitted for that property?
> > but no - it all checked out ok, no matter where he looked.
> > Poor Andrew was getting VERY alarmed.
> >
> > Then he had a clever idea!
> > He changed the name of the field on his html form to
> "headerTransformationx"
> > ,
> > he also added a second setter named setHeaderTransformationx to his
> > actionform and then tried again.
> > Amazing! This time it worked!
> > Mr Struts went right ahead and called the setHeaderTransformationx method.
> > Andrew couldnt believe his eyes.
> >
>
> Makes it even more likely that old McAndrew is trying to double dip :-).
> After all, a property named "headerTransformationx" is completely naive
> and innocent about the existence of any property named
> "headerTransformation".
>
> > Just to test he renamed the field back to "headerTransformation"
> > and sure enough nasty Mr Struts gave it the cold shoulder again.
> >
> > Now Andrew is very confused. He hasnt the slightest clue why a parameter
> > named
> > "headerTransformation" is completely ignored by Mr Struts, while a
> parameter
> > named "headerTransformationx" is welcomed with open arms!
> >
> > Well boys and girls, perhaps you can help poor Andrew with his problem?
> > Can anyone give him a reason why silly Mr Struts has a bad attitude
> towards
> > his fieldnames?
> >
>
> Mr. Struts is like Miss Manners -- he frowns on trying to have serious
> relationships wit

RE: Indexed Properties - soluce :-)

2002-07-18 Thread Craig R. McClanahan



On Thu, 18 Jul 2002, Arnaud HERITIER wrote:

> Date: Thu, 18 Jul 2002 11:09:24 +0200
> From: Arnaud HERITIER <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Indexed Properties - soluce :-)
>
> Craig.
>
> Can you give us some news about the JSR 127 ??
>
> Do you have planned a draft for the JavaServer Faces ??
>

It is currently in "Community Review" in the JCP process, scheduled to end
on August 12.  Assuming positive votes by the JCP executive committee and
the JSR 127 expert group, the next phase after that is public review.

> Thx
>
> Arnaud
>

Craig


> > -Message d'origine-
> > De : Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Envoye : mercredi 17 juillet 2002 17:11
> > A : Struts Users Mailing List
> > Cc : [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Objet : RE: Indexed Properties - soluce :-)
> >
> >
> >
> >
> > On Wed, 17 Jul 2002 [EMAIL PROTECTED] wrote:
> >
> > > Date: Wed, 17 Jul 2002 15:30:38 +0200
> > > From: [EMAIL PROTECTED]
> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED],
> > >  'Struts Users Mailing List' <[EMAIL PROTECTED]>,
> > >  [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED]
> > > Subject: RE: Indexed Properties - soluce :-)
> > >
> > > Hi there,
> > >
> > > Actually when you are looking at the stuff done in the JSTL
> > > all three ways pretty much work, because it contains a
> > > scripting language ;).
> > >
> > > Are there any plans on integrating it within Struts? I like
> > > both libraries very much, and I recall a discussion was going
> > > on a while ago about it?
> > >
> > > If it is done this would make it is either:
> > >
> > >   1. property = "all I want to write"
> > >
> > >   2. property = "<%= java expression %>"
> > >
> > >   3. property = "${myRadios[param.index]}"
> > >
> >
> > My current thinking is that we'll make some variant of #3 available in
> > Struts tags, in a release after 1.1.  But this will primarily be as a
> > transition tool -- subsequent releases of Struts will be designed such
> > that you should use JSTL tags directly, as opposed to the
> > corresponding
> > Struts tags in the "bean" and "logic" libraries.  For the "html" tags,
> > we'll end up with JavaServer Faces tags when it's released.
> >
> > >   (here with 'index' as a request variable ;))
> > >
> > > Manfred.
> >
> > Craig McClanahan
> >
> >
> >
> > >
> > > > -Original Message-
> > > > From: Arnaud HERITIER [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, July 17, 2002 10:29 AM
> > > > To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> > > > Subject: RE: Indexed Properties - soluce :-)
> > > >
> > > >
> > > > All suggestions are welcome Eddie.
> > > >
> > > > Your idea and your argumentations are good, but your proposed
> > > > solution doesn't work :-(
> > > >
> > > > Explanations :
> > > >
> > > > In a taglib property you can use either a string value or a
> > > > RunTime Expression (if allowed in the TLD).
> > > >
> > > > If you use a string you have something like :  property="all
> > > > I want to write"
> > > >
> > > > If you use a RT Expr you have something like :
> > > > property="<%=java expression%>"
> > > >
> > > > The tag libraries interpreter verify if the content of the
> > > > property begins with <%= and ends with %> . In this case it
> > > > suppose that it is a RT Expr and values it. In all other case
> > > > it supposes that the content is a string.
> > > >
> > > > With your suggestion, property="myRadios[<%= index %>]" the
> > > > tag libraries interpretor see that there's not <%= at the
> > > > begining and %> at the end. Then it passes the value
> > > > "myRadios[<%= index %>]" as a string to the taglib.
> > > >
> > > > When the taglib get the content of property, it will analize
> > > > it and see that it is a indexed property because of [..] but
> > > > won't be able to interpret it and will launch an exception like :
> > > >
> > > > java.lang.IllegalArgumentException: Invalid indexed property
> > > > 'myRadios[<%=index%>]'
> > > >
> > > > However, it is important to say that your advice is totally
> > > > good if you want to use a dynamic value in standard html tag.
> > > >
> > > > I you have another idea to clean my code, don't hesitate to
> > > > propose it.
> > > >
> > > >
> > > > Arnaud.
> > > >
> > >
> >
> >
> > --
> > 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/Container-Managed Authentication Question

2002-07-18 Thread Joe Celentano

Max Cooper wrote:

> Another alternative is to use a filter to mimic container-managed security
> [including wrapping the request with your implementations of
> getRemoteUser()
> and isUserInRole()]. This way, you could provide a programmatic
> interface to
> log users in with an Action, ...

I have read MANY previous discussions on this list debating container vs.
app managed security. Usually they end up suggesting that since container
managed is limited, if you can't use it, then roll your own, similar to the
above comment. Craig's reply also said basically the same thing.

So is anybody aware of an Apache-like project that is attempting to
implement a "generic" application security solution for this problem? I
mean, with filters and the ability wrap the request, as Max mentioned, a
pretty robust solution could be developed that could be easily extended for
different db schemas, etc. Yet I feel like we're all reinventing the wheel
here, each of us implementing tactical rather than strategic solutions.

Sorry if there's already been a discussion of these projects, but I looked
and couldn't find any...

Thanks,
Joe


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




RE: Good/Bad Practices

2002-07-18 Thread Mark Nichols

I prefer the more granular approach, with many actions and JSPs over a more
complex and generalized approach. In my case I find that having
single-function actions and JSPs leads to easier coding today (and therefore
easier maintenance tomorrow). I can also split the work up over more
developers, rather than "single threading" development through one complex
action.

Our intranet application has about 60 separate 'screens', each with its own
action. Maybe overkill, but for a first attempt at Struts this pattern has
made life easier by far.



> -Original Message-
> From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:32 AM
> To: Struts (E-mail)
> Subject: Good/Bad Practices
>
>
> > Hey everyone,
> >
> > I've been trying to get in the habit of using good struts programming
> > practices, (without making things too hard on myself).  I have another
> > question for anyone that could give me some input on it.
> >
> > I'm working on a data entry application, and the user can make three
> > different types of entries.  Let's call them A, B, and C.  They
> each have
> > some form fields in common with each other, but each has a couple unique
> > fields.  To add an entry, I have a separate JSP for each, and different
> > action mappings for each (that all refer back to the same action class).
> > This works fine.
> >
> > Now I'm working on an edit function for the entries.  I have a
> link within
> > a  tag that displays a link to an edit form.  I
> tried using
> > one action and one JSP for the edits, but it gets very messy trying to
> > allow for the different types of entries.
> >
> > Is it a bad idea to use lots of different action mappings and different
> > JSP's for each operation for each type of entry, even though they are
> > similar and all have to perform very similar operations?  Or should I go
> > to great lengths to make very complex generalized actions and JSP's that
> > can handle any type of entry?  I'm not sure how understandable
> my question
> > is, or if it's a stupid question, but I want to get this figured out
> > before I spend too much more time on the 'edit' functionality.
> I'm having
> > some issues, and I keep redesigning the operation, so I'ld
> appreciate some
> > input before I rewrite this shiznat too many more times.  Thanks a lot
> > everyone!
> >
> >
> > ~ Keith
> > http://www.buffalo.edu/~kkamholz
> >
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:





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




Re: Struts/Container-Managed Authentication Question

2002-07-18 Thread Mete Kural

Hello Max,

--- Max Cooper <[EMAIL PROTECTED]> wrote:
> One thing that you cannot do with container-managed
> security is direct the
> users to the login form page to force them to login.
> As an alternative, you
> can protect a page and send users there, so the
> container will send them
> through the login form. For instance, if your login
> form is /loginForm.do,
> you could make a page (even a redirect back to your
> home page if you want
> users to end up there) named /protected.do and then
> setup a security
> constraint for that page. Your Login link would be
>  href="(contextPath)/protected.do">Login with
> this setup.

This alternative seems attractive to me, but I'm not
sure I have truly grasped how it works. I'm going to
try to paraphrase, so please correct me if I'm wrong:
- I would provide a link on the public homepage that
says "Login here" on it. When users click the link
they would go to a dummy protected page that simply
redirects the user back to the homepage. Once they
login through that they're automatically back in the
homepage and they're logged in!

One thing that I want to implement is providing the
login form within the home-page to make it a
single-step job for them, so they'll see the login
form on the side of the page when they first come in.
Otherwise there are two steps involved, first click on
the login link to go to the login form and then submit
the login form. How do you think I can do that?

Think about Amazon. You can either be logged-in and
not logged-in and it will still work. If you're
logged-in the website treats you like a familiar
customer, if not just default. That's the exact same
functionality that I'm trying to implement here. I
hope this gives a wider picture of what I want to do
and perhaps you know a better way to do this than how
I was currently planning on doing it above.

> 
> I think you can acheive your desired functionality
> with those techniques. If
> you need more info, I'll be happy to help out.
> 
> Another alternative is to use a filter to mimic
> container-managed security
> [including wrapping the request with your
> implementations of getRemoteUser()
> and isUserInRole()]. This way, you could provide a
> programmatic interface to
> log users in with an Action, but the value of
> providing the interface is not
> clear to me. I think you can acheive your desired
> functionality without it,
> and end up with less coupling between your app and
> the authentication
> mechanism.
> 
> -Max

Thanks,
Mete

> 
> - Original Message -
> From: "Eddie Bush" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, July 17, 2002 6:59 PM
> Subject: Re: Struts/Container-Managed Authentication
> Question
> 
> 
> > I'd recommend putting it to the Tomcat guys, but
> I'm just about positive
> > you'd have to use j_security_check (ie FORM-based
> authentication).
> >
> > Mete Kural wrote:
> >
> > >Hi,
> > >
> > >My Struts-based webapp has two sub-apps.
> > >
> > >In the first sub-app, anybody can surf through
> without
> > >having to be logged in, but if you are logged in,
> some
> > >special features are enabled (ex: "Hello Mr.
> ..").
> > >
> > >In the second sub-app, you have to be logged in
> to
> > >access the pages therein.
> > >
> > >For the entirety of the second sub-app, obviously
> a
> > >security-constraint should be declared in
> web.xml. But
> > >the first sub-app is open to anybody, although
> login
> > >is encouraged (i.e. not required). For that
> reason, I
> > >can't put a security-constraint for the first
> sub-app
> > >in web.xml, but how am I going to authorize users
> who
> > >want to log in while they're in the first sub-app
> in a
> > >container-managed manner??
> > >
> > >Basically what I want to do is to log a user in
> with
> > >the container from a LoginAction class, rather
> than
> > >the good-old "j_security" way. Maybe this one
> should
> > >be asked to the Tomcat group, but in case some of
> you
> > >may know, Is there a way to log a user in with
> the
> > >container through a method interface inside an
> Action
> > >class instead of dispatching the request to
> > >j_security_constraint? I couldn't find such a
> method
> > >interface in the Servlet 2.3 specs.
> > >
> > >I'll appreciate any insight on this.
> > >
> > >Thanks,
> > >Mete Kural
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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




Re: Difference between DynaValidatorActionForm and DynaValidatorForm

2002-07-18 Thread David Winterfeldt

The key used to look up a set of validation rules is
different.

DynaValidatorForm 
--
The key passed into the validator is the action
element's 'name' attribute from the struts-config.xml
which should match the form element's name attribute
in the validation.xml.


DynaValidatorActionForm 

The key passed into the validator is the action
element's 'path' attribute from the struts-config.xml
which should match the form element's name attribute
in the validation.xml.


David

--- Hemanth Setty <[EMAIL PROTECTED]> wrote:
> Is there any difference between the two classes in
> terms of functionality?
> Why does DynaValidatorActionForm extend
> DynaValidatorForm? Am I missing
> something here??
> -h
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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




Re: Struts/Container-Managed Authentication Question

2002-07-18 Thread Mete Kural

Hello Craig,

--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> If you are using container-managed security, you
> either declare a security
> constraint (to force a login) or you don't -- there
> is no middle ground.
> However, if the user went to your second sub-app
> first, and then went to
> the first one, the fact that they have logged in is
> visible to your
> application, because getRemoteUser() will still
> return the logged-in
> user's identity.

That's exactly what I want to happen. To preserve the
loggedinness of the user even when they go out of the
protected area into the public area.
 
> There is no such mechanism that is portable across
> containers.  If you
> want to use container managed security, you should
> architect your
> application inside its boundaries -- otherwise, you
> should roll your own.

Hmm.. I hope the JCP will include such a mechanism in
Servlet 2.4. It would be nice to enable pre-processing
on the form-based login submission in a servlet and
then submit that to the container. Perhaps this is not
a valid use case, but it seems to me that it may be
attractive in certain scenarios.
 
> Quite frankly, I'm not convinced your use case is
> very compelling, but I
> undoubtedly don't understand the whole picture,
> either.

Think about Amazon.com. On Amazon, you can surf
through the shopping pages with or without being
logged in to your Amazon account. If you're logged in,
some special features are enabled such as personal
book recommendations on the sides of the pages. If
you're not logged in it just treats you like a default
customer that it doesn't know about. In this case, it
is necessary to provide a login mechanism to better
serve the customer even if login is not required.

> 
> Craig

Thanks,
Mete




__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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




Re: TilesRequestProcessor (WAS: Re: How do I navigate from one subApp to another in Struts1.1?)

2002-07-18 Thread @Basebeans.com

Subject: Re: TilesRequestProcessor (WAS: Re: How do I navigate from one subApp to 
another in Struts1.1?)
From: "Kevin Henrikson" <[EMAIL PROTECTED]>
 ===
Thanks for the reply Cedric.

So basically what we've tried is to subclass TilesRequestProcessor
so we ignore tiles definitions and apply our path resolution logic to URI's
then call super.doInclude() or super.doForward().  Where we get stuck is
when we use a tiles definition in the struts-config.xml in an 
for instance we aren't able to apply our path resolution logic to the URI
after
tiles resolves the definition but before it is the request is dispatched.
Would it
be possible to apply a hook(overridable method) by refactoring the last part
of
TilesRequestProcessr.doForward()?  Something like:

protected void doDispatch(ServletContext ctx,
  HttpServletRequest request,
  HttpServletResponse response,
  String uri
  boolean doInclude)
{
  // Do dispatching : search dispatcher, then dispatch
  RequestDispatcher rd = ctx.getRequestDispatcher(uri);
  if (rd == null)
  { // error
  response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
   getInternal().getMessage
   ("requestDispatcher", uri));
  return;
  } // end if

// Unwrap the multipart request, if there is one.
if (request instanceof MultipartRequestWrapper) {
request = ((MultipartRequestWrapper) request).getRequest();
}

  // If request comes from a previous Tile, do an include.
  // This allows to insert an action in a Tile.
  if( doInclude )
rd.include(request, response);
  else
rd.forward(request, response);   // original behavior
}

This way subclasses could have a chance to modify the URI
or do some custom request/response handling.
As for the InsertTag it looks like in InsertHandler.doEndTag the call to
pageContext.include(page) is the only other place request dispatching
happens.
If a method was added here to again allow subclasses to override this call
and possible
do custom URI resolutions maybe a doInclude(String page) that calls
pageContext.include(page).  Then I guess we'd also need to subclass the
GetTag since
it extends the InsertTag.
Does this seem plausible?  Are there other places in tiles that do
request dispatching?
 Any problems with this approach?

-kevin

"Cedric Dumoulin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
>   The hooks you use (doForward and doInclude methods) have been
> introduce to let Tiles catch the calls to RequestDispatcher() ;-).
>   It is true that actually Tiles don't provide similar hooks. I am
> currently working on a new version of  the RequestProcessor to solves
> some problems with multi modules. So, things will change. I am not sure
> to be able to provide one single point for catching calls to include,
> but I will try to minimize the number of places where it happens.
> Actually, Tiles do include in the RequestProcessor, and in the InsertTag
> (in Struts1.1).
>
>Cedric
>
> Struts Newsgroup (@Basebeans.com) wrote:
>
> >Subject: TilesRequestProcessor (WAS: Re: How do I navigate from one
subApp to another in Struts1.1?)
> >From: "Kevin Henrikson" <[EMAIL PROTECTED]>
> > ===
> >Cedric,
> >
> >We subclass the Struts RequestProcessor to provide some special
resource
> >resolving, (i.e. override the doForward and doInclude methods to do some
> >special file path resolution).  Unfortunately if we try this same code
with
> >the TilesRequestProcessor (so we can get the cool ability to do
> >includes/forwards with tiles definitions directly in the
struts-config.xml)
> >it won't work.  Is there a 'hook' per say inside a tiles that is easily
> >subclassed to provide us access to do filepath resolution before the URI
is
> >passed to the RequestDispatcher or pageContext.include() is called?
> >If not I think this would be a very nice enhancement.  Basically
struts
> >allows us to hook in to it's RequestDispatcher calls but when tiles in
> >present there is nolonger a single point of RequestDispatching.  To
> >workaround this now we'd have to tweak some internals of the
> >InsertTag/GetTag since it also call include directly.  Is there any plans
to
> >centralize calls to RequestDispatcher, and pageContext.include() in the
tile
> >code base now that tiles in more fully integrated with the Struts code
base?
> >
> >thanks
> >
> >-kevin
> >
> >"Cedric Dumoulin" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]...
> >
> >
> >>  Normally it doesn't matter.
> >>  The Tiles servlet was used from 1.1dev until 1.1b1 to initialize
> >>Tiles. It contains some request processing methods used only by
Struts1.0.
> >>  The TilesRequestProcessor should normally not impact on the normal
> >>request processor work. It jus

Re: weirdness in Websphere 3.5.5

2002-07-18 Thread @Basebeans.com

Subject: Re:  weirdness in Websphere 3.5.5
From: "Reginald Ister" <[EMAIL PROTECTED]>
 ===
Oh, let me clarify,

In the VisualAge WTE,   is correctly rendered
as:


while in WebSphere 3.5.5, it is being rendered as:


I ended writing a servlet for WebSphere 3.5.5 that takes the
/app/login call and forwards it to the correct /app/do/login path.  Not a
big
deal, but I really wanted to try and figure out what was going on.

What I really need to do is to see if this behavior exists in other
WebSphere
environments.  Maybe 3.5.6 or 4.0.x. time permitting, I haven't seen anyone
else complain in this forum, so it's probably not a reoccurring problem.

Reg


"Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> H
> I'm not sure what to tell you.
> Are you saying it works with the proxy servlet, or that's what's not
> working?
>
> ~ Keith
> http://www.buffalo.edu/~kkamholz
>
>
> -Original Message-
> From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 6:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re:  weirdness in Websphere 3.5.5
>
>
> Subject: Re:  weirdness in Websphere 3.5.5
> From: "Reginald Ister" <[EMAIL PROTECTED]>
>  ===
> Keith, thanks for your input.
>
> The funny thing is that it works fine within the VisualAge test
environment.
> I just ran into this problem during deployment.  Haven't tried WebSphere
4.0
> yet.
> As I work around, I just wrote a proxy servlet to forward calls like
> /app/login to /app/do/login
>
> Reg
> "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > I think part of your problem is the way you specify your form in your
JSP.
> > You have action="login", but what you need is action="/do/login".  The
> 'do'
> > extension must be in the jsp, it isn't created when the page is visited.
> > Does that help you at all?
> >
> > ~ Keith
> > http://www.buffalo.edu/~kkamholz
> >
> >
> > -Original Message-
> > From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 16, 2002 1:10 PM
> > To: [EMAIL PROTECTED]
> > Subject:  weirdness in Websphere 3.5.5
> >
> >
> > Subject:  weirdness in Websphere 3.5.5
> > From: "Reginald Ister" <[EMAIL PROTECTED]>
> >  ===
> > Hi,
> >
> > I have the following action define in struts-config.xml:
> >
> >  >   type="com.mycompany.actions.LoginAction"
> >   name="loginForm"
> >   scope="request"
> >   validate="true"
> >   input="/jsp/login.jsp" />
> >
> > with the corresponding formbean:
> > 
> >
> > In my login jsp I have the form defined as
> > 
> >
> > When this is rendered in Websphere, the form action is:
> >
> > 
> >
> > While the correct rendering should be:
> > 
> >
> > Notice the missing "/do" pattern.  Has anyone else seen this behavior?
> >
> > I am using Struts 1.0.2 with Tiles
> >
> > Reg
> >
> >
> >
> > --
> > 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: Form not keeping changed values

2002-07-18 Thread Wilinski, Pamela M.

That's where the issue lies...it forwards to an action.  It seems that an
action calling an action isn't a workable solution.  I'll have to revisit
the design and see if I can come up with a better solution.

Thanks for your help.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 1:04 AM
To: Struts Users Mailing List
Subject: RE: Form not keeping changed values


This will work just fine if forwarding to a jsp and not another action.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Wilinski, Pamela M. [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 5:46 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Form not keeping changed values
>
>
> public ActionForward perform(
>  ActionMapping mapping,
>  ActionForm form,
>  HttpServletRequest request,
>  HttpServletResponse response)
>  throws ServletException
> {
>  KRLogger.addContext(KRActionUtil.getUserId(request));
>
>  ActionForward forward = mapping.findForward("success");
>  ActionErrors errors = new ActionErrors();
>  //ReportForm reportForm = null;
>
>  if (form instanceof ReportForm) {
>ReportForm reportForm = (ReportForm) form;
>
> < determining value of forward based upon field from form>>
>
>  request.setAttribute(mapping.getName(),reportForm);
>
>  return (forward);
> }
>
> Once I get to the action I forward to the changes I made are gone.
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 4:27 PM
> To: Struts Users Mailing List
> Subject: RE: Form not keeping changed values
>
>
> What do you mean it didn't work?
>
> Can you provide a few snippets of code?
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://www.open-tools.org/struts-atlanta
>
>
>
>
> > -Original Message-
> > From: Wilinski, Pamela M. [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 17, 2002 5:16 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Form not keeping changed values
> >
> >
> > I tried that and it didn't work.
> >
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 17, 2002 4:04 PM
> > To: Struts Users Mailing List
> > Subject: RE: Form not keeping changed values
> >
> >
> > Are you saving the form in the request (or session) before forwarding?
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > Struts-Atlanta, the "Open Minded Developer Network"
> > http://www.open-tools.org/struts-atlanta
> >
> >
> >
> >
> > > -Original Message-
> > > From: pmwilinski [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 17, 2002 8:57 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Form not keeping changed values
> > >
> > >
> > > Hi all,
> > >
> > > I have a problem with changes that are made in the action to values
> > > in my form being thrown out when it forwards to the next page.  Does
> > > anyone know why this might be happening and how to make the changes
> > > stick???
> > >
> > > Thanks,
> > >
> > > Pam
> > >
> > >
> > > --
> > > 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:


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




Re: Model 2 and Caching

2002-07-18 Thread John Nicholas

Jacob Hookom wrote:
> Hey,
> 
> For a prelude:
> I was chatting with my dad over a beer about how the company he works
> for is training all of their HR people on how to use Dreamweaver to
> generate content for their internet/intranets.  Appalled, I asked him
> whose bright idea was it; to which he responded some independent
> consultant who was touring the various facilities doing training (and
> he's never heard of Jakob Neilsen!).  To give a 100 person staff a copy
> of Dreamweaver and tell them to go nuts... is insane!

Actually Dreamweaver does have a template control system that can keep 
people from editing outside their part of the page. So designers can 
design a complicated template and declare that only the middle cell and 
the text in header can be edited. The template info is done in such a 
way that the designer can update a template and it will propagate 
through all the pages that use that template. Not exactly dynamic but 
easier than search and replace! I don't remember if it has tools to keep 
users in out of different parts of the site though.


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




Re: Dynamic Forms & FormBeans

2002-07-18 Thread JensStutte


Hi,

i had quite the same problem, one method is to use normal, non-struts input
boxes within a struts form for the dynamic part of the form. The generated
parameters can then be evaluated in the FormBeans validate function, since
you get the HttpRequest object there. I do not know a pure struts way to
achieve this (but after i made this workaround, i did not search any more ;
-).

Regards,

Jens Stutte



   
  
"Neil.Axtell"  
  
<[EMAIL PROTECTED]To: 
"'[EMAIL PROTECTED]'" 
ritsu.com><[EMAIL PROTECTED]> 
  
  cc:  
  
18/07/2002 17.27  Subject: Dynamic Forms & FormBeans   
  
Please respond to  
  
"Struts Users  
  
Mailing List"  
  
   
  
   
  





Hello Struts-World.

Here's a Struts Newbie query I've got.

I really like being able to associate a FormBean with a Struts form and
then
doing the validation etc. at the server end. I understand about having to
have attributes in the FormBean that match the names of the input elements
in the HTML form.

However, I cannot think of a way of creating a FormBean that can cope with
a
form that has entirely dynamically generated output. For example, one that
creates a list of items in a shopping cart where every item has an
associated "delete" checkbox. I can ensure that each checkbox has a similar
name, (I'm using the name to indicate the cart item to which it relates
rather than the value at the moment) but how can I map these to attributes
in the Form bean? At design-time I will not know how many attributes I need
to supply, or what their full names will be. If I use the same name for
each
checkbox (i.e. all map to the same FormBean attribute) and hold the cart
item ID in the value how will I be able to store the different values?

I'm sure that there's a good "Struts way" to do this but I cannot see one
at
the moment. Can anyone out there enlighten me?

Many thanks.

Neil.

P.S. I'm currently using Struts 1.0.1 and would prefer to stay that way
until I get the current iteration of the project out of the way.



Neil Axtell
Principal Engineer (MMI/Web Technologies)
ANRITSU LIMITED
European Measurement Division - Engineering
200 Capability Green
Luton, UK
Tel:  +44 (0) 1582 433347
Fax: +44 (0) 1582 433276
E-Mail: [EMAIL PROTECTED] 





-
This email message, together with any attachments, is for the exclusive and
confidential use of the addressee(s).  If you have received this message in
error, please notify the sender by email immediately, then delete the
message and any copies.  Any views or opinions presented herein are solely
those of the author and do not necessarily represent those of the Anritsu
group of companies.
-


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






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




Dynamic Forms & FormBeans

2002-07-18 Thread Neil.Axtell


Hello Struts-World.

Here's a Struts Newbie query I've got.

I really like being able to associate a FormBean with a Struts form and then
doing the validation etc. at the server end. I understand about having to
have attributes in the FormBean that match the names of the input elements
in the HTML form.

However, I cannot think of a way of creating a FormBean that can cope with a
form that has entirely dynamically generated output. For example, one that
creates a list of items in a shopping cart where every item has an
associated "delete" checkbox. I can ensure that each checkbox has a similar
name, (I'm using the name to indicate the cart item to which it relates
rather than the value at the moment) but how can I map these to attributes
in the Form bean? At design-time I will not know how many attributes I need
to supply, or what their full names will be. If I use the same name for each
checkbox (i.e. all map to the same FormBean attribute) and hold the cart
item ID in the value how will I be able to store the different values?

I'm sure that there's a good "Struts way" to do this but I cannot see one at
the moment. Can anyone out there enlighten me?

Many thanks.

Neil.

P.S. I'm currently using Struts 1.0.1 and would prefer to stay that way
until I get the current iteration of the project out of the way.



Neil Axtell
Principal Engineer (MMI/Web Technologies)
ANRITSU LIMITED
European Measurement Division - Engineering
200 Capability Green
Luton, UK
Tel:  +44 (0) 1582 433347
Fax: +44 (0) 1582 433276
E-Mail: [EMAIL PROTECTED] 





-
This email message, together with any attachments, is for the exclusive and
confidential use of the addressee(s).  If you have received this message in
error, please notify the sender by email immediately, then delete the
message and any copies.  Any views or opinions presented herein are solely
those of the author and do not necessarily represent those of the Anritsu
group of companies.
-


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




Re: Model 2 and Caching

2002-07-18 Thread John Nicholas

Jacob Hookom wrote:
> Would writing the xml data out statically and storing it, then using
> translets for XSLT offer any speed improvements over simply caching with
> OSCache or other similar tags?
> 

Check out Cocoon at http://xml.apache.org/cocoon/index.html. It's 
dynamic xml/xslt publishing system written in java and has a nice 
caching approach so it doesn't do the transform every time. it's not 
based around struts or jsp but it seems very nice if you're in an xml 
heavy setting.It also has that friendly Apache license.

John Nicholas
Sr Interactive Programmer
Temerlin McClain





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




Re: How to import Struts tag lib into Dreamweaver MX?

2002-07-18 Thread Shane Witbeck

Edit > Taglibs > click on the "+" button > JSP > then you have the choice
of importing from the taglib descriptor (*.tld) or the application
descriptor (web.xml) assuming you have already defined the struts taglib.

HTH,

Shane

>
>
> Best Regards,
>
> J. Jason Zhou
> Business Intelligence Platform Division (BIP), R & D,
> SAS Institute, 100 SAS Campus Dr.
> Cary, North Carolina 27513-8617
> Voice: 919-531-0568(O)
> Email: [EMAIL PROTECTED]
>
>
>
> --
> To unsubscribe, e-mail:
>  For additional
> commands, e-mail: 




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




Form bean properties data types and conversions

2002-07-18 Thread JensStutte


I have seen, that in Struts 1.0 there is some support for automatic
conversion of request parameters to form bean properties, which seems to be
extending in the 1.1beta (i did not use it, but i navigated through the
sources). There seem to be converters for date and time data types in the
beta. So far, so fine.

But i could not get any hint on the localisation. As Struts knows in his
request the locale of the user and offers it to the Action programmer, will
this locale be used to make any automatic conversions, too? For Struts 1.0
this seems not to be the case, as far as i could see in the sources in half
an hour. And the calls to the new DynaBean classes from the jakarta.commons
project seem to lack any locale support, too. I can not see much use in an
automatic conversion function of Dates (but also numbers), whithout any
respect to the users locale, so i wondered if i am missing something.

Could someone shed som light on this?

Regards,

Jens Stutte


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




RE: dynamic links

2002-07-18 Thread Graham Lounder

Yes, thats right!  I remember this problem now :)  I just don't have enuf
post-its on my computer to remind me of all these things.

Thanks for the insight!

Graham

-Original Message-
From: Bartley, Chris P [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 11:42 AM
To: 'Struts Users Mailing List'
Subject: RE: dynamic links


The key is in the crazy single and double quotes--your second example is
really close, just change the outer double quotes to singles, like this:

   bla

That should do it.

> -Original Message-
> From: Graham Lounder [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:38 AM
> To: Struts Users Mailing List
> Subject: dynamic links
>
>
> Hello All,
>
> I'm trying to make a link that sends a parameter containing
> the URL of the
> page which called it.  I have all the URLEncoding figured
> out, my problem is
> getting it into the  tag.
>
> I have tried
>
> bla
>
> and
>
> bla
>
> neither of which work.
>
>
> Right now what I'm doing is:
>
> <% String myLink = "/bla/bla.jsp?returnURL=" + returnURL; %>
> bla
>
> but this is very ugly.  I don't want to have to make a String
> variable for
> each link on my page.  Any ideas?  Am I missing something?
>
> Graham
>
>
> 
>   Graham Lounder
>   Java Developer
>   Spatial Components Division
>   CARIS
>   264 Rookwood Ave
>   Fredericton NB E3B-2M2
>   Office 506 462-4218
>   Fax506 459-3849
>   [EMAIL PROTECTED]
>   http://www.spatialcomponents.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: dynamic links

2002-07-18 Thread Bartley, Chris P

The key is in the crazy single and double quotes--your second example is
really close, just change the outer double quotes to singles, like this:

   bla

That should do it.

> -Original Message-
> From: Graham Lounder [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:38 AM
> To: Struts Users Mailing List
> Subject: dynamic links
> 
> 
> Hello All,
> 
> I'm trying to make a link that sends a parameter containing 
> the URL of the
> page which called it.  I have all the URLEncoding figured 
> out, my problem is
> getting it into the  tag.
> 
> I have tried
> 
> bla
> 
> and
> 
> bla
> 
> neither of which work.
> 
> 
> Right now what I'm doing is:
> 
> <% String myLink = "/bla/bla.jsp?returnURL=" + returnURL; %>
> bla
> 
> but this is very ugly.  I don't want to have to make a String 
> variable for
> each link on my page.  Any ideas?  Am I missing something?
> 
> Graham
> 
> 
> 
>   Graham Lounder
>   Java Developer
>   Spatial Components Division
>   CARIS
>   264 Rookwood Ave
>   Fredericton NB E3B-2M2
>   Office 506 462-4218
>   Fax506 459-3849
>   [EMAIL PROTECTED]
>   http://www.spatialcomponents.com
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

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




dynamic links

2002-07-18 Thread Graham Lounder

Hello All,

I'm trying to make a link that sends a parameter containing the URL of the
page which called it.  I have all the URLEncoding figured out, my problem is
getting it into the  tag.

I have tried

bla

and

bla

neither of which work.


Right now what I'm doing is:

<% String myLink = "/bla/bla.jsp?returnURL=" + returnURL; %>
bla

but this is very ugly.  I don't want to have to make a String variable for
each link on my page.  Any ideas?  Am I missing something?

Graham



  Graham Lounder
  Java Developer
  Spatial Components Division
  CARIS
  264 Rookwood Ave
  Fredericton NB E3B-2M2
  Office 506 462-4218
  Fax506 459-3849
  [EMAIL PROTECTED]
  http://www.spatialcomponents.com



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




Good/Bad Practices

2002-07-18 Thread Kamholz, Keith (corp-staff) USX

> Hey everyone,
> 
> I've been trying to get in the habit of using good struts programming
> practices, (without making things too hard on myself).  I have another
> question for anyone that could give me some input on it.
> 
> I'm working on a data entry application, and the user can make three
> different types of entries.  Let's call them A, B, and C.  They each have
> some form fields in common with each other, but each has a couple unique
> fields.  To add an entry, I have a separate JSP for each, and different
> action mappings for each (that all refer back to the same action class).
> This works fine.  
> 
> Now I'm working on an edit function for the entries.  I have a link within
> a  tag that displays a link to an edit form.  I tried using
> one action and one JSP for the edits, but it gets very messy trying to
> allow for the different types of entries.
> 
> Is it a bad idea to use lots of different action mappings and different
> JSP's for each operation for each type of entry, even though they are
> similar and all have to perform very similar operations?  Or should I go
> to great lengths to make very complex generalized actions and JSP's that
> can handle any type of entry?  I'm not sure how understandable my question
> is, or if it's a stupid question, but I want to get this figured out
> before I spend too much more time on the 'edit' functionality.  I'm having
> some issues, and I keep redesigning the operation, so I'ld appreciate some
> input before I rewrite this shiznat too many more times.  Thanks a lot
> everyone!
> 
> 
> ~ Keith
> http://www.buffalo.edu/~kkamholz
> 

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




Override processPreprocess or ActionServlet? (Best Practices)

2002-07-18 Thread Jerry Jalenak

Following a web application security presentation yesterday, it became
apparent to me that I needed to further my security model to ensure that a
user has a valid session at the beginning of every action.  What is the
recommended 'best practice' to do this?  Should I write a BaseAction that
extends Action?  extend the ActionServlet?  do something in
processPreprocess?  How is everyone else doing this?

Jerry Jalenak
Development Manager, Web Publishing
LabOne, Inc.

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: CachedRowset with logic:iterate tag

2002-07-18 Thread @Basebeans.com

Subject: Re: CachedRowset with logic:iterate tag
From: "Vic C." <[EMAIL PROTECTED]>
 ===
I have extendend and made cached row set work with the iterator. See 
webPIM on sourceforge, basebeans.com or downloads.com

David Chu wrote:
> Hi,
> When first using struts, I first tried to use a CachedRowSet object as well.
> However, based on other people's recommendations, I just went with a simple
> Vector of Beans, one representing each row in the ResultSet.  It is true
> this is more overhead, but no one has extended the CachedRowSet to have an
> iterator which is what is necessary.
> 
> It is not necessary to use struts tags; you can use scriplets.  But it is so
> nice to just use the struts tags.  You can achieve almost all of the same
> functionality and it looks more like an html page.
> 
> 
> -david
> 
> --
> David C. Chu
> America Online
> Network Tools Intern
> --
> 
> "aps olute" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> 
>>How to iterate over a CachedRowSet using
>> tags? I have filled the CachedRowset
>>with a select
>>statement and am able to iterate using the
>>crs.getString(1) or the crs.getString(colname)
>>methods,
>>but no am ready to use Struts tags but dont know how.
>>Do I need to convert it a Collection type? but that
>>will eat up more memory as two copies CRS and the
>>Collection with same contents?
>>Is it necessary to use the Struts tags to work with
>>the rest of the Struts features?
>>
>>
>><%@ page language="java" %>
>><%@ page contentType="text/html" %>
>><%@ page
>>import="sun.jdbc.rowset.CachedRowSet,javax.naming.InitialContext"%>
>>>class="sun.jdbc.rowset.CachedRowSet" scope="session">
>><% InitialContext ctx = new InitialContext();
>>  javax.sql.DataSource ds =
>>(javax.sql.DataSource)ctx.lookup("java:/DefaultDS");
>>  java.sql.Connection con = ds.getConnection();
>>  Contacts.setCommand("SELECT name,
>>owner,species,sex,birth,death from pet");
>>  Contacts.execute(con);
>>  Contacts.first(); %> 
>>
>>> type="sun.jdbc.rowset.CachedRowSet">
>>
>>
>>
>>
>>
>>But nothing is ever printed. if i take out the
>>logic:present and logic:iterate and replaced with a
>>while (Contacts.next()  Contacts.getString(1)  at
>>least
>>i gets some output.
>>
>>
>>
>>
>>__
>>Do You Yahoo!?
>>Yahoo! Autos - Get free new car price quotes
>>http://autos.yahoo.com
>>
>>--
>>To unsubscribe, e-mail:
> 
> 
> 
>>For additional commands, e-mail:
> 
> 
> 
> 
> 


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




  1   2   >