RE: AW: Paged data output

2004-11-10 Thread Geeta Ramani
Hi Yaroslav:

In case you cannot or don't want to do pagination in the db, follow Axel's 
advice and use the display tag. I used it for the first time two days ago and 
it is *sweet*! Plus the docs are chock full of examples..:)

Cheers,
Geeta

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic (Vinny) Cekvenich
Sent: Wednesday, November 10, 2004 8:34 AM
To: [EMAIL PROTECTED]
Subject: Re: AW: Paged data output

Also iBatis DAO w/ Displaytag.

BUT I allways do paginiation in DB. For example select limit ofset.
Depends of what you think lots of products are (and if you also have 
lots of users)

.V


Stahlhut, Axel wrote:
> Hi Yaroslav,
> 
> try the displaytag tag library (http://displaytag.sourceforge.net/). Maybe it 
> is useful.
> 
> Regards
> Axel
> 
> 
>>-Ursprüngliche Nachricht-
>>Von: Yaroslav Novytskyy [mailto:[EMAIL PROTECTED] 
>>Gesendet: Mittwoch, 10. November 2004 12:55
>>An: [EMAIL PROTECTED]
>>Betreff: Paged data output
>>
>>
>>Hi all!
>>
>>Can anyone explain (or point to an example) of how to output 
>>data on JSP by pages with page navigation.
>>
>>Example:
>>I have a products DB table with _lots_ of products.
>>then (as far as I could understand) I should
>>1. create a DAO factory
>>2. create a ProductDAO class
>>3. create a Product bean-type class
>>4. in ProductDAO create a method listProducts in which
>>  a) make a quiery like SELECT * FROM Products
>>  b) for every row create a Product object and add to a list
>>  c) return the list to action
>>5. in action.execute save the list in request scope
>>6. redirect to JSPwith the following logic:
>>
>>
>>
>>
>>
>>Question:
>>If the described abow is correct, how to make paged output. 
>>So only 10 
>>products are displayed and links to 2nd, 3rd ... pages
>>
>>Thanks
>>Yaroslav Novytskyy
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


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




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



RE: Error Deploying

2004-09-23 Thread Geeta Ramani
Hi, take a look at:

http://struts.apache.org/userGuide/installation.html

the " Install A Struts Binary Distribution" bit is what you are looking
for.

Hth,
Geeta

-Original Message-
From: CCNY [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 23, 2004 9:55 AM
To: Struts Users Mailing List
Subject: Re: Error Deploying

Where, Ideally should the struts.jar live? Is it apart of the APP or
the container?


On Thu, 23 Sep 2004 19:27:20 +0530, Kailash Vasani
<[EMAIL PROTECTED]> wrote:
> Check struts version on both the servers. It seems that they are
different.
> 
> -Original Message-
> From: CCNY [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 23, 2004 7:21 PM
> To: Struts Users Mailing List
> Subject: Error Deploying
> 
> Hi all
> 
> I'm deploying on Tomcat 4.1, but I developed on Tomcat 5.0.28 I think
> that shouldnt matter. I get the following error. what am I doing
> wrong?
> 
> type Exception report
> 
> message
> 
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
> 
> exception
> 
> javax.servlet.ServletException: Servlet.init() for servlet action
> threw exception
>at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:96
> 3)
>at
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:6
68)
>at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
> va:210)
>at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
> eNext(StandardPipeline.java:643)
>at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
>at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
> va:191)
>at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
> eNext(StandardPipeline.java:643)
>at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
>at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
>at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180
> )
>at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
> eNext(StandardPipeline.java:643)
>at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.
> java:171)
>at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
> eNext(StandardPipeline.java:641)
>at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172
> )
>at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
> eNext(StandardPipeline.java:641)
>at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
>at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java
> :174)
>at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
> eNext(StandardPipeline.java:643)
>at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
>at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>at
>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
>at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
>at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onne
> ction(Http11Protocol.java:549)
>at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
>at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.jav
> a:666)
>at java.lang.Thread.run(Thread.java:479)
> 
> root cause
> 
> java.lang.NoSuchMethodError
>at
>
org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.cr
eate
> ConfigMap(ComponentDefinitionsFactoryWrapper.java:208)
>at
>
org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.in
it(C
> omponentDefinitionsFactoryWrapper.java:104)
>at
>
org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory(TilesUtil
Impl
> .java:138)
>at
>
org.apache.struts.tiles.TilesUtil.createDefinitionsFactory(TilesUtil.jav
a:16
> 7)
>at
>
org.apache.struts.tiles.TilesPlugin.initDefinitionsFactory(TilesPlugin.j
ava:
> 224)
>at
org.apache.struts.tiles.TilesPlugin.init(TilesPlugin.java:139)
>at
>
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
ava:
> 839)
>at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
>at javax.servlet.GenericServlet.init(GenericSer

RE: File Upload Limits

2004-09-23 Thread Geeta Ramani
Hi Zoran, not directly helpful, but here's a link which will enable you
to search the archives:

http://marc.theaimsgroup.com/?l=struts-user

Geeta

-Original Message-
From: Zoran Avtarovski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 23, 2004 9:12 AM
To: Struts Users Mailing List
Subject: File Upload Limits

I'm trying to find some detailed information on how to use the file size
limits using the struts MultipartRequestHandler. In the past I have used
a
custom servlet, but I thought it was time to bring this into the struts
world.

Before anybody says anything, I tried to search the list archive but it
says
it can't be searched.

So anyway I looked at the fileupload example, and have done the
following:

Added the controller element


To my struts-config and in my UploadForm validate action I check the
boolean
request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEED
ED);

I take it from this that the requesthandler sets a boolean value in the
request if the file is greater in size than specified in the controller
element.

The problem is that this isn't working.

Any help would be appreciated.

Zoran



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




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



RE: success story using Struts in large scale web based system

2004-09-22 Thread Geeta Ramani
Hi Alex, this question was asked before, so I searched the archives and
found the following threads:

http://marc.theaimsgroup.com/?l=struts-user&m=99851089726272&w=2

and

http://marc.theaimsgroup.com/?l=struts-user&m=99307752323367&w=2

and

http://marc.theaimsgroup.com/?l=struts-user&m=98467412717873&w=2

I think I remember at least one of these perhaps having a link to a site
with a list of companies using Struts successfully.

Regards,
Geeta

-Original Message-
From: Alex Lui [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 22, 2004 5:36 AM
To: [EMAIL PROTECTED]
Subject: success story using Struts in large scale web based system

Hi folks,

I am trying to sell the management using Struts
framework for the next web based system. Is there a
success story I can reference? And how it benefits
from using Struts? Any pointer is appreciated.

Regards,
Alex

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




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



RE: Off Topic Post Air Time vs. Struts Answers

2004-09-14 Thread Geeta Ramani
Hi Nick/all:

This may be relevant to this topic, but the "Search" feature for the
Struts archives seems to be broken..? I just get a "Text search not
available for this list" regardless of what I do/how I search. I used
this link:

http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]
s.apache.org

Thanks and regards,
Geeta

-Original Message-
From: Nick Heudecker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 14, 2004 2:04 PM
To: Struts Users Mailing List
Subject: Re: Off Topic Post Air Time vs. Struts Answers

Terry:

I agree with you that struts-user is mostly noise, although you
phrased it much better than I did.  I know it's frustrating to have
your question go unanswered, but I really don't think it's
intentional.  There is so much cruft on this list, with the same
questions asked repeatedly, that your question probably just fell
through the cracks.

The vast majority of the questions here should be posted on the JDC
forums.  If people would do that, and make even the most basic attempt
to check the archives and/or Google, the number of off-topic posts
would fall.

I guess I'll wait to see how many angry responses I get. :)




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



RE: HttpSessionListener vs. HttpSessionBindingListener

2004-07-30 Thread Geeta Ramani
Thanks for your note, Subramaniam. I went with K.Citron's suggestion of getting the 
sessionId from the session and that seems to work great too. It seems (for whatever 
reason) session.getId() works fine after the session is invalidated though 
session.getAttribute() bombs... 

Regards,
Geeta

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 11:15 AM
> To: Struts Users Mailing List
> Subject: Re: HttpSessionListener vs. HttpSessionBindingListener
> 
> 
> 
> 
> 
> 
> Hi Geeta,
>   I am using HttpSessionBindingListener and its working fine.
> 
> Subramaniam Olaganathan
> Tata Consultancy Services
> Mailto: [EMAIL PROTECTED]
> Website: http://www.tcs.com
> 

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



RE: GenericDataSource error?

2004-07-30 Thread Geeta Ramani
Hi Carl:

Look at this link and follow it to the letter - and you should be fine.. :)
http://struts.apache.org/faqs/database.html

Good luck,
Geeta

> -Original Message-
> From: Carl T. Dreher [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 10:38 AM
> To: [EMAIL PROTECTED]
> Subject: GenericDataSource error?
> 
> 
> I've been trying to follow the examples in a variety of books about
> using the Struts  configuration.
> 
> 
>   
>"com.mysql.jdbc.Driver" />
>"jdbc:mysql://localhost:3306/MYDATABASE" />
>   
>"MYPASSWORD" />
>   
> 
> 
> Whenever I try access any page in any application that has this in the
> struts-config.xml, even if the app does not do a single deb operation,
> TomCat throws an exception saying there is no definition for class for
> GenericDataSource.  I did a search in the docs and found lots of
> identical notes that GenericDataSource has been deprecated, 
> but nothing
> giving even the slightest hint about what to do about it.  I 
> finally got
> things to work (or at least, not throw the exception!) by dropping the
> struts-legacy.jar file in the /lib directory.  None of the books or
> examples mentions that.  ( I'm using Tomcat 5.027, Struts 1.1 (dated
> 6-29-03) Java 1.41 and Jakarta commons DBCP-1.2.1.)
> 
> OK, what's going on?  Is there some magic combination of libs 
> for Struts
> and Tomcat and DBCP?  Adding anything called "legacy" tells me this
> isn't the latest way to go.
> 
> Another question is, how do I use the SEARCH facility of this 
> achieve? 
> No matter what I try, it reports "Text search not available for this
> list."  I tried looking through the archives for an answer to 
> the above
> but after taking 20 minutes to go through the first 500 of 
> 125 THOUSAND
> posts it became obvious that wasn't going to cut it.
> 
> - Carl Dreher
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: redirect to login page with error message on the jsp page

2004-07-30 Thread Geeta Ramani
Well, you could put in a check for whether they are already in the login page. You 
could use methods like getRequestURI() on the request object or something like:
if ((request.getParameter("username") != null) && (request.getParameter("passowrd") != 
null) ) {
return true; //ie normal processing without error
} else etc..

Hth,
Geeta

> -Original Message-
> From: Asim Ghosh [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 11:31 AM
> To: Struts Users Mailing List
> Subject: RE: redirect to login page with error message on the jsp page
> 
> 
> this is what i have done but using ActionServlet class. But 
> how to avoid for the first time.
> > 

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



RE: redirect to login page with error message on the jsp page

2004-07-30 Thread Geeta Ramani
Or you could write a RequestProcessor and override the processPreprocess method with 
something like this:

HttpSession session = request.getSession();
if ( (session == null) || (session.getFavouriteObjectInSession == null) ) {
//use Response object to redirect to login page with error set;
}

Geeta

> -Original Message-
> From: Asim Ghosh [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 11:19 AM
> To: [EMAIL PROTECTED]
> Subject: redirect to login page with error message on the jsp page
> 
> 
> hello,
>  
>   can anybody tell me how to redirect to login page with 
> error message on the jsp page.  It should display error 
> message "You session has timed out" on the login page.
>  
> in web.xml
>  
> 
> 30
> 
>  
>  
> 
>   
> -
>  ALL-NEW Yahoo! Messenger - all new features - even more fun!  
> 

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



RE: HttpSessionListener vs. HttpSessionBindingListener

2004-07-30 Thread Geeta Ramani
Ah. You mean session.getId() would not bomb on me after the session is invalidated, is 
that right? In which case, that's a good idea too.. Thanks!
Geeta

> -Original Message-
> From: K. Citron [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 10:57 AM
> To: Struts Users Mailing List
> Subject: Re: HttpSessionListener vs. HttpSessionBindingListener
> 
> 
> Write any session related info to the DB, using the session id as the 
> primary key to access the info.

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



RE: DAO Resource Suggestions

2004-07-30 Thread Geeta Ramani
You mean something like this?

http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html

Geeta

> -Original Message-
> From: Bussie, Andre D [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 10:48 AM
> To: [EMAIL PROTECTED]
> Subject: DAO Resource Suggestions
> 
> 
> Does anyone know of good resources on implementing a DAO and service
> within a struts application
> 
>  
> 
> Andre' D. Bussie
> 
> Sourcing Rotational Program 
> 
> MAC-MAR
> 
> 532 Fellowship Rd
> 
> Moorestown, NJ 08057
> 
> 856.787.3273 
> 
> 856.952.7325 - Cell
> 
> [EMAIL PROTECTED]  
> 
>  
> 
> 

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



RE: HttpSessionListener vs. HttpSessionBindingListener

2004-07-30 Thread Geeta Ramani
ahh, wait. You are using tomcat 5 which implements servlet 2.4 and the javadocs for 
2.4 says under sessionDestroyed() the following:

Notification that a session is **about to be** invalidated.

They changed the tense on us!! :) ..Explains why your code is working just fine! Also 
gives me hope that in fcat others were stumped on this..! (is it time to go home 
yet??!)

Geeta

> -Original Message-
> From: Jignesh Patel [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 8:04 PM
> To: Struts Users Mailing List
> Subject: Re: HttpSessionListener vs. HttpSessionBindingListener
> 
> 
> Hi Geeta,
> What I can say that check again your coding because we have 
> application
> in place with Servlet2.3, tomcat5.0.19 and struts1.1. And in
> sessionDestroyed method I am able to trap the attribute which are
> associated with the session. 
> It just work fine for us.
> 
> -Jignesh 

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



RE: HttpSessionListener vs. HttpSessionBindingListener

2004-07-30 Thread Geeta Ramani
Hmm.. Today must be my day to get stumped.. So how do you explain the javadocs which 
says:

Notification that a session **was** invalidated.

Geeta

> -Original Message-
> From: Jignesh Patel [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 8:04 PM
> To: Struts Users Mailing List
> Subject: Re: HttpSessionListener vs. HttpSessionBindingListener
> 
> 
> Hi Geeta,
> What I can say that check again your coding because we have 
> application
> in place with Servlet2.3, tomcat5.0.19 and struts1.1. And in
> sessionDestroyed method I am able to trap the attribute which are
> associated with the session. 
> It just work fine for us.
> 
> -Jignesh 
> 
> 
> 
> On Fri, 2004-07-30 at 10:00, Geeta Ramani wrote:
> > Hi everyone:
> > 
> > I would like some clarification regarding the 
> HttpSessionListener. (We are using servlet spec 2.3) 
> > 
> > Here's what I want to do: When a session expires, either 
> when a user uses the "logout" feature or due to time-out, I 
> want to delete a certain row from the database. The specifics 
> of which row to delete is stored in an attribute in an "user" 
> object in the session. 
> > 
> > My existing solution which i don't believe works: Write a 
> class that implements the HttpSessionListener and override 
> the sessionDestroyed(HttpSesssionEvent) method. In the 
> sessionDestroyed method, call the 
> HttpSessionEvent.getSession() to get the session, query the 
> session to get the user and carry on.
> > 
> > However, here's an entry in my logs:
> > "java.lang.IllegalStateException: getAttribute: Session 
> already invalidated"
> > 
> > So i looked up the Javadocs for the HttpSessionListener and 
> indeed here's the description for 
> HttpSessionListener.sessionDestroyed method: 
> > 
> > Notification that a session was invalidated. . 
> > 
> > Note the use of the *past* tense!! Thus, for example, it 
> seems you cannot query the session for anything at this point!
> > 
> > Googling produced this page which seems to describe the 
> problem I am facing. 
> > 
> http://archives.java.sun.com/cgi-bin/wa?A2=ind0207&L=servlet-i
nterest&F=&S=&P=32332
> 
> Since this (and others I found like it) are dated over two years ago, I'd like you 
> comments on:
> 
> Proposed solution: Seeing as it seems that I cannot query the session for any 
> attributes after it has already been invalidated, I therefore should make my 
> **User** class implement the HttpSessionBindingListener interface and overwrite the 
> valueUnbound method.
> 
> Is my understanding correct? How do others do this sort of thing?
> 
> Thank you in advance for any replies!
> Geeta
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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


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



RE: HttpSessionListener vs. HttpSessionBindingListener

2004-07-30 Thread Geeta Ramani
Thank you, Sahil. This error kind of threw me - two days ago i would have sworn I knew 
all I needed to know about the HttpSessionlistener (teach me to be to so sanguine!) - 
so I am glad to hear confirmation about my proposed solution. 

Thanks again!
Geeta


> -Original Message-
> From: Gupta, Sahil [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 10:23 AM
> To: 'Struts Users Mailing List'
> Subject: RE: HttpSessionListener vs. HttpSessionBindingListener 
> 
> 
> Yup. You should be using your session object as implementing the
> sessionbindinglistener...and from the session binding 
> event, you can
> find out the session information and for an unbound event, 
> implement your
> business logic.
> 
> sahil

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



HttpSessionListener vs. HttpSessionBindingListener

2004-07-30 Thread Geeta Ramani
Hi everyone:

I would like some clarification regarding the HttpSessionListener. (We are using 
servlet spec 2.3) 

Here's what I want to do: When a session expires, either when a user uses the "logout" 
feature or due to time-out, I want to delete a certain row from the database. The 
specifics of which row to delete is stored in an attribute in an "user" object in the 
session. 

My existing solution which i don't believe works: Write a class that implements the 
HttpSessionListener and override the sessionDestroyed(HttpSesssionEvent) method. In 
the sessionDestroyed method, call the HttpSessionEvent.getSession() to get the 
session, query the session to get the user and carry on.

However, here's an entry in my logs:
"java.lang.IllegalStateException: getAttribute: Session already invalidated"

So i looked up the Javadocs for the HttpSessionListener and indeed here's the 
description for HttpSessionListener.sessionDestroyed method: 

Notification that a session was invalidated. . 

Note the use of the *past* tense!! Thus, for example, it seems you cannot query the 
session for anything at this point!

Googling produced this page which seems to describe the problem I am facing. 
http://archives.java.sun.com/cgi-bin/wa?A2=ind0207&L=servlet-interest&F=&S=&P=32332

Since this (and others I found like it) are dated over two years ago, I'd like you 
comments on:

Proposed solution: Seeing as it seems that I cannot query the session for any 
attributes after it has already been invalidated, I therefore should make my **User** 
class implement the HttpSessionBindingListener interface and overwrite the 
valueUnbound method.

Is my understanding correct? How do others do this sort of thing?

Thank you in advance for any replies!
Geeta


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



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Geeta Ramani
Absolutely.. and yes, i did note your use of that appropriate adjective..:) 

Something happens to me though when I see the word javascript and I can't help 
myself..;) 

> -Original Message-
> From: Brett Connor [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 4:59 PM
> To: Struts Users Mailing List
> Subject: Re: Not Logged in with the same loggin-password if it is
> already registered.
> 
> 
> Agreed, you did spot the phrase "wacky" in there, yes? 
> Javascript can be 
> very useful, in moderation. I've rarely used it, not proficient in it 
> (yet), and have to have a darn good reason before I go there, 
> kind of a 
> last resort.
> 
> 
> Geeta Ramani wrote:
> 
> >ps. But if you know what's good for you you will stay right 
> away from javascript..
> >
> >  
> >
> >>-Original Message-
> >>From: Brett Connor [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, July 28, 2004 4:47 PM
> >>To: Struts Users Mailing List
> >>Subject: Re: Not Logged in with the same loggin-password if it is
> >>already registered.
> >>
> >>
> >>AFAIK session timeout is the only notification you can get 
> >>here. There 
> >>are undoubtedly some wacky things we can do with javascript - 
> >>reduce the 
> >>session timeout to a small value and include some javascript 
> >>polling in 
> >>every page or something along those lines, but at the end of 
> >>the day it 
> >>comes down to a timeout. The session listener will be 
> called for any 
> >>session created / destroyed as soon as the container is 
> aware itself.
> >>Brett
> >>
> >>
> >>Robert Miller wrote:
> >>
> >>
> >>
> >>>How do you handle the situation where the user closes the 
> >>>  
> >>>
> >>browser without logging out (the windows "X" is not always 
> >>our friend ;)  ).  I am not familiar with the 
> >>SessionListener. Would it help in some way?
> >>
> >>
> >>>Robert
> >>>
> >>> 
> >>>
> >>>  
> >>>
> >>>>>>[EMAIL PROTECTED] 7/28/2004 3:25:16 PM >>>
> >>>>>>   
> >>>>>>
> >>>>>>
> >>>>>>
> >>>Exactly! Or use HttpSessionlistener and database solution 
> >>>  
> >>>
> >>(that jim outlined) simultaneously..
> >>
> >>
> >>>(We are doing almost this except as a solution to a kind of 
> >>>  
> >>>
> >>"opposite" problem - when a user logs off we need to do soem 
> >>work so.. this seems to work nicely)
> >>
> >>
> >>> 
> >>>
> >>>  
> >>>
> >>>>-Original Message-
> >>>>From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> >>>>Sent: Wednesday, July 28, 2004 4:28 PM
> >>>>To: [EMAIL PROTECTED]
> >>>>Subject: Re: Not Logged in with the same loggin-password if it is
> >>>>already registered.
> >>>>
> >>>>
> >>>>Maybe you could have a hashtable in the ServletContext that 
> >>>>maps loginId 
> >>>>to HttpSession -- then use a HttpSessionListener to listen 
> >>>>for session 
> >>>>creation -- when the session is created look for a value in 
> >>>>the hashmap 
> >>>>in the servlet context -- if it is there then invalidate 
> the mapped 
> >>>>session. Then add (put) the new mapping into the hashatable.
> >>>>
> >>>>Ricardo Andres Quintero wrote:
> >>>>
> >>>>   
> >>>>
> >>>>
> >>>>
> >>>>>Hello Guys
> >>>>>I need not to let users to login in my app simultaneosly.
> >>>>>I mean if a login-password is actually logged in, i need to
> >>>>>invalidatye that session and then let the new login-password 
> >>>>>to work in, after invalidating the old session.
> >>>>>
> >>>>>Any ideas? and of course any examples?  
> >>>>>
> >>>>>--
> >>>>>Ricardo Andrés Quintero R.
> >>>>>Ubiquando Ltda.
> >>>>> 
> >>>>>
> >>>>>  
> >>>>>
> >>>>
> >>>>
> >>>>
> >>-
> >>
> >>
> >>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>   
> >>>>
> >>>>
> >>>>
> >>>---
> --
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >>> 
> >>>
> >>>  
> >>>
> >>
> -
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Geeta Ramani
ps. But if you know what's good for you you will stay right away from javascript..

> -Original Message-
> From: Brett Connor [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 4:47 PM
> To: Struts Users Mailing List
> Subject: Re: Not Logged in with the same loggin-password if it is
> already registered.
> 
> 
> AFAIK session timeout is the only notification you can get 
> here. There 
> are undoubtedly some wacky things we can do with javascript - 
> reduce the 
> session timeout to a small value and include some javascript 
> polling in 
> every page or something along those lines, but at the end of 
> the day it 
> comes down to a timeout. The session listener will be called for any 
> session created / destroyed as soon as the container is aware itself.
> Brett
> 
> 
> Robert Miller wrote:
> 
> >How do you handle the situation where the user closes the 
> browser without logging out (the windows "X" is not always 
> our friend ;)  ).  I am not familiar with the 
> SessionListener. Would it help in some way?
> >Robert
> >
> >  
> >
> [EMAIL PROTECTED] 7/28/2004 3:25:16 PM >>>
> 
> 
> >
> >Exactly! Or use HttpSessionlistener and database solution 
> (that jim outlined) simultaneously..
> >
> >(We are doing almost this except as a solution to a kind of 
> "opposite" problem - when a user logs off we need to do soem 
> work so.. this seems to work nicely)
> >
> >  
> >
> >>-Original Message-
> >>From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> >>Sent: Wednesday, July 28, 2004 4:28 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: Not Logged in with the same loggin-password if it is
> >>already registered.
> >>
> >>
> >>Maybe you could have a hashtable in the ServletContext that 
> >>maps loginId 
> >>to HttpSession -- then use a HttpSessionListener to listen 
> >>for session 
> >>creation -- when the session is created look for a value in 
> >>the hashmap 
> >>in the servlet context -- if it is there then invalidate the mapped 
> >>session. Then add (put) the new mapping into the hashatable.
> >>
> >>Ricardo Andres Quintero wrote:
> >>
> >>
> >>
> >>>Hello Guys
> >>>I need not to let users to login in my app simultaneosly.
> >>>I mean if a login-password is actually logged in, i need to
> >>>invalidatye that session and then let the new login-password 
> >>>to work in, after invalidating the old session.
> >>>
> >>>Any ideas? and of course any examples?  
> >>>
> >>>--
> >>>Ricardo Andrés Quintero R.
> >>>Ubiquando Ltda.
> >>>  
> >>>
> >>
> -
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >  
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Geeta Ramani
Yes but wont the container "know" when a user closes his/her window? Are you saying 
this isn't something that a container will be notified about..?/ ..hmm... maybe not... 
ok, Robert scratch my earlier note..(like I said i ought to go home..)

> -Original Message-
> From: Brett Connor [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 4:47 PM
> To: Struts Users Mailing List
> Subject: Re: Not Logged in with the same loggin-password if it is
> already registered.
> 
> 
> AFAIK session timeout is the only notification you can get 
> here. There 
> are undoubtedly some wacky things we can do with javascript - 
> reduce the 
> session timeout to a small value and include some javascript 
> polling in 
> every page or something along those lines, but at the end of 
> the day it 
> comes down to a timeout. The session listener will be called for any 
> session created / destroyed as soon as the container is aware itself.
> Brett
> 
> 
> Robert Miller wrote:
> 
> >How do you handle the situation where the user closes the 
> browser without logging out (the windows "X" is not always 
> our friend ;)  ).  I am not familiar with the 
> SessionListener. Would it help in some way?
> >Robert
> >
> >  
> >
> [EMAIL PROTECTED] 7/28/2004 3:25:16 PM >>>
> 
> 
> >
> >Exactly! Or use HttpSessionlistener and database solution 
> (that jim outlined) simultaneously..
> >
> >(We are doing almost this except as a solution to a kind of 
> "opposite" problem - when a user logs off we need to do soem 
> work so.. this seems to work nicely)
> >
> >  
> >
> >>-Original Message-
> >>From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> >>Sent: Wednesday, July 28, 2004 4:28 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: Not Logged in with the same loggin-password if it is
> >>already registered.
> >>
> >>
> >>Maybe you could have a hashtable in the ServletContext that 
> >>maps loginId 
> >>to HttpSession -- then use a HttpSessionListener to listen 
> >>for session 
> >>creation -- when the session is created look for a value in 
> >>the hashmap 
> >>in the servlet context -- if it is there then invalidate the mapped 
> >>session. Then add (put) the new mapping into the hashatable.
> >>
> >>Ricardo Andres Quintero wrote:
> >>
> >>
> >>
> >>>Hello Guys
> >>>I need not to let users to login in my app simultaneosly.
> >>>I mean if a login-password is actually logged in, i need to
> >>>invalidatye that session and then let the new login-password 
> >>>to work in, after invalidating the old session.
> >>>
> >>>Any ideas? and of course any examples?  
> >>>
> >>>--
> >>>Ricardo Andrés Quintero R.
> >>>Ubiquando Ltda.
> >>>  
> >>>
> >>
> -
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >  
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Not Logged in with the same loggin-password if it isalready registered.

2004-07-28 Thread Geeta Ramani
The HttpSessionlistener interface is your friend ..;)

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html

All you do is write a class which implements it and overwrite the 
sessionDestroyed(HttpSessionEvent) method and bob's your uncle.. (Note that 
HttpSessionEvEnt.getSession gives you a hnadle to the session that was/is in the 
process of getting destroyed).

Point of fact i haven't tested my code with the windows "X" but my bet is it works.. 
(famous last words)..

Geeta

> -Original Message-
> From: Robert Miller [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 4:40 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Not Logged in with the same loggin-password if 
> it isalready
> registered.
> 
> 
> How do you handle the situation where the user closes the 
> browser without logging out (the windows "X" is not always 
> our friend ;)  ).  I am not familiar with the 
> SessionListener. Would it help in some way?
> Robert
> 
> >>> [EMAIL PROTECTED] 7/28/2004 3:25:16 PM >>>
> 
> Exactly! Or use HttpSessionlistener and database solution 
> (that jim outlined) simultaneously..
> 
> (We are doing almost this except as a solution to a kind of 
> "opposite" problem - when a user logs off we need to do soem 
> work so.. this seems to work nicely)
> 
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> > Sent: Wednesday, July 28, 2004 4:28 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Not Logged in with the same loggin-password if it is
> > already registered.
> > 
> > 
> > Maybe you could have a hashtable in the ServletContext that 
> > maps loginId 
> > to HttpSession -- then use a HttpSessionListener to listen 
> > for session 
> > creation -- when the session is created look for a value in 
> > the hashmap 
> > in the servlet context -- if it is there then invalidate the mapped 
> > session. Then add (put) the new mapping into the hashatable.
> > 
> > Ricardo Andres Quintero wrote:
> > 
> > > Hello Guys
> > > I need not to let users to login in my app simultaneosly.
> > > I mean if a login-password is actually logged in, i need to
> > > invalidatye that session and then let the new login-password 
> > > to work in, after invalidating the old session.
> > > 
> > > Any ideas? and of course any examples?  
> > > 
> > > --
> > > Ricardo Andrés Quintero R.
> > > Ubiquando Ltda.
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

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



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Geeta Ramani
Exactly! Or use HttpSessionlistener and database solution (that jim outlined) 
simultaneously..

(We are doing almost this except as a solution to a kind of "opposite" problem - when 
a user logs off we need to do soem work so.. this seems to work nicely)

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> Sent: Wednesday, July 28, 2004 4:28 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Not Logged in with the same loggin-password if it is
> already registered.
> 
> 
> Maybe you could have a hashtable in the ServletContext that 
> maps loginId 
> to HttpSession -- then use a HttpSessionListener to listen 
> for session 
> creation -- when the session is created look for a value in 
> the hashmap 
> in the servlet context -- if it is there then invalidate the mapped 
> session. Then add (put) the new mapping into the hashatable.
> 
> Ricardo Andres Quintero wrote:
> 
> > Hello Guys
> > I need not to let users to login in my app simultaneosly.
> > I mean if a login-password is actually logged in, i need to
> > invalidatye that session and then let the new login-password 
> > to work in, after invalidating the old session.
> > 
> > Any ideas? and of course any examples?  
> > 
> > --
> > Ricardo Andrés Quintero R.
> > Ubiquando Ltda.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Geeta Ramani
yes you are right and I just realised that in fact.. ok never mind. i really need to 
go home

> -Original Message-
> From: David Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 4:28 PM
> To: Struts Users Mailing List
> Subject: RE: Not Logged in with the same loggin-password if it is
> already registered.
> 
> 
> Geeta,
> 
> I read Ricardo's message differently in that the new login 
> would come from
> another machine, so the session wouldn't be shared and 
> invalidated as you
> wrote below.  ough, technically, it (the session) could be 
> shared across
> computers if cookies were turned off and they had the same 
> jsessionid (at
> least in Tomcat 4 & 5).
> 
> Regards,
> David
> 
> -Original Message-
> From: Geeta Ramani [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 4:05 PM
> To: Struts Users Mailing List
> Subject: RE: Not Logged in with the same loggin-password if it is
> already registered.
> 
> 
> Ricardo:
> 
> Not sure where you are having problems..? Why wouldn't 
> something like this
> (pseudocode) work?
> 
> if (isLoggedIn(user)) {
>   session.invalidate();
> }
> //now proceed normally with login with un/pw...
> 
> 
> Regards,
> Geeta
> 
> 
> > -Original Message-
> > From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 28, 2004 3:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: Not Logged in with the same loggin-password if it 
> is already
> > registered.
> >
> >
> > Hello Guys
> > I need not to let users to login in my app simultaneosly.
> > I mean if a login-password is actually logged in, i need to
> > invalidatye that session and then let the new login-password
> > to work in, after invalidating the old session.
> >
> > Any ideas? and of course any examples?
> >
> > --
> > Ricardo Andrés Quintero R.
> > Ubiquando Ltda.
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Geeta Ramani
You are quite right and I realised this after reading jim's response.. As a matter of 
fact we are using sort of the method taht jim suggested in his note (with a 
database).. so i am not sure why i was being stupid.. So never mind me: am going back 
to smoking crack..

> -Original Message-
> From: Ivan Vasquez [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 4:24 PM
> To: Struts Users Mailing List
> Subject: RE: Not Logged in with the same loggin-password if it is
> already registered.
> 
> 
> It may not be as easy as the current session (for the new 
> login) and the session that you want to invalidate are 
> different objects.
> 
> The main issue would be how to get a reference to all active 
> sessions via some session id. Apache Axis, for example, keeps 
> track of them with a list of ActiveSessions. 
> 
> Ivan Vasquez
> (Compatriota :-)
>  
> -Original Message-
> From: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 28, 2004 4:05 PM
> To: Struts Users Mailing List
> Subject: RE: Not Logged in with the same loggin-password if 
> it is already registered.
> 
> Ricardo:
> 
> Not sure where you are having problems..? Why wouldn't 
> something like this (pseudocode) work?
> 
> if (isLoggedIn(user)) {
>   session.invalidate();
> }
> //now proceed normally with login with un/pw...
> 
> 
> Regards,
> Geeta
> 
> 
> > -Original Message-
> > From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 28, 2004 3:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: Not Logged in with the same loggin-password if it 
> is already
> > registered.
> > 
> > 
> > Hello Guys
> > I need not to let users to login in my app simultaneosly.
> > I mean if a login-password is actually logged in, i need to
> > invalidatye that session and then let the new login-password 
> > to work in, after invalidating the old session.
> > 
> > Any ideas? and of course any examples?  
> > 
> > --
> > Ricardo Andrés Quintero R.
> > Ubiquando Ltda.
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Geeta Ramani
Ricardo:

Not sure where you are having problems..? Why wouldn't something like this 
(pseudocode) work?

if (isLoggedIn(user)) {
session.invalidate();
}
//now proceed normally with login with un/pw...


Regards,
Geeta


> -Original Message-
> From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 3:04 PM
> To: [EMAIL PROTECTED]
> Subject: Not Logged in with the same loggin-password if it is already
> registered.
> 
> 
> Hello Guys
> I need not to let users to login in my app simultaneosly.
> I mean if a login-password is actually logged in, i need to
> invalidatye that session and then let the new login-password 
> to work in, after invalidating the old session.
> 
> Any ideas? and of course any examples?  
> 
> --
> Ricardo Andrés Quintero R.
> Ubiquando Ltda.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Re: Why does work differently than ?

2004-07-28 Thread Geeta Ramani
+1 on this.. Actually make that a +100..:)

> -Original Message-
> From: Michael McGrady [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 12:44 PM
> To: Struts Users Mailing List
> Subject: Re: Re: Why does  work differently than 
>  action="">?
> 
> 
> At 09:39 AM 7/28/2004, you wrote:
> >Andy -
> >
> >Based on your email it is hard to tell, but I think you are 
> attempting to do
> >a form.submit(); call in the link action to submit the form.
> 
> Andy,
> 
> I would be willing to bet against pretty heavy odds that your 
> attempted 
> solution here, Andy, is not necessary or advisable.  If you 
> state what the 
> problem is first, then I bet you will get lots of easy and 
> cool solutions.
> 
> Michael
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Reloading Application.resources (Again)

2004-07-26 Thread Geeta Ramani
*Thanks* for posting the code! I meant to look into the link you posted earlier, since 
I want such a capability, but didn't get to it.. Always knew it would profit to 
procrastinate..;)

Thanks again,
Geeta

> -Original Message-
> From: Doug [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 26, 2004 2:48 PM
> To: Struts Users Mailing List
> Subject: Re: Reloading Application.resources (Again)
> 
> 
> Well, it does indeed seem to work.  The question is whether it leaves 
> any lingering resources uncollected, but I'm thinking it shouldn't. 
> Here's my simple Struts Action that takes parameters for 
> which file to 
> reload and which resources object to reload:
> 
> public class ReloadMessageResourcesAction extends 
> org.apache.struts.action.Action
> {
>  public ActionForward execute(
>   ActionMapping mapping,
>   ActionForm form,
>   HttpServletRequest request,
>   HttpServletResponse response) throws Exception
>  {
>  String propertyFileName = 
> request.getParameter("propertyFileName");
>  String messageResourcesKey = 
> request.getParameter("messageResources");
> 
>  if (messageResourcesKey == null)
>  messageResourcesKey = Globals.MESSAGES_KEY;
> 
>  MessageResourcesFactory factory =
>  MessageResourcesFactory.createFactory();
>  MessageResources resources = 
> factory.createResources(propertyFileName);
> 
>  // Set brand new MessageResources object.  There 
> doesn't appear to
>  //  be any API for clearing out the old one.
>  ServletContext ctx = getServlet().getServletContext();
>  ctx.setAttribute(messageResourcesKey, resources);
>  return mapping.findForward("next");
>  }
> }
> 
> Doug wrote:
> 
> > Yes, I know this has been asked before, and I know it's not a base 
> > capability.  However, someone posted this solution several 
> months ago, 
> > which seems reasonable to me.  Can anyone comment on 
> whether there's any 
> > reason not to use this approach?
> > 
> > 
> > 
> > 
> > MessageResourcesFactory factory =
> > MessageResourcesFactory.createFactory();
> > MessageResources resources =
> > factoryObject.createResources(nameOfMessage);
> > 
> > ServletContext ctx = getServlet().getServletContext();
> > ctx.setAttribute(Globals.MESSAGES_KEY, resources);
> > 
> > 
> > Doug
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Connecting to a database during sessionDestroyed(HttpSessionevent) in HttpSessionlistener class

2004-07-26 Thread Geeta Ramani
Reddy:

Thank you for your reply. I like your second idea better and unless I hear objections 
from the list, shall go with that solution, which I certainly like better than my 
original one..:)

Thank you again,
Geeta

> -Original Message-
> From: Pingili, Madhupal [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 26, 2004 10:53 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Connecting to a database during
> sessionDestroyed(HttpSessionevent) in HttpSessionlistener class
> 
> 
> 
> Two ideas that come to mind quickly are:
> 
> 1. Adjust the pool size to a reasonable limit, keeping in 
> mind that NOT only
>actual users who come to the application need a connection 
> from pool, but
> also
>these background processes like listeners need a 
> connection from the same
> pool.
> 
> 2. Keep a loop while getting connection from the pool until you get a
> non-null connection.
> 
> Then, you will always use a pooled connection.  
> 
> Suggestions/Corrections are welcome.
> 
> HTH,
> Reddy Pingili > 

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



Connecting to a database during sessionDestroyed(HttpSessionevent) in HttpSessionlistener class

2004-07-26 Thread Geeta Ramani
This may be classified as OT, and if so, please ignore it or reply to me personally. 
Also if this question has already been answered I would appreciate it very much if 
anyone could send me a link: I can't come up with a good search criterion to 
google/search for.

I wrote a HttpSessionListener for our application and part of the 
sessionDestroyed(HttpSessionEvent)code involved getting a connection from our pool and 
deleting a ceratin record in a table in our database. When I tested this code locally 
this worked great but when I moved this to our server we noticed during testing that 
this code seemed to work inconsistently: It seemed to be executed sometimes and not at 
others. 

After worrying about it over the weekend, I think I figured out the problem: during 
testing we were all using the connection pool whose size we had deliberately set to 1 
to see how slow things could get. Since the sessionDestroyed code involved getting a 
connection from the pool I think it must have timed out when all of us were testing 
the application. In which case, my code simply exited the try block doing nothing 
except log (which was mistakenly turned off for this class (:(.. Anyways, this 
explanation seems to explain everything we noticed.

One way to solve thsi problem is to not use the pool for this part of the app. That 
way it doesn't matter if there's an available connection or not, this code will always 
- well, as far as possible - be executed. (In the other parts of the app, if a 
connection cannot be obtained from the pool, at least the user is made aware of it. 
The HttpSessionListener of course doesn't have that luxury..)

But I kind of feel that this is not really a clean solution..? Can somebody comment on 
why I have a funny feeling about seeking this way out..? Anybody have any better ideas 
on how to solve this problem?

As always, many thanks in advance for any insights!
Geeta

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



RE: Datasource problem again..

2004-07-19 Thread Geeta Ramani
P.S. here you go:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html

Enjoy! :)
Geeta

> -Original Message-
> From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 19, 2004 12:46 PM
> To: Struts Users Mailing List
> Subject: Datasource problem again..
> 
> 
> Hi !
> I have try the follow to retrieve a datasource from Struts using JNDI:
> 
>  Context initCtx = new InitialContext();
>  Context envCtx = (Context) initCtx.lookup("java:comp/env");
>  DataSource ds = (DataSource) envCtx.lookup("jdbc/kiss_web_news");
> 
> but it doesn't work
> 
> it is my struts-config,xml:
>  
>   
>property="driverClassName"
>   value="org.gjt.mm.mysql.Driver" />
>property="url"
>   value="jdbc:mysql://localhost/kiss_web_news" />
>property="username"
>   value="root" />
>property="password"
>   value="1234567" />
>   
>   
> 
> Do I need to modify the web.xml under $Tomcat/conf ?? It seems that
> Stucts doesn't registry the datasource to JNDI and I always get a null
> pointer of datasource.
> 
> any help?
> 
> Regards
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Datasource problem again..

2004-07-19 Thread Geeta Ramani

> -Original Message-
> From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 19, 2004 12:46 PM
> To: Struts Users Mailing List
> Subject: Datasource problem again..
> 
> > 
> Do I need to modify the web.xml under $Tomcat/conf ?? 

You have to add a "Resource" element in your context in server.xml. Here's the sort of 
thing that works for us:






factory

org.apache.commons.dbcp.BasicDataSourceFactory



serverName
localhost


username
TheUserName


password
ThePassword


driverClassName
com.sybase.jdbc2.jdbc.SybDriver


url

jdbc:sybase:Tds:MyServername:portname?servicename=MyServiceName 
 


validationQuery
select count(*) from a tablename where 
something


maxActive
1


maxIdle
1


removeAbandoned
true


removeAbandonedTimeout
60






> 
> Regards

Let me know if you need additional info and I can send you a link where I read up on 
these details: in a rush now for a meeting..(:(

Geeta 

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



RE: About datasource

2004-07-16 Thread Geeta Ramani
Sure Craig, I guess it's a good idea to look beyond the weekend..;) 
Thanks for the advice!
Geeta

> -Original Message-
> From: Craig McClanahan [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 12:16 PM
> To: Struts Users Mailing List
> Subject: Re: About datasource
> 
> 
> Geeta Ramani wrote:
> 
> >Hi:
> >
> >I think this is the sort of thing you may be looking for:
> >
> >Context ctx = new InitialContext();
> >org.apache.commons.dbcp.BasicDataSource ds =
> > 
> (org.apache.commons.dbcp.BasicDataSource)ctx.lookup("java:comp
> /env/jdbc/yourDB"));
> >
> >  
> >
> 
> That's definitely the sort of code to use when you want to 
> pull things 
> out of JNDI, but I would suggest one small change -- use the generic 
> interface (javax.sql.DataSource) instead of hard coding the 
> implementation class that the current version of Tomcat currently 
> happens to use (o.a.c.d.BasicDataSource).  This will protect you from 
> future changes that Tomcat might make, or if you ever needed to move 
> your app to a different server.
> 
> Doing this, the above code would become:
> 
> Context ctx = new InitialContext();
> DataSource ds = (DataSource) 
> ctx.lookup("java:comp/env/jdbc/yourDB");
> 
> For those using Tomcat, there's pretty extensive documentation on the 
> Tomcat web site about how to set up JNDI resources (including 
> the code 
> snippet above :-):
> 
> 
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources
> -howto.html
> 
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasourc
> e-examples-howto.html
> 
> >Regards,
> >Geeta
> >  
> >
> Craig
> 
> > 
> >
> >  
> >
> >>-Original Message-
> >>From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, July 16, 2004 5:18 AM
> >>To: Struts Users Mailing List
> >>Subject: Re: About datasource
> >>
> >>
> >>Hi, after some thinking, I have another problem, ^^
> >>If I am using an Action (which extent the Struts' Action 
> class), I can
> >>get the Datasource by calling getDataSource()
> >>But now I want to write my own data assess object which shouldn't
> >>extent Action, I don't know what way I can get the 
> datasource from the
> >>pool.
> >>
> >>any help??
> >>
> >>Regards
> >>
> >>
> -
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >  
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: How to Disable "open" button on "File Download" dialogue box....please urgent

2004-07-16 Thread Geeta Ramani
Ganesh:

Try something like this:
response.setHeader("Content-Disposition", "inline;filename=myfilename.xyz");

I believe if the extension ("xyz") is "unknown" then a "file save as" dialog will 
always occur.

Also, and I mean this in the kindliest way, maybe you should be a bit more careful 
when you write to this list. Words like "Now i require that feature." or "pls let me 
know the solution asap." irritate people because this list is *entirely* made up of 
volunteers who have "regular" jobs and other things they have to do. Again, no 
harshness intended, just thought you may like to know this for the future..

Regards, and good luck..
Geeta

> -Original Message-
> From: ganesh gadi [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 4:52 AM
> To: [EMAIL PROTECTED]
> Subject: How to Disable "open" button on "File Download" dialogue
> boxplease urgent
> 
> 
> Hi Friends,
> 
> i'm very happy to tell u my problems and get answers.
> 
> i need a solution how to disable "open" button on 
> "File Download" dialog box.i want control on it.
> Pls don't say no solution.Bcox i saw that type of
> dialogue box...Now i require that feature.
> pls let me know the solution asap.
> 
> I used the following code to appear "File Download
> box"
> 
> httpServletResponse.setContentLength((int) f.length));
>   
> httpServletResponse.setContentType(mimeType);
>
> httpServletResponse.setHeader("Content-Disposition","attachmen
> t;filename="+f.getName());
> 
> os =httpServletResponse.getOutputStream();
> stream = new FileInputStream(f);
> bis = new BufferedInputStream(stream);
> is = new BufferedInputStream(bis);
> int count;
> byte buf[] = new byte[4096];
> while ((count = is.read(buf)) > -1)
> os.write(buf, 0, count);
> 
> 
> i'm using 
> tomcat 5.0.19
> Struts 1.1
> IE 6.0
> Windows 2000server
> 
> Thanks
> Ganesh
> 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: simple Question

2004-07-16 Thread Geeta Ramani
Hi Alvin: 

This question has appeared a few times, so you may benefit from searching the 
archives. Short answer(s): either use tokens (like you suggested) or use a redirect 
instead of a forward.

Regards,
Geeta

> -Original Message-
> From: Alvin Antony [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 8:15 AM
> To: [EMAIL PROTECTED]
> Subject: simple Question
> 
> 
> hi friends,
>   how can i prevent the user from refreshing the page 
> and repeating the save process a second time?. Is the 
> Transaction token is good for checking this? 
> 
> thanks a lot,
> Alvin
> 
> 
> Alvin Antony
> Software Engineer
> 
> Ludwig-Maximilians-Universitaet München
> Zentrale Universitaetsverwaltung
> Referat IIIA 3 (Anwendungs Entwicklung)
> Theresienstr. 37 / 2. Stock  Zi. 249
> 80333 Muenchen
> 
> phone  +49 (089) 2180 - 4005
> 
> mail  [EMAIL PROTECTED] 
> web http://informationstechnik.verwaltung.uni-muenchen.de 
> 
> >>> [EMAIL PROTECTED] 16.07.04 13.14 >>>
> Dear,
> 
> First u need to set the hyperlink of the action(in
> which u have implemented delete method logic) on the
> primary key basis through which u will delete the
> record and create an action forard in struts config
> file(action of the class in which u have implementated
> the logic to diaplay records in the view) and forward
> to that action from delete method.
> 
>  Struits-config.xml 
>  type="viewAction.do?parameter=methodName">
> -
> 
> --- View 
>  Delete 
> (or use struts link tag)
> -
> 
> from delete action u need to forward to viewAction and
> all display logic will be there.
> 
> Plz let me know in case of any inconvenience/problem.
> 
> regards,
> Buland
> 
> --- Jon Barber <[EMAIL PROTECTED]> wrote:
> > Dear All,
> > 
> > Trawled through the archive with no luck, but then I
> > couldn't work out
> > the best search terms for this question, so...
> > 
> > I'm writing a shopping basket app with the usual
> > requirements, and using
> > tiles which has made things a lot less painful.
> > However, I have this one
> > problem that I can't work out a nice way to solve.
> > 
> > On every page of the basket the contents of the
> > basket are shown in a
> > panel at the bottom of the page, and against each
> > product is a 'delete'
> > hyperlink.  When the user clicks on this link the
> > product should be
> > removed and the page refreshed to show the modified
> > info.
> > 
> > My question is - how to code the logic to do the
> > deletion of the product
> > in such a way that the refreshing of the page is
> > handled in a nice way ?
> > I have the usual way of using an Action to populate
> > the contexts to
> > render the page, and then an Action to process the
> > users response. When
> > a product is removed I will have to delete the
> > product & then redirect
> > the user back to the Action to populate the page all
> > over again.
> > 
> > As far as I can see I have 2 options :
> > 
> > 1. Have one Action that performs the product removal
> > and that accepts a
> > URL as a parameter that then redirects the user
> > using that URL. I will
> > have to place the necessary URL in the context so
> > that when the page is
> > rendered the redirect URL is set correctly for
> > wherever the user is.
> > Painful & not very nice - every populate Action will
> > have to put the
> > correct URL for itself into the context.
> > 
> > 2. Have a seperate Action for every single delete
> > page so that each
> > instance knows where to send the user back to. Not
> > much different from 1
> > & leads to a lot of Actions.
> > 
> > Any ideas ? 
> > 
> > Am I missing the obvious ? For example, for 1 can I
> > simply use the
> > present request URL as the URL to redirect the user
> > to to redraw the
> > page ?
> > 
> > Jon.
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> =
> 
> Buland Altaf Malik,
> Software Engineer, 
> Softech System's(pvt)Ltd. 
> 10/25 asad jan road lahore,cantt - 54810 Pakistan
> Tel: 92-42-6665812 , 92-42-6660802
> 
> Mob: 0333-4344113
> Fax: 92-42-6665792
> 
> http://www.softech.com.pk
> [EMAIL PROTECTED]
> 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mai

RE: About datasource

2004-07-16 Thread Geeta Ramani
Hi:

I think this is the sort of thing you may be looking for:

Context ctx = new InitialContext();
org.apache.commons.dbcp.BasicDataSource ds =

(org.apache.commons.dbcp.BasicDataSource)ctx.lookup("java:comp/env/jdbc/yourDB"));

Regards,
Geeta


> -Original Message-
> From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 5:18 AM
> To: Struts Users Mailing List
> Subject: Re: About datasource
> 
> 
> Hi, after some thinking, I have another problem, ^^
> If I am using an Action (which extent the Struts' Action class), I can
> get the Datasource by calling getDataSource()
> But now I want to write my own data assess object which shouldn't
> extent Action, I don't know what way I can get the datasource from the
> pool.
> 
> any help??
> 
> Regards
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Configuring plug-ins using

2004-07-15 Thread Geeta Ramani
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 15, 2004 3:35 PM
> To: Struts Users Mailing List
> Subject: RE: Configuring plug-ins using  struts-config.xml)
> 
> > > 
> > P.S> I can see now why writing to the list before googling is 
> > so tempting..!
> 
> It is but then you can end up with a bunch of suggestions you 
> have already tried, when you're looking for something you 
> haven't tried :)


yeah, like maybe read what the doc says rather than make it up as you go along..!

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



RE: Configuring plug-ins using

2004-07-15 Thread Geeta Ramani
Jim:

Yes that worked. I actually read ".. which will all have been called 
before the init() method is invoked." as "which will have to be called before the 
init() method is invoked." and got stumped.. 


Thank you so much!
Geeta

P.S> I can see now why writing to the list before googling is so tempting..!


> From
> http://struts.apache.org/api/org/apache/struts/action/PlugIn.html
> I read:
> Configuration can be accomplished by providing standard 
> JavaBeans property setter methods, which will all have been 
> called before the init() method is invoked.
> 
> I can assume that something like this would work:
> 
> public class SomeLogicalClassName implements Plugin {
>   private String aWellNamedPropertyFieldYouWantToSet;
>   public void get...
>   public void set...
> }
> 
> and in your config:
> 
>property="aWellNamedPropertyFieldYouWantToSet" value="A 
> configuration value" />
> 
> 
> and voila! your plugin is configured.  Maybe... I could be 
> talking out of my hat here.  But that seems logical.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Configuring plug-ins using

2004-07-15 Thread Geeta Ramani
Hi all:

I have a question regarding the use of plug-ins. According to the docs,

"For PlugIns that require configuration themselves, the nested  element 
is available."

My question is simply this: how do I retrieve the value that I set in a set-property 
tag? I am sure this is dead simple to most of you, but even after googling for two 
hours and looking at the source code for the tiles plug-in I seem to be going 
nowhere...(:(

Thanks in advance for any help!
Geeta



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



RE: Browser's refresh problem

2004-07-12 Thread Geeta Ramani
Hi Ding Lei:

Use a redirect instead of a forward and that will solve your problem..

Geeta

> -Original Message-
> From: Ding Lei [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 12, 2004 9:38 AM
> To: Struts Users Mailing List
> Subject: Browser's refresh problem
> 
> 
> Hi all,
> 
>   There's a UserAddAction, which adds the user record to the 
> database, and
> when it's done it redirects the user index page. the problem 
> is that everytime
> the user clicks refresh at the user index page, the same 
> record is added
> again.  
> 
>   I know that unique check is required, but I also hopes that 
> action itself
> should be aware of the user's "Refresh".
> 
>   Thank you.
>   
> 
> -- 
> Layman <[EMAIL PROTECTED]> Ext: 8059
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Multiple forms and actions

2004-07-09 Thread Geeta Ramani
Andy:

Short answer(s): No, the values on each form get submitted to just that Action class. 
And if you want the values of the other form to be submitted too, then won't it be a 
good idea to add those as fields of the first form in the first place? If you can't do 
that for some reason, you will have to rely on yukky javascript stuff..

hth,
Geeta

> -Original Message-
> From: Andrew Close [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 09, 2004 11:12 AM
> To: [EMAIL PROTECTED]
> Subject: Multiple forms and actions
> 
> 
> Hi,
> 
> when you have multiple forms on a JSP and one of those forms is
> submitted, do the values on the other form get sent to the action
> class that was submitted to?
> i have two forms, two actions on one JSP.  when i trigger the event to
> submit one form, will that receiving action also get the values of the
> other form?  and if not, how can i do this?
> 
> thanks,
> andy
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: application configuration

2004-07-08 Thread Geeta Ramani
Kailash:

I don't think this is the case... I believe if you implement the Plugin interface and 
override the init() method, you will be ok..

Geeta

> -Original Message-
> From: Kailash Vasani [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 08, 2004 8:45 AM
> To: 'Struts Users Mailing List'
> Subject: RE: application configuration
> 
> 
 
> Plugin approach has some disadvantages, namely, it gets 
> invoked for all the
> HTTP GET / POST requests,
> that includes GET issued for things like images, CSS files etc.
> 
> in my opinion, Servlet approach should be fine.> 
> 

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



RE: application configuration

2004-07-08 Thread Geeta Ramani
Viral: Look at "Struts Tips" by Ted Husted on the struts home page. I am pretty 
certain he discusses this very issue in detail. (I can't seem to get to that link 
right now hence cannot verify..)

hth,
Geeta

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 08, 2004 8:01 AM
> To: Struts
> Subject: RE: application configuration
> 
> 
> Thats one approach. The other is to use a struts plugin.
> I guess its a matter of taste. My personal preference is for 
> plugins but
> either way also can. 
> 
> -Original Message-
> From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 8 July 2004 19:56
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Cc: Nilesh Suresh Rajurkar
> Subject: RE: application configuration
> 
> 

> 
> Now I want this class to run as soon as server starts... how 
> to achieve
> this ..??
> 
> One approach ...to create a servlet and configure it in web.xml with
> 1
> 
> Is this ok...or is there any better approach to do the same thing..?
> 
> Regards,

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



RE: ActionForward with runtime parameter?

2004-07-08 Thread Geeta Ramani
Just a couple of small notes here though, (added for the Struts beginner): you will be 
setting and getting a "attribute" not a "parameter". Also you will need to set/get it 
as an Integer not an int..

Geeta

> -Original Message-
> From: Kailash Vasani [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 08, 2004 8:29 AM
> To: 'Struts Users Mailing List'
> Subject: RE: ActionForward with runtime parameter?
> 
> 
> Hi,
> 
> Set id and it's value in request object and just forward to
> mapping.findForward("success").
> In ur target page (where u r forwarding), get the value for 
> parameter (id)
> from request object.
> 
> that should do the trick
> 
> Kailash
> 
> 
> -Original Message-
> From: Twan Kogels [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 08, 2004 5:50 PM
> To: [EMAIL PROTECTED]
> Subject: ActionForward with runtime parameter?
> 
> 
> Hello people,
> 
> I've started my first project with struts. It's working fine, 
> clean and 
> quick. But i have a question regarding actionforwards and 
> parameters to the 
> path.
> 
> I have a form; when the user submits the form i forward the 
> user to another 
> page. This page requires one parameter (?id=x) to function. 
> Now i use a 
> code like:
> 
> return new 
> ActionForward(mapping.findForward("success").getPath()+"?id="+
> glform.getGroe
> p());
> 
> to forward and add a parameter. The forward "success" 
> contains the url to 
> the page without parameters (/page.do). I then append the 
> "id=" parameter 
> and create a new ActionForward.
> 
> The value of the id= parameter is only known when the user 
> submits the 
> form. So i cannot put the id parameter in the struts-config.xml file.
> 
> Is the above code the best and cleanest way to do the thing i 
> want to do?
> 
> Cheers,
> Twan Kogels
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Confused about ActionMessages

2004-07-06 Thread Geeta Ramani
Sorry Erik, prematurely hit some contrl key.. 

So, to continue, in your success.jsp add:


   
 
   


But to display your error, do:




  




Hth,
Geeta


> -Original Message-
> From: Erik Weber [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 2:45 PM
> To: Struts Users Mailing List
> Subject: Confused about ActionMessages
> 
> 
> Hello all.
> 
> I have successfully used ActionErrors in combination with the 
> html:errors tag, by adding errors under various keys and then simply 
> placing the  tag at the top of my JSP.
> 
> However, the ActionMessages class doesn't seem to act in 
> parallel to the 
> ActionErrors class, and neither does the html:messages tag 
> seem to act 
> just like the html:errors tag (for one, it has a required 
> attribute that 
> the docs don't explain very well). And I sure don't 
> understand all these 
> constants (GLOBAL_ERROR, ERROR_KEY, MESSAGE, ACTION_MESSAGE, etc). 
> What's for what?
> 
> Could someone please give me a quick and dirty example of using 
> ActionMessages to present a "Your data was saved" or similar 
> message on 
> the "success" page after a form action is processed?
> 
> In other words, could you show me how you are populating the 
> ActionMessages instance in your Action class, and then how you are 
> displaying the messages on your JSP?
> 
> You'll really be helping me out as I'm trying to show my client some 
> working pages soon! (I don't wanna cheat if I don't have to).
> 
> Thanks,
> Erik
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Confused about ActionMessages

2004-07-06 Thread Geeta Ramani
Erik: Here's an example:

In your Action class do:
try {
service.insertEmployee( employeeDTO );
ActionMessages messages = new ActionMessages();
ActionMessage message = new 
ActionMessage("message.employee.insert.success",employeeDTO.getName() );
messages.add( ActionMessages.GLOBAL_MESSAGE, message );
saveMessages( request, messages );
request.setAttribute("employee",employeeDTO);
return (mapping.findForward("success"));
}
catch( DatabaseException de ) {
ActionErrors errors = new ActionErrors();
ActionError error = new ActionError("error.employee.databaseException");
errors.add( ActionErrors.GLOBAL_ERROR, error );
saveErrors( request, errors );
return (mapping.findForward("error"));
}

In your success.jsp:




> -Original Message-
> From: Erik Weber [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 2:45 PM
> To: Struts Users Mailing List
> Subject: Confused about ActionMessages
> 
> 
> Hello all.
> 
> I have successfully used ActionErrors in combination with the 
> html:errors tag, by adding errors under various keys and then simply 
> placing the  tag at the top of my JSP.
> 
> However, the ActionMessages class doesn't seem to act in 
> parallel to the 
> ActionErrors class, and neither does the html:messages tag 
> seem to act 
> just like the html:errors tag (for one, it has a required 
> attribute that 
> the docs don't explain very well). And I sure don't 
> understand all these 
> constants (GLOBAL_ERROR, ERROR_KEY, MESSAGE, ACTION_MESSAGE, etc). 
> What's for what?
> 
> Could someone please give me a quick and dirty example of using 
> ActionMessages to present a "Your data was saved" or similar 
> message on 
> the "success" page after a form action is processed?
> 
> In other words, could you show me how you are populating the 
> ActionMessages instance in your Action class, and then how you are 
> displaying the messages on your JSP?
> 
> You'll really be helping me out as I'm trying to show my client some 
> working pages soon! (I don't wanna cheat if I don't have to).
> 
> Thanks,
> Erik
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: JSP Compilation Problems With JSTL Tags Used

2004-07-01 Thread Geeta Ramani
I think the problem is that you are mixing java code illegally with jstl. For example, 
when you say
try{
something;
}
catch etc. the "something" better be java code..

hth,
Geeta 

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



RE: Scriptlet Params in form

2004-07-01 Thread Geeta Ramani
Hey Keith:

Try instead:

String ss = "/MRA/ModelEdit.do?action=edit¤tModelNum=" + model.getModelNum();


Regards,
Geeta

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 2:26 PM
> To: [EMAIL PROTECTED]
> Subject: Scriptlet Params in form
> 
> 
> Hey everyone, 
> I'm trying to send a parameter with the form submission.  
> What I've been 
> trying is:
> 
> 
> I seem to remember getting something similar to work before, but this 
> isn't working.  The rendered HTML is:
>  action="/MRA/ModelEdit.do?action=edit¤tModelNum=<%=model
> .getModelNum();%>">
> 
> Does anyone know a way of doing this?
> Thanks!
> 
> 
> - Keith
> 

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



RE: R: R: R: Back Browser Button After Logout and Reload so that continue working

2004-06-24 Thread Geeta Ramani
uh oh.. you're spamming again..!

> -Original Message-
> From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 12:48 PM
> To: Struts Users Mailing List
> Subject: Re: R: R: R: Back Browser Button After Logout and Reload so
> that continue working
> 
>  

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



RE: How to execute an initialization by using another servlet entry in web.xml

2004-06-24 Thread Geeta Ramani
Hi Manoj:

Does your getElement() method depend on the individual request? If not you could 
declare it as a static method and then simply access it using 
MyXMLParserServlet.getElement(). Otherwise that method may need a request parameter in 
its signature or something else - depending on your needs..

Hth,
Geeta

> -Original Message-
> From: manoj JC [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 10:17 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to execute an initialization by using another servlet
> entry in web.xml
> 
> 
> Thank you for answering the first part of the question.
> 
> What I am trying to do is, this MyXMLParserServlet(the new 
> entry in web.xml) 
> parses an XML file. From my main ActionServlet.process() , I 
> want to do 
> something like MyXMLParserServlet.getElement() . I won't be 
> calling this 
> method from the init() method of my actionServlet.
> 
> Thanks again. 

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



RE: JDBC connection

2004-06-24 Thread Geeta Ramani
Hi Xinhua:

Here's a link explaining what you want to know:
http://jakarta.apache.org/struts/faqs/database.html

regards,
Geeta

> -Original Message-
> From: Lin, Xinhua [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 9:05 AM
> To: [EMAIL PROTECTED]
> Subject: JDBC connection
> 
> 
> Hi All,
> 
> I have a simple question. Where the jdbc connection should 
> stay within a
> struts application? And how to populate a javabean from the 
> database and
> let the action class know?
> 
>  
> 
> Thanks,
> 
>  
> 
> Xinhua
> 
> 

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



RE: delete a record

2004-06-23 Thread Geeta Ramani
oh ok. Just use Javascript:confirm(..)
Geeta

> -Original Message-
> From: Julia Weaver [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 23, 2004 11:42 AM
> To: Struts Users Mailing List
> Subject: RE: delete a record
> 
> 
> Thank you Geeta,
> 
> What I want to do is when user click DELETE button,
> will show a pop-window with information "Are you sure
> you want to delete the record?", and with YES and NO 
> buttons. 
> 
> > 

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



RE: delete a record

2004-06-23 Thread Geeta Ramani
Julia:

I think your question may not be too clear. First what do you mean by "delete a record 
in struts"? Strictly speaking, I believe Struts does not (should not) have code which 
properly belongs the business/database layer. So assuming that you want to show a 
confirmation page when your application successfully deletes a record in the database, 
all you have to do is forward the user to a success.jsp. Which is similar to what you 
always do in Struts. So what exactly is your problem? If you explain your problem more 
and/or show some code, maybe someone can help you out.

Regards,
Geeta

> -Original Message-
> From: Julia Weaver [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 23, 2004 11:27 AM
> To: Struts Users Mailing List
> Subject: delete a record
> 
> 
> Hi,
> 
> Can anyone please tell me:
> How to do a confirmation when delete a record in
> struts? 
> 
> Thank you,
> 
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Different form tags on same jsp

2004-06-22 Thread Geeta Ramani
Chris, i think what David is trying to say is that such a test of authorization does 
not belong in a tag (because of the nesting problem). An easy and (non-javascript!) 
way of dealing with this is to in the Action *before* the jsp is shown, determine what 
the authority of the user is and then display the correct jsp. Since I think the 
original problem was to not have two different jsps, an appropraite include can be 
used instead (decide at run-time which include to use) and thus reuse the form. 
(Though in my experience, (vast though it is *not*!), reusing jsps is just a headache. 
Writing and maintaining two or more jsps is not that much extra work especially if you 
keep them dumb (like you are supposed to).. just my opinion though..)

Regards,
Geeta

> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 3:11 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Different form tags on same jsp
> 
> 
> Can someone illustrate an example of this?
> 
> -Original Message-
> From: Hibbs, David [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 22, 2004 2:51 PM
> To: Struts Users Mailing List
> Subject: RE: Different form tags on same jsp
> 
> 
> You've got a tag nesting error, to be sure.  This is like doing 
>   
> 
>   
> 
> ...or at least to a JSP compiler it is.
> 
> The solution to your problem is that the form action 
> attribute (and onsubmit
> attribute) can be a runtime expression.
> 
> David Hibbs, ACS
> Staff Programmer / Analyst
> American National Insurance Company
> 
> > -Original Message-
> > From: Pavlikus [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 22, 2004 12:53 PM
> > To: Struts Users Mailing List
> > Subject: Different form tags on same jsp
> > 
> > 
> > Hi all.
> > I want to reuse the jsp page with form where user can 
> Register or Edit 
> > Profile.
> > 
> > I do like:
> > 
> > 
> >   
> >> onsubmit="return validateRegistrationForm(this);">
> > 
> > 
> > 
> >   
> >> onsubmit="return validateEditProfileForm(this);">
> > 
> > 
> > I expect what it render form tag for registrationForm if user have 
> > GUEST_ROLE role, and tag for editProfileForm is user have prepotent 
> > roles.
> > 
> > But when jsp compiles - it show following error:
> > -- The end tag " > 
> > What happen? Is it possible to render different form tags with this 
> > method at all?
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Re[2]: Different form tags on same jsp

2004-06-22 Thread Geeta Ramani
Pavlikus, the error message you posted was:

> >> But when jsp compiles - it show following error:
> >> -- The end tag " -Original Message-
> From: Pavlikus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 2:22 PM
> To: Struts Users Mailing List
> Subject: Re[2]: Different form tags on same jsp
> 
> 
> I'm sorry, this is just misprint when I typing letter. I decide to
> simplify example and make an error.
>  

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



RE: Different form tags on same jsp

2004-06-22 Thread Geeta Ramani
Hi Pavlikus :

I think you may just have a typo:

 <-- don't end tag here..

Regards,
Geeta


> -Original Message-
> From: Pavlikus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 1:53 PM
> To: Struts Users Mailing List
> Subject: Different form tags on same jsp
> 
> 
> Hi all.
> I want to reuse the jsp page with form where user can Register or Edit
> Profile.
> 
> I do like:
> 
> 
>   
>onsubmit="return validateRegistrationForm(this);">
> 
> 
> 
>   
>onsubmit="return validateEditProfileForm(this);">
> 
> 
> I expect what it render form tag for registrationForm if user have
> GUEST_ROLE role, and tag for editProfileForm is user have prepotent
> roles.
> 
> But when jsp compiles - it show following error:
> -- The end tag " 
> What happen? Is it possible to render different form tags with this
> method at all?
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Struts 1.0.2 Dynamic Forward

2004-06-18 Thread Geeta Ramani
Sure. Try it and you will see..:)  
Geeta

> -Original Message-
> From: bmcgovern2004 [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 18, 2004 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Struts 1.0.2 Dynamic Forward
> 
> 
> Geeta,
>Thanks for the reply.  If I create an ActionForward on the fly in 
> my Action class, can I also create or acquire the corresponding 
> ActionForm to prepopulate it before returning the ActionForward?
> 
> 
> --- In [EMAIL PROTECTED], "Geeta Ramani" <[EMAIL PROTECTED]> wrote:
> > ps.s just noticed your subject line: If you want to create an 
> ActionForward on the fly in your CAtion class, that's ok too. Just 
> create a new ActionForward, set its path and return that in your 
> perform/execute method.
> > 
> > Regards,
> > Geeta
> > 
> > > -Original Message-
> > > From: bmcgovern2004 [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, June 18, 2004 8:04 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Struts 1.0.2 Dynamic Forward
> > > > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Struts 1.0.2 Dynamic Forward

2004-06-18 Thread Geeta Ramani
ps.s just noticed your subject line: If you want to create an ActionForward on the fly 
in your CAtion class, that's ok too. Just create a new ActionForward, set its path and 
return that in your perform/execute method.

Regards,
Geeta

> -Original Message-
> From: bmcgovern2004 [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 18, 2004 8:04 AM
> To: [EMAIL PROTECTED]
> Subject: Struts 1.0.2 Dynamic Forward
> > 

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



RE: Struts 1.0.2 Dynamic Forward

2004-06-18 Thread Geeta Ramani
Hi bmcgovern2004: 

I'm not sure I entirely understand what you want to do, but here's one answer anyway:

> In an action class, is it possible to switch gears, populate a new 
> form type with some acquired values, and forward to a different 
> action mapping that uses the new form? 

Yes. Nothing prevents you from doing this.

> Then continue with the original flow?  

Not too sure what you mean by this..?

hth,
Geeta
> 

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



RE: ActionError(s) vs. ActionMessage(s)

2004-06-18 Thread Geeta Ramani
uh, oh, never mind. major duh moment.. The answer is right there in the first link:

Finally, you can save an [ActionMessages] object under an arbitrary key and display it 
with the html:messages tag:

  ActionMessages am = new ActionMessages();
   am.add( ActionMessages.GLOBAL_MESSAGE, 
   new ActionMessage( "msg.warning" ) );
  request.setAttribute("warnings", am);

and in your page:

   
  
   

Sorry for wasting your time!
Geeta

> -Original Message-----
> From: Geeta Ramani 
> Sent: Friday, June 18, 2004 10:44 AM
> To: Struts Users Mailing List
> Subject: ActionError(s) vs. ActionMessage(s)
> 
> 
> Hi all:
> 
> I have been looking into ActionErrors vs. ActionMessages and 
> found the following two links:
> 
> http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsDeprecatedA
> ctionErrors
> 
> and
> 
> http://www.husted.com/struts/tips/017.html
> 
> The first link suggests that ActionError will be deprecated 
> starting 1.2. However, ActionForm.validate will still return 
> ActionErrors. So how is one supposed to use validate()? (It's 
> easy enough to create ActionMessages in the ActionForm but 
> the saveMessages method is only part of the Action class not 
> the ActionForm..) 
> 
> Finally, the latter part of the second link above does still 
> seem to use ActionError and ActionErrors.. I know I must be 
> missing something.. ?
> 
> Thanks for your time!
> Regards,
> Geeta
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



ActionError(s) vs. ActionMessage(s)

2004-06-18 Thread Geeta Ramani
Hi all:

I have been looking into ActionErrors vs. ActionMessages and found the following two 
links:

http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsDeprecatedActionErrors

and

http://www.husted.com/struts/tips/017.html

The first link suggests that ActionError will be deprecated starting 1.2. However, 
ActionForm.validate will still return ActionErrors. So how is one supposed to use 
validate()? (It's easy enough to create ActionMessages in the ActionForm but the 
saveMessages method is only part of the Action class not the ActionForm..) 

Finally, the latter part of the second link above does still seem to use ActionError 
and ActionErrors.. I know I must be missing something.. ?

Thanks for your time!
Regards,
Geeta

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



RE: case insensitive action mapping ?

2004-06-18 Thread Geeta Ramani
Hi Berger:

Take a look at org.apache.struts.action.RequestProcessor. I haven't used it myself, 
but I think something like processMapping(..) or processPath(..) should work..

Regards,
Geeta

> -Original Message-
> From: Albrecht Berger [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 18, 2004 4:19 AM
> To: Struts Users Mailing List
> Subject: case insensitive action mapping ?
> 
> 
> Hello,
> at least one search-engine that is crawling my sites is
> trying to access the controllers with a to lower case converted
> urls.
> For example the action "displayContent.do" is called 
> "displaycontent.do", which couldn't be found by RequestProcessor.
> 
> Is there any configuration that is able to handle the action mapping
> case insensitive ?
> 
> Thx
> berger
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: prob in database connectivity

2004-06-18 Thread Geeta Ramani
Anjali:

Here are two links that you may find useful:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg06123.html

Regards,
Geeta

> -Original Message-
> From: gitanjali [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 17, 2004 7:47 AM
> To: [EMAIL PROTECTED]
> Subject: prob in database connectivity
> 
> 
> Hi All,
>  
> I m trying to do connectivity in my application using 
> data source option given by struts but it is not working.can 
> any body tell me the exact way to do connectiveity.
>  
> thnx in advance.
> Anjali
> 
> Yahoo! India Matrimony: Find your partner online.
> 

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



RE: Form Validation Before Submit

2004-06-15 Thread Geeta Ramani
Ciaran:

Try specifically adding "validate=false" and see what happens..?

Geeta

> -Original Message-
> From: Ciaran Hanley [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 11:28 AM
> To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> Subject: RE: Form Validation Before Submit
> 
> 
> This is not the case with my struts config, I have other 
> forms which are
> much more complex which work fine in the app yet this much simpler one
> attempts to validate before any data is even entered yet I 
> cannot figure it
> out.
> 
> Ciaran
> 
> -Original Message-
> From: ksitron [mailto:[EMAIL PROTECTED] 
> Sent: 15 June 2004 17:02
> To: Struts Users Mailing List
> Subject: Re: Form Validation Before Submit
> 
> 
> 
> In your struts-config.xml, if you have the validate="true" set. Then, 
> the validate method of your form will be
> called before your action.execute method is called.
> 
> Ciaran Hanley wrote:
> 
> >Hello,
> >
> > 
> >
> >I have a simple form in my application which I am having 
> trouble with.
> >
> > 
> >
> >On entering the action class and forwarding to the JSP I see 
> error messages
> >which should only appear when the form has been validated 
> after submitting.
> >I cannot figure out why this is appearing as all that is 
> called inside the
> >action class is a mapping.findForward() to the page in question. Can
> anybody
> >suggest any possible reasons as to why I am seeing the form 
> error messages
> >before submitting.
> >
> > 
> >
> >Thanks,
> >
> >CH
> >
> >
> >  
> >
> 
> -- 
> 
> Kevin J Citron
> Sr. Object Imagineer
> Optimized Objects, Inc.
> EL Paso, Texas 79930
> (915) 565-7785/566-2403
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Scroll to error message?

2004-06-15 Thread Geeta Ramani
Tim:

Have you thought about using anchor tags..? May not be a pretty solution, but could be 
made to work i think..?

Geeta

> -Original Message-
> From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 11:25 AM
> To: Struts User List ([EMAIL PROTECTED])
> Subject: Scroll to error message?
> 
> 
> I have a rather long, involved form that breaks into several 
> sections. Error
> messages are displayed at the top of each section, if an 
> error was made in
> that section.
> 
> The page is long enough that you have to vertically scroll to 
> see the whole
> thing. So when an error message is displayed for a section 
> toward the bottom
> of the page, it's not visible until you scroll the page down. 
> 
> My users would like me to scroll the page down to show an 
> error message, if
> necessary. I can't figure out how to do this. Does anybody have a
> suggestion?
> 
> The errors are displayed by the struts tag  property="something"/>
> 
> --
> Tim Slattery
> [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Accessing Array element while iterating through Map

2004-06-15 Thread Geeta Ramani
ah, in that case does the page render ok if you take out the iterate tag entirely?

> -Original Message-
> From: Geoff Simonds [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 9:32 AM
> To: Struts Users Mailing List
> Subject: RE: Accessing Array element while iterating through Map
> 
> 
> None of the iterate section is rendered.  My page header is 
> displayed and 
> then the page stops midway through an  tag well before 
> the iterate 
> tag is encountered. 

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



RE: Accessing Array element while iterating through Map

2004-06-15 Thread Geeta Ramani
oh, wait a minute. When you said "When the page is rendered, it draws a bit of the 
page", what exactly did you mean? Did you mean *none* of the iterate bit was rendered? 
I thought otherwise (and was hoping it was a problem with data rather than syntax..)

> -Original Message-
> From: Geoff Simonds [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 9:04 AM
> To: Struts Users Mailing List
> Subject: RE: Accessing Array element while iterating through Map
> 
> 
> The rendered page source stops well before the tags that are 
> in question. 
> Almost like it errors and then dumps the page buffer.
 

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



RE: Accessing Array element while iterating through Map

2004-06-15 Thread Geeta Ramani
Hi Geoff:

Did you take a look at the rendered page source?

Geeta

> -Original Message-
> From: Geoff Simonds [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 8:57 AM
> To: Struts Users Mailing List
> Subject: Re: Accessing Array element while iterating through Map
> 
> > 
> Whe the page is rendered, it draws a bit of the page and the 
> remainder of 
> the page remains blank.  I can't find any log entry to 
> indicate that any 
> errors are being thrown.   

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



RE: [OT] thick client functionality in the browser

2004-06-04 Thread Geeta Ramani
Yes, quick, where did I misplace my medication..? ;)

> 
> Now that I've opened a theological nightmare here... ;)
> 
> Frank 

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



RE: Alias names that can be used in javascript to reference when using multiple forms that could point to the same action?

2004-06-04 Thread Geeta Ramani
Hi Ken:

<2 p>
Multiple actions pointing to the same action and form is valid and will work.
 -Original Message-
> From: Linck, Ken [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 04, 2004 11:36 AM
> To: '[EMAIL PROTECTED]'
> Subject: Alias names that can be used in javascript to reference
>  when using multiple forms that could point to the same
> action?
 
  
> The only other solution I could think of is to define multiple actions
> pointing to the same action and form class(if thats possible) 
> but I did not
> try that and that seemed like overkill to me to solve a 
> javascript error at
> this point unless no other elegant solution was available.
>  
> Thanks for advice in adance.
>  
> 

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



RE: [OT] Good env for struts-based-web-tier and ejb components development

2004-06-04 Thread Geeta Ramani
Frank:

I know better than to join in these (un)holy wars, but I don't know anything about 
ultra-edit so am curious: ultra-edit doesn't have command completion, does it? That's 
almost the only thing I have found I like about an IDE, and feel I can't do without..

..but i agree with you: ultimately it's the coder and not the tools that count..:)
Geeta

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 04, 2004 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] Good env for struts-based-web-tier and ejb 
> components
> development 
 
> I don't think either way of thinking is better than the other 
> frankly, I 
> think people can be just as productive either way if they are 
> comfortable 
> with the tools they are using.
> 
> Frank 

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



RE: Newbie question: Are there any issues in having popup browser windows

2004-05-27 Thread Geeta Ramani
Plus isn't it true that whether or not a new session is created on opening a new 
window is browser dependent (I think..?).. I vaguely remember a discussion about this 
a while ago. If this is the case, then this will impact how your application is 
coded...

Geeta

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 27, 2004 1:10 PM
> To: Struts Users Mailing List
> Subject: Re: Newbie question: Are there any issues in having popup
> browser windows
> 
> 
> Adam Lipscombe wrote:
> 
> > Are there any issues to bear in mind when displaying 
> sub-windows in a
> > browser?
> > One of our web developers wants to have several sub-windows 
> launched from
> > links on the main page.
> > 
> > Is this OK in Struts?
> 
> Ok for Struts fine. Ok from a usability perspective.. that depends:)
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: null form passed to execute method

2004-05-27 Thread Geeta Ramani
Mike:

My guess: Look at your Action class. Do you have database statements, result sets, 
connections that aren't getting closed in a finally block? 

Regards,
Geeta


> It isn't consistent, sometimes it happens, most of the time 
> it doesn't.
> The one constant is that when it happens, I have to kill 
> execution, stop
> tomcat, and close the browser, as it will ALWAYS happen from 
> there on out
> unless everything gets shut down.  I start up again, and 
> everything's fine,
> I get my form.
 
> c'ya
> Mike
>  

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



RE: Invalid Path

2004-05-20 Thread Geeta Ramani
Shiva:

Just guessing here: your trace shows you are requesting this path: 
"/countryWiseDetailsInput". Maybe you want something like /countryWiseReport.do?

Regards,
Geeta

> -Original Message-
> From: Hammer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 19, 2004 2:29 PM
> To: [EMAIL PROTECTED]
> Subject: Invalid Path
> 
> 
> Hi,


 
> The error I am getting is :
> 
> Error Code : 400 
> Error occured while processing request : 
> http://livdsweb2.aig.com/TerrorismApp/error.jsp 
> Exception Type : com.ibm.servlet.engine.webapp.WebAppErrorReport 
> Message : Invalid path /countryWiseDetailsInput was requested 
> Stack Trace : com.ibm.servlet.engine.webapp.WebAppErrorReport: > 
> 
> Shiva

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



RE: Multiple Databases.

2004-05-20 Thread Geeta Ramani
Vishal:

If you are using tomcat, then I believe you can use dbcp. (I think that's what Riyad 
Kalla was talking about too..) We use dbcp but only for connecting to one pool (and 
this turned out to be quite simple: just configure the server.xml), but I think I read 
that you can create multiple pools, which seems to be what you need. (My guess is you 
add more http://www.midrangeserver.com/mpo/mpo081502-story04.html

And here's a detailed how-to:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Regards,
Geeta

> -Original Message-
> From: Vishal Arora [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 20, 2004 1:22 AM
> To: Struts Users Mailing List
> Subject: Re: Multiple Databases.
> 
> 
> well  that not the problem  but my problem is that i want to 
> connect to
> different databases  in my application and i m using 
> datasource object  and
> in my xml file i have given the details of my database
> url,username,password  etc etc. but now i want to connect to another
> database and if in struts-config.xml i give information abt 
> other database
> .but when in my controller when i will give call to my 
> datasource object to
> which database the connection will be made and how can i handle
> it..like if i want to make connection to Database A and after 
> sometime in
> the same file if i want to make connection to DatabaseB how 
> will it work and
> what all changes i will have to make.and where. Pleaseif 
> anybody can provide
> an example it will be very helpfull.
> 
> Thanks.> 

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



RE: Tomcat 3.3.1 and Servlet 2.2/JSP 1.1 spec compatibility

2004-05-19 Thread Geeta Ramani
Dan: 

Here you go:

http://archive.apache.org/dist/jakarta/struts/old/release/v1.0.2/

Geeta

> -Original Message-
> From: Dan Tarkenton [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 19, 2004 2:32 PM
> To: Struts Users Mailing List
> Subject: Re: Tomcat 3.3.1 and Servlet 2.2/JSP 1.1 spec compatibility
> 
> 
> Geeta:
> 
> I can't seem to locate v1.02 via google search.  I couldn't 
> find it at 
> http://apache.mirrors.pair.com/jakarta/struts/struts-legacy/ either.  
> Any idea where I can get a copy of the struts 1.02 binaries?
> 
> Thanks,
> Dan
> 
> Geeta Ramani wrote:
> 
> >Dan:
> >
> >Struts 1.1 requires at least Tomcat 4.0. You will have to 
> stick with Struts 1.02.
> >
> >Regards,
> >Geeta
> >
> >  
> >
> >>-Original Message-
> >>From: Dan Tarkenton [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, May 19, 2004 2:20 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Tomcat 3.3.1 and Servlet 2.2/JSP 1.1 spec compatibility
> >>
> >>
> >>I've used struts with great success in the past on some of 
> the latest 
> >>application servers available today.  However, I have a client who 
> >>necessitates the use of Tomcat 3.3.1.  I know that Tomcat 
> >>3.3.1 supports 
> >>the Servlet 2.2 and JSP 1.1 specifications.  I only have 
> >>experience with 
> >>Struts with Tomcat 4.x or higher with the latest Servlet and JSP 
> >>specifications.
> >>
> >>Is there a version of Struts that I can use with Tomcat 
> >>3.3.1?  Is v1.1 
> >>ok or do I need to go back to an earlier version?
> >>
> >>Thanks!
> >>
> >>
> >>
> -
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >  
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Tomcat 3.3.1 and Servlet 2.2/JSP 1.1 spec compatibility

2004-05-19 Thread Geeta Ramani
Dan:

Struts 1.1 requires at least Tomcat 4.0. You will have to stick with Struts 1.02.

Regards,
Geeta

> -Original Message-
> From: Dan Tarkenton [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 19, 2004 2:20 PM
> To: [EMAIL PROTECTED]
> Subject: Tomcat 3.3.1 and Servlet 2.2/JSP 1.1 spec compatibility
> 
> 
> I've used struts with great success in the past on some of the latest 
> application servers available today.  However, I have a client who 
> necessitates the use of Tomcat 3.3.1.  I know that Tomcat 
> 3.3.1 supports 
> the Servlet 2.2 and JSP 1.1 specifications.  I only have 
> experience with 
> Struts with Tomcat 4.x or higher with the latest Servlet and JSP 
> specifications.
> 
> Is there a version of Struts that I can use with Tomcat 
> 3.3.1?  Is v1.1 
> ok or do I need to go back to an earlier version?
> 
> Thanks!
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: how to create a MessageResouces

2004-05-18 Thread Geeta Ramani
Julio:

Look at Riyad Kalla's answer to this question under the thread:
Accessing ResourceBundle items from Action class

Geeta

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 18, 2004 9:42 AM
> To: 'Struts Users Mailing List'
> Subject: how to create a MessageResouces
> 
> 
> What's the best way to create a MessageResource object that loads the
> ApplicacitonResources.properties outside the struts framework (for eg.
> In a servlet)?
>  
> Thanks
> 

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



RE: Hi

2004-05-14 Thread Geeta Ramani
Hi Vetri:

I don't know the solution to your problem, but I remember not too long ago somebody 
else had a similar problem with his/her page being submitting twice. I believe that 
problem was in fact solved. So maybe you could search the archives..?

Regards,
Geeta 

> -Original Message-
> From: Vetrichelvam Malaichamy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 4:22 AM
> To: [EMAIL PROTECTED]
> Subject: Hi
> 
> 
> Hi
> I am Vetri Chelvam. I am using struts 1.1. I am getting a problem.
> The problem is like this.
> There is a button on a Page. And on click of this button, the Action
> servelet is called and the database updations are done and 
> the request is
> served with the response of opening a PDF template. Once the 
> PDF  is opened,
> the request is submitted again and the Action servlet is 
> called and the
> database is updated again.  But we have only one PDF template 
> is opened. For
> One request of opening the PDF template, there are two 
> Database updations
> are done(since the request is submitted again). Can anyone 
> please help me to
> solve this problem. I am little bit tied up with this problem.
> 
> Actually this problem occurs during my UAT of the 
> application. But it does
> not able to be replicated, in the development environment.
> 
> Thanks
> Vetri
> 
> 
> > 

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



RE: Server side validation

2004-05-14 Thread Geeta Ramani
Hmm.. Ok, look at the source code of the page you get.. anything there?
Geeta

> -Original Message-
> From: Samuel Rochas [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 6:42 PM
> To: Struts Users Mailing List
> Subject: Re: Server side validation
> 
> 
> Hello Geeta,
> 
> > "login" must have been defined as a global-forward ..?
> You are right, I am quite new here, I did no notice.
> 
> > No reason. So just take it out..:)
> Ok, it's gone.
> 
> But I still get an empty page when I make a validation error :-(
> 
> The validation code is going thru, maybe another hint?
> 
> Samuel
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Server side validation

2004-05-13 Thread Geeta Ramani
Samuel:

> > input="/myDir/myForm.jsp"
> If the page is under /web (root of the application), then a 
> "/page.jsp" 
> is ok?

Yes, that should be ok.

> Why in the login example there is only a input="login" 
> without a page name?

"login" must have been defined as a global-forward ..?

> 
> > ..and you may want to check on the "scope=session" bit. 
>  > Are you using session scope?
> For what? What should be in the session?

No reason. So just take it out..:)

> 
> Samuel


regards,
Geeta 

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



RE: forward request parameter

2004-05-13 Thread Geeta Ramani
Samuel:

> -Original Message-
> From: Samuel Rochas [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 4:20 PM
> To: Struts Users Mailing List
> Subject: Re: forward request parameter
> 
> 
> Hello Geeta,
> 
> Thanks.
> 

> It means I'll have to process it again, and put again in the request?

Yes, that's right.

> So a session variable may be more apropriate?

That's really up to you. If you put it in the session you will hav eto keep track of 
it and clean it up when you are done with it..

> 
> Samuel

Regards,
Geeta 

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



RE: Form not being repopulated

2004-05-13 Thread Geeta Ramani
Nestor:

Add an "input" attribute in, something like this:



this way when validation fails control will go back to login/login.jsp
Geeta


> My struts-config looks like this:
>  
>  type="com.tcs.reclamos.struts.action.LoginAction"
> name="loginForm" scope="request">
>redirect="true"/>
>   
> 
>  
> Every time a failure occurs because a validation problem the 
> form is not
> repopulated. What else should I check?

>  
> Thanks in advance
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Server side validation

2004-05-13 Thread Geeta Ramani
Samuel: 

The "input" field is the path to the jsp where your form resides, something like: 

input="/myDir/myForm.jsp"

..and you may want to check on the "scope=session" bit. Are you using session scope?

Geeta

> -Original Message-
> From: Samuel Rochas [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 11:42 AM
> To: Struts Users Mailing List
> Subject: Server side validation
> 
> 
> Hello,
> 
> I am trying to use server side validation. I validate my form data in 
> the validate method of the form. When there is a validation error the 
> application shows me a blank page, and not the form again.
> 
> I guess I have an error in the action mapping configuration in 
> struts-config, I am not sure about the use of the "input" field.
> 
>   type="x.y.ItemNewAction"
> name="itemForm"
> scope="session"
> input="item">
>
>  
> 
> My form validation works fine with the login (from the struts 
> example) 
> but I can't see what is the difference between both form 
> configuration.
> 
> Can anybody help?
> 
> Thanks
> Samuel
> 
> ---  andinasoft SA - Software y Consulting  ---
> Mariano Aguilera 276 y Almagro - Quito, Ecuador
> Tel. +593 2 290 55 18  Cel. +593 9 946 4046
> -  http://www.andinasoft.com  -
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: forward request parameter

2004-05-13 Thread Geeta Ramani
Sameul:

You will have to put the data again in the request scope in your second action..

Geeta

> -Original Message-
> From: Samuel Rochas [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 11:43 AM
> To: Struts Users Mailing List
> Subject: forward request parameter
> 
> 
> Hello,
> 
> I am using an Action which puts some data in the request scope. That's
> just fine to display the data in the next jsp page (let's
> call it target.jsp).
> 
> I am submiting a form in target.jsp which should do some 
> action an show
> again the target.jsp page.
> 
> When I show again the target.jsp page, the data are not 
> shown. How can I
> do to show again my data without using a session variable?
> 
> Sincerly
> Samuel
> 
> ---  andinasoft SA - Software y Consulting  ---
> Mariano Aguilera 276 y Almagro - Quito, Ecuador
> Tel. +593 2 290 55 18  Cel. +593 9 946 4046
> -  http://www.andinasoft.com  -
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: forwarding to action needing different request parameters

2004-05-12 Thread Geeta Ramani
I am pretty sure I got this to work. Here's how I remember it:
Create a new Actionforward. Set it equal to the path (got from getPath). Then add the 
params you want and then use setPath. Is this what you did?

> -Original Message-
> From: Nimmons, Buster [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 3:28 PM
> To: 'Struts Users Mailing List'
> Subject: RE: forwarding to action needing different request parameters
> 
> 
> I tried this and got the following exception
> 
> java.lang.IllegalStateException: Configuration is frozen  
> at 
> org.apache.struts.config.ForwardConfig.setPath(ForwardConfig.java:208)
> 
> at
> com.sbec.folderview.po.actions.UploadPoDocument.perform(Upload
> PoDocument.jav
> a:80)
> 
> -Original Message-
> From: Geeta Ramani [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 1:59 PM
> To: Struts Users Mailing List
> Subject: RE: forwarding to action needing different request parameters
> 
> 
> I think you can do this: get the ActionForward object as 
> usual. Then use the
> ActionForward's getPath and setPath methods to add the rest 
> of your params
> as query string parameters to the original path. This I am 
> pretty sure will
> work.
> 
> But if you want to look at a nicer solution, maybe the 
> RequestProcessor may
> have something to do this.. (I am not sure of this since I 
> have not done
> it.)
> 
> regards,
> Geeta
> 
> > -Original Message-
> > From: Nimmons, Buster [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 12, 2004 2:56 PM
> > To: Struts2 (E-mail)
> > Subject: forwarding to action needing different request parameters
> > 
> > 
> > I have an Action which is usualy accessed from an html form 
> page... It
> > requires 4 request parameters. I need to forward to this 
> > action from another
> > action but the action I'm forwarding from does not have all 4 
> > of the reuired
> > request parameters. I know what the value of the parameters 
> > should be but I
> > cannot put them in the request scope unless I use 
> > request.setAttribute()
> > however the action being forwarded to is not looking for 
> the required
> > parameters from the Attributes but the requestParametes.. has 
> > anyone figured
> > out an easy way to modify the available requestParameters 
> > before forwarding
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: forwarding to action needing different request parameters

2004-05-12 Thread Geeta Ramani
I think you can do this: get the ActionForward object as usual. Then use the 
ActionForward's getPath and setPath methods to add the rest of your params as query 
string parameters to the original path. This I am pretty sure will work.

But if you want to look at a nicer solution, maybe the RequestProcessor may have 
something to do this.. (I am not sure of this since I have not done it.)

regards,
Geeta

> -Original Message-
> From: Nimmons, Buster [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 2:56 PM
> To: Struts2 (E-mail)
> Subject: forwarding to action needing different request parameters
> 
> 
> I have an Action which is usualy accessed from an html form page... It
> requires 4 request parameters. I need to forward to this 
> action from another
> action but the action I'm forwarding from does not have all 4 
> of the reuired
> request parameters. I know what the value of the parameters 
> should be but I
> cannot put them in the request scope unless I use 
> request.setAttribute()
> however the action being forwarded to is not looking for the required
> parameters from the Attributes but the requestParametes.. has 
> anyone figured
> out an easy way to modify the available requestParameters 
> before forwarding
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Struts/Resin case-sensitivity

2004-05-12 Thread Geeta Ramani
You know, isn't the RequestProcessor supposed to be used for just this kind of thing? 
You know, when you get a request, massage it so it is just as you'd like (in this case 
maybe change the case of the mapping to all lower case) and then adding just the 
lower-case to the struts-config.xml should work..? But I may be all wrong since I 
don't have any experience with the requestProcessor myself - just dreamed of using it 
some time..;) ..

Geeta

> -Original Message-
> From: Daniel Perry [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 10:48 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: Struts/Resin case-sensitivity
> 
> 
 
> I dont know of a way to tell struts to act case-insensitivly.
> 
> Daniel.
> > 

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



RE: ApplicationResource.properties reload

2004-05-12 Thread Geeta Ramani
Did you look at the second message in the second link below? I believe the Reload 
action was removed from struts 1.1 because it didn't do all that the name suggested it 
would do, but reloading the app resources properties file probably does not involve 
all the problems that class reloading does. So maybe the suggestion of adding the 
Reload action in your struts-config file may do the trick..? (I don't know if 
ReloadAction itself was removed from the struts 1.1 bundle or just the notation from 
the struts-config.xml.. anyway, since the source for struts 1.02 should be still be 
around, you may be in luck..:)  

Anyway, hopefully a *real* guru will comment on this: I have often wondered about this 
question myself..
Geeta

> -Original Message-
> From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 9:05 AM
> To: Struts Users Mailing List
> Subject: RE: ApplicationResource.properties reload
> 
> 
> Hi,
> 
> Those links were informative.
> But i want to reload only my ApplicationResource.properties.
> Any hints on how to tweak this ?
> 
> Regards,
> Janarthan S
> 
> -Original Message-
> From: Geeta Ramani [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 6:19 PM
> To: Struts Users Mailing List
> Subject: RE: ApplicationResource.properties reload
> 
> 
> Janarthan:
> 
> Take a look at this link:
> http://www.scioworks.net/devnews/strutsDistilled/updates/updat
> e-020811/reload.html
> 
> and at:
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg
22743.html

However:
http://jakarta.apache.org/struts/faqs/newbie.html#reload

Regards,
Geeta

> -Original Message-
> From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 5:54 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: ApplicationResource.properties reload
> 
> 
> Gurus,
> 
> I am using Struts1.1.
> Is there any custom code(already available) that can reload the 
> ApplicationResource.properties file without a 
> redeploy/restart of the application ?
> 
> 
> Regards,
> Janarthan S
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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


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


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



RE: ApplicationResource.properties reload

2004-05-12 Thread Geeta Ramani
Janarthan:

Take a look at this link:
http://www.scioworks.net/devnews/strutsDistilled/updates/update-020811/reload.html

and at:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg22743.html

However:
http://jakarta.apache.org/struts/faqs/newbie.html#reload

Regards,
Geeta

> -Original Message-
> From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 5:54 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: ApplicationResource.properties reload
> 
> 
> Gurus,
> 
> I am using Struts1.1.
> Is there any custom code(already available) that can reload the 
> ApplicationResource.properties file without a 
> redeploy/restart of the application ?
> 
> 
> Regards,
> Janarthan S
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: convert locamachine serverpath to universal clientpath he can download it and play very very urgent please

2004-05-12 Thread Geeta Ramani
Ganesh:

For some reason we are receiving four copies of each note that you write.. Would you 
please see what's up? Thanks!

Geeta

> -Original Message-
> From: ganesh g [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 8:38 AM
> To: Struts Users Mailing List
> Subject: convert locamachine serverpath to universal clientpath he can
> download it and play very very urgent please
> 
> 
> Hi friends,
> You are right But i'm placing in another drive 
> 
> c:\clientsData\client1\client1 huge PersanalData..
> 
> c:\clientsData\client2\.client2 huge PersanalData..
> 
> c:\clientsData\client3\.client3 huge PersanalData..
> It's a large data.So i'm not allowed to place them in webapps 
> directory.
> From there itself i've give data to clients.So i want another 
> solution in detail please.
>  
> Please help me Urgent
> Ganesh
>  
>  
> 
> 
> "Rosenberg, Leon" <[EMAIL PROTECTED]> 
> wrote:This is not a 
> struts question, but, put your file in the context of your web-app -> 
> .../webserver/webapps/your-web/audioFiles/sample.wav and 
> reference it in 
> the jsp as /audioFiles/sample.wav
> 
> 
> 
> > -Ursprüngliche Nachricht-
> > Von: ganesh g [mailto:[EMAIL PROTECTED]
> > Gesendet: Mittwoch, 12. Mai 2004 14:16
> > An: user
> > Cc: user
> > Betreff: convert locamachine serverpath to universal clientpath he 
> can
> > download it and play very very urgent please
> > 
> > Hi List,
> > 
> > i need ur help very urgent.
> > 
> > 1)
> > My audio file path in my server is as follows:
> > 
> > "c:\audioFiles\sample.wav"
> > 2)
> > i wrote javascript code snippet in a jsp file to play that 
> audio file
> > where i'm sending my server path("c:\audioFiles\sample.wav") to play
> > audio.But client is not able to play the audio file.Here when a 
> client
> > clicks on 'Play' button, audio should play.i.e.,'download' sould
> > automatically happen internally without displaying the download 
> dialogue
> > box.
> > 
> > What my serious problem is how to send my server path to 
> all clients 
> so
> > that they can play it.How to convert this path into 
> Universal path or 
> Url
> > path.
> > 
> > Are there any methods or tricks??
> > i'm using struts ...
> > Pls help me. Urgent..
> > 
> > Advance thanks
> > Ganesh
> 
> 
>   
> -
> Do you Yahoo!?
> Yahoo! Movies - Buy advance tickets for 'Shrek 2' 
> 

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



RE: Reports In Struts Frame work

2004-05-10 Thread Geeta Ramani
jfreechart *rocks*!! (http://www.jfree.org/jfreechart/)

> -Original Message-
> From: as as [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 4:02 PM
> To: Struts Users Mailing List
> Subject: Re: Reports In Struts Frame work
> 
> 
> did u try jfree.org
> have a look at jchart.org also
> 
> [EMAIL PROTECTED] wrote:
> 
> Hi, 
> I want to implement reporting in struts framework , the 
> reports are like  select and display query, i dont have any 
> idea how to implement then in this framwork specially , the 
> action class  for report , i have coded the Model 1 type of 
> jsp report can any one provide  some hints how to proceed for 
> action class  for report. 
> thanks 
> rgds 
> 
> Birendar Singh Waldiya
> 
> 
> 
> "Jonathan Wright" <[EMAIL PROTECTED]> 
> 29-04-04 10:16 AM 
> Please respond to
> "Struts Users Mailing List" <[EMAIL PROTECTED]>
> 
> 
> To
> "Struts Users Mailing List" <[EMAIL PROTECTED]> cc
> Subject
> Re: Database access in contextInitialized
> 
> 
> 
> 
> The 'dataSource' attribute is stored in your servlet context. 
> So anywhere
> you can get a reference to that you can get hold of a 
> reference to your data
> source.
> 
> Hope that helps!
> 
> Jonathan
> 
> - Original Message -
> From: "Samuel Rochas" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, April 29, 2004 5:15 AM
> Subject: Database access in contextInitialized
> 
> 
> > Hello Struts Gurus,
> >
> > I am starting with struts.
> > I used to make some initialization in my Servlets using the init()
> > method. With struts, I just implemented the 
> contextInitialized method of
> > ServletContextListener Interface, and I have a place for such
> > initializations. Fine.
> >
> > The things I used to initialize were some Collections with 
> data from a
> > database. With struts, I am now using the datasource 
> configuration in
> > struts-config.xml and I access it in my Actions with:
> > getDataSource(request). Fine too.
> >
> > But, I don't have access to getDataSource() in my 
> ServletContextListener
> > implementation. So how can I access my database there, the 
> same way I
> > access it in the rest of the application?
> >
> > Thanx in advance
> > Samuel
> >
> > ---  andinasoft SA - Software y Consulting  ---
> > Mariano Aguilera 276 y Almagro - Quito, Ecuador
> > Tel. +593 2 290 55 18  Cel. +593 9 946 4046
> > -  http://www.andinasoft.com  -
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ForwardSourceID:NT6246 
> DISCLAIMER: The information contained in this message is 
> intended only and solely for the addressed individual or 
> entity indicated in this message and for the exclusive use of 
> the said addressed individual or entity indicated in this 
> message (or responsible for delivery
> of the message to such person) and may contain legally 
> privileged and confidential information belonging to Tata 
> Consultancy Services. It must not be printed, read, copied, 
> disclosed, forwarded, distributed or used (in whatsoever 
> manner) by any person other than the addressee. 
> Unauthorized use, disclosure or copying is strictly 
> prohibited and may constitute unlawful act and can possibly 
> attract legal action, civil and/or criminal. The contents of 
> this message need not necessarily reflect or endorse the 
> views of Tata Consultancy Services on any subject matter.
> Any action taken or omitted to be taken based on this message 
> is entirely at your risk and neither the originator of this 
> message nor Tata Consultancy Services takes any 
> responsibility or liability towards the same. Opinions, 
> conclusions and any other information contained in this message 
> that do not relate to the official business of Tata 
> Consultancy Services shall be understood as neither given nor 
> endorsed by Tata Consultancy Services or any affiliate of 
> Tata Consultancy Services. If you have received this message 
> in error, you should destroy this message and may please 
> notify the sender by e-mail. Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>   
> -
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs 
> 

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



RE: Please help: Empty form while error

2004-05-10 Thread Geeta Ramani
Kevich: make sure you don't have a "redirect=true" in your add configuration in 
struts-config file. If that looks ok, post the relevant portions of the 
struts-config.xml and someone could maybe spot the problem..

Regards,
Geeta

> -Original Message-
> From: Kevich Gan [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 2:33 PM
> To: struts user
> Subject: Please help: Empty form while error
> 
> 
> Hi,
>  
> I have an add form and an edit form. I thought I configured 
> both the same style but my edit works well while my add form 
> comes back empty when an error occurs and 
> findforward("error") forward it back to the add form. Of 
> course I'd like to have user's input displayed. Both 
> editSaveAction and addAction use the same form bean.
>  
> I guess Struts is resetting the form somewhere but I don't 
> know where or how to set it. 
>  
> Could anyone help me? Thanks in advance!
>  
> - Kevich
>  
>  
> 
> 
>   
> -
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs 
> 

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



RE: concurrency in struts

2004-05-10 Thread Geeta Ramani
Yes, somebody did indeed answer better.. Please see Manfred Wolff's earlier response 
in this thread. :)

> -Original Message-
> From: Ludovic Maitre [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 9:08 AM
> To: Struts Users Mailing List
> Subject: Re: concurrency in struts
> 
> 
> Hello,
> 
> I think, but i hope that somebody could answer better, that 
> the servlet 
> container will instantiate a new Servlet, and accompanying Action 
> classes, if this is needed. As far as i know, in J2EE, this is the 
> servlet container who is responsible for forking new threads for the 
> clients on-demand.
> 
> Could somebody confirm (or infirm) that this is right ?
> 
> Best regards,
> Ludo
> 
> Jignesh Patel wrote:
> > On Monday 10 May 2004 17:21, Jignesh Patel wrote:
> >  I am just wondering, how concurrent request will be 
> handled by single
> >  Action class. Because for many form objects(as there are 
> thousands of
> >  browser running with jsp forms) and there is only one action class.
> > 
> 
> 
> -- 
> Ludovic Maître
> 
> Factory Productions | Tél: (33) 04 93 07 08 00
> 149, avenue des mimosas | Fax: (33) 04 93 07 04 02
> 06700 Saint-Laurent-du-Var (France) | Web: http://www.factory.fr
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: strange tomcat problem with struts1.1

2004-05-10 Thread Geeta Ramani
Jignesh:

Trust me on this, you *don't* want to avoid concurrent requests: Struts takes care of 
that bit for you. As long as the variables in the execute method of your action 
classes are all method variables and you stay away from class variables, you will be 
ok. Really.  :)

As for why your tomcat server hangs, not having seen any code, I can only guess at the 
reason: chances are it has something to do with database connections not getting 
returned/closed properly in a finally block after they are used. (I assume you can get 
stuff to work via a tomcat restart..?) I kind of doubt your problem has anything to do 
with the addition of your synchronized key word..

Regards,
Geeta

> -Original Message-
> From: Jignesh Patel [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 9:02 AM
> To: Struts Users Mailing List
> Subject: strange tomcat problem with struts1.1
> 
> 
> Hi All,
> We are facing one strange problem, our server hangs after 
> every 2-3 days. The 
> reason behind it, is it tomcat creates unwanted java processes.
> From my side I haven't implemented anything special except adding 
> "synchronized (this) {"  line in execute method so that I can avoid 
> concurrent request.
> 
> Will it be the reason?
> > 

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



RE: concurrency in struts

2004-05-10 Thread Geeta Ramani
Jignesh:

The "execute" method of the Action class includes (among others) as params the 
request, response objects of each user.. That I believe is the key..:)

Regards,
Geeta

> -Original Message-
> From: Jignesh Patel [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 8:54 AM
> To: Struts Users Mailing List
> Subject: concurrency in struts
> 
> 
> On Monday 10 May 2004 17:21, Jignesh Patel wrote:
>  I am just wondering, how concurrent request will be handled by single
>  Action class. Because for many form objects(as there are thousands of
>  browser running with jsp forms) and there is only one action class.
> 
> -- 
> Jignesh Patel
> Project Leader> 

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



RE: Some further newbie woes

2004-05-06 Thread Geeta Ramani
Any joy looking at the page source maybe..?

> -Original Message-
> From: None None [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 06, 2004 3:43 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Some further newbie woes
> 
> 
> I'll stick with None None until I get this figured out :)
> 
> That didn't seem to help either... I actually thought of that 
> previously, I 
> figured at some point there has to be some code casting an 
> Object to a File 
> object, otherwise certainly the getName() method call is 
> going to fail.  I 
> tried again anyway, and it didn't help.
> 
> >From: "Geeta Ramani" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: Some further newbie woes
> >Date: Thu, 6 May 2004 15:28:14 -0400
> >
> >None None: (or Someone Someone..;))
> >
> >In fact maybe just adding the "type" attribute to your 
> orignal iterate will 
> >work I think:
> >
> > >type="java.io.File">
> > 
> >
> >
> >Regards,
> >Geeta
> >
> > > -Original Message-
> > > From: Solley, Tim [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, May 06, 2004 3:31 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Some further newbie woes
> > >
> > >
> > > Hi None None...
> > >
> > > So in your JSP you are iterating over an ArrayList of File
> > > objects, trying to get at a property inside the File objects.
> > >  To get at nested objects, you use the Struts nested tag library.
> > >
> > > Try replacing your  with the equivalent
> > > from the nested library: (below off the top of my head)
> > >
> > >  > > property="drives" type="java.io.File">
> > >   
> > > 
> > >
> > > See if you have luck with that.
> > >
> > >
> > >
> > > -Original Message-
> > > From: None None [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, May 06, 2004 2:16 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Some further newbie woes
> > >
> > >
> > > Ok, I've banged my head enough in the past two hours...
> > >
> > > I'm working on a file manager Struts app to get myself
> > > acquainted with
> > > Struts.  The first logical step is a list of drives.  Here's
> > > what I've
> > > done...
> > >
> > > I have created an index.jsp that does a quick forward to
> > > main.jsp (just like
> > > the blank struts app does).  In main.jsp I have a simple link to
> > > listDrives.ofm (using extension mapping in this app).  Here's my
> > > struts-config.xml file, minus comments, linebreaks and the
> > > XML & doctype
> > > tags (to save space here)...
> > >
> > > 
> > > 
> > >> > type="com.omnytex.ofm.actionforms.ListDrivesForm" />
> > > 
> > > 
> > >   
> > > 
> > > 
> > >> > type="org.apache.struts.actions.ForwardAction"
> > > parameter="/jsp/main.jsp" />
> > >> > type="com.omnytex.ofm.actions.ListDrivesAction" 
> name="listDrivesForm"
> > > scope="request" validate="false">
> > >  path="/jsp/drivesList.jsp" />
> > >   
> > > 
> > > 
> > >
> > > Simple enough.  So, I click my link and the following 
> ActionForm is
> > > instantiated in request scope:
> > >
> > > package com.test.ofm.actionforms;
> > > import org.apache.struts.action.*;
> > > import java.io.*;
> > > import java.util.*;
> > > public class ListDrivesForm extends ActionForm {
> > >   private ArrayList drives = null;
> > >   public ListDrivesForm() {
> > > drives = null;
> > >   }
> > >   public void setDrives(File[] inDrives) {
> > > drives = new ArrayList();
> > > for (int i = 0; i < inDrives.length; i++) {
> > >   drives.add(inDrives[i]);
> > > }
> > >   }
> > >   public ArrayList getDrives() {
> > > return drives;
> > >   }
> > > }
> > >
> > > Also simple enough.  Next, the following a

RE: Some further newbie woes

2004-05-06 Thread Geeta Ramani
None None: (or Someone Someone..;))

In fact maybe just adding the "type" attribute to your orignal iterate will work I 
think:





Regards,
Geeta

> -Original Message-
> From: Solley, Tim [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 06, 2004 3:31 PM
> To: Struts Users Mailing List
> Subject: RE: Some further newbie woes
> 
> 
> Hi None None...
> 
> So in your JSP you are iterating over an ArrayList of File 
> objects, trying to get at a property inside the File objects. 
>  To get at nested objects, you use the Struts nested tag library.
> 
> Try replacing your  with the equivalent 
> from the nested library: (below off the top of my head)
> 
>  property="drives" type="java.io.File">
>   
> 
> 
> See if you have luck with that.
> 
> 
> 
> -Original Message-
> From: None None [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 06, 2004 2:16 PM
> To: [EMAIL PROTECTED]
> Subject: Some further newbie woes
> 
> 
> Ok, I've banged my head enough in the past two hours...
> 
> I'm working on a file manager Struts app to get myself 
> acquainted with 
> Struts.  The first logical step is a list of drives.  Here's 
> what I've 
> done...
> 
> I have created an index.jsp that does a quick forward to 
> main.jsp (just like 
> the blank struts app does).  In main.jsp I have a simple link to 
> listDrives.ofm (using extension mapping in this app).  Here's my 
> struts-config.xml file, minus comments, linebreaks and the 
> XML & doctype 
> tags (to save space here)...
> 
> 
> 
>type="com.omnytex.ofm.actionforms.ListDrivesForm" />
> 
> 
>   
> 
> 
>type="org.apache.struts.actions.ForwardAction" 
> parameter="/jsp/main.jsp" />
>type="com.omnytex.ofm.actions.ListDrivesAction" name="listDrivesForm" 
> scope="request" validate="false">
> 
>   
> 
> 
> 
> Simple enough.  So, I click my link and the following ActionForm is 
> instantiated in request scope:
> 
> package com.test.ofm.actionforms;
> import org.apache.struts.action.*;
> import java.io.*;
> import java.util.*;
> public class ListDrivesForm extends ActionForm {
>   private ArrayList drives = null;
>   public ListDrivesForm() {
> drives = null;
>   }
>   public void setDrives(File[] inDrives) {
> drives = new ArrayList();
> for (int i = 0; i < inDrives.length; i++) {
>   drives.add(inDrives[i]);
> }
>   }
>   public ArrayList getDrives() {
> return drives;
>   }
> }
> 
> Also simple enough.  Next, the following action executes:
> 
> package com.test.ofm.actions;
> import org.apache.struts.action.*;
> import java.io.*;
> import javax.servlet.http.*;
> import com.test.ofm.actionforms.*;
> public class ListDrivesAction extends Action {
>   public ActionForward execute(ActionMapping mapping, 
> ActionForm form, 
> HttpServletRequest request, HttpServletResponse response) 
> throws Exception {
> File[] drives = File.listRoots();
> ListDrivesForm ldf = (ListDrivesForm)form;
> ldf.setDrives(drives);
> return mapping.findForward("showDrivesList");
>   }
> }
> 
> Now, to this point I am OK because if I do a simple println of 
> ldf.getDrives(), I in fact get a list of the drives on my system as 
> expected.  So, I know my basic flow to this point is OK, and 
> I know the code 
> in the action is doing what I expect.  Lastly, I have the 
> following JSP:
> 
> <%@ page language="java" 
> import="java.io.*,com.omnytex.ofm.actionforms.*" %>
> <%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
> <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
> 
> 
> File Manager
> 
> 
> File Manager
> 
> 
>   
> 
>   
> 
> 
> 
> 
> This is where the problem arises... My table is being built, 
> and the proper 
> number of rows are there, but I'm not seeing the drive letter being 
> displayed.  I have verified that my listDrivesForm is present 
> and populated 
> by donig:
> 
> <%
>   ListDrivesForm ldf = 
> (ListDrivesForm)request.getAttribute("listDrivesForm");
>   System.out.println(ldf);
> %>
> 
> Sure enough, I see my drive list.  Now, I've been playing 
> with various names 
> and ID combinations in the logic:iterate and bean:write tags, 
> but nothing 
> seems to make it work.  I've also tried in place of bean:write:
> 
> <%=((File)drive).getName()%>
> 
> From my reading I expected that to work just as well.  I've 
> also tried 
> adding the scope attribute to the bean:write tag to no avail.
> 
> So, what am I doing wrong here?  Do I need to do usebean here?  Every 
> example I've seen of this never shows that, so I assume not.  
> Also, why 
> didn't the code manually calling getName() above not work 
> either?  Even if I 
> needed useBean I would expect that to still work, which leads 
> me to believe 
> I DON'T need useBean.
> 
> Any help is very much appreciated!
> 
> _
> MSN Toolbar provides one-click access to Hotmail from any Web 
> page - FREE 
> download! http:/

RE: Submit with a link

2004-05-05 Thread Geeta Ramani
Michael:

I think "forms" stands for the list (array?) of all forms in that document. So the 
form which appears (physically) first on the document has index 0, the next one has 1, 
etc.  Is this what you are asking..?

Geeta

> -Original Message-
> From: Michael McGrady [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 4:08 PM
> To: Struts Users Mailing List
> Cc: Struts Users Mailing List
> Subject: Re: Submit with a link
> 
> 
> I am a notice in JavaScript.  I have wondered in my brief perusal of 
> JavaScript books how you tell which form is the referent of 
> the formindex 
> numbers?

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



RE: is this posible? return to the same page after being executed

2004-05-05 Thread Geeta Ramani
ah yes, that's what i was afraid of ( - what i meant by "many ways of getting to that 
action etc..").. 
I suppose you don't want to use hidden vars..? Because that may be a simple solution 
to your problem.. :)

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 12:48 PM
> To: 'Struts Users Mailing List'
> Subject: RE: is this posible? return to the same page after being
> executed
> 
> 
> The issue is that there's multiples ways to call the action 
> that I want
> to come back. So I cannot set this in the struts-config.xml, but maybe
> there's some way to recall the url of the action or jsp inside the
> action that process the request and then come back to the 
> caller action.
> 
> Is that clear?
> 
> Thanks again.
> 
> -Mensaje original-
> De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> Enviado el: Miércoles, 05 de Mayo de 2004 12:49 p.m.
> Para: Struts Users Mailing List
> Asunto: RE: is this posible? return to the same page after being
> executed
> 
> oh, ok!
> 
> This exact question I think was asked and answered maybe in the past
> month or so - sorry, I don't have the exact reference. So maybe you
> could search the archives - or the poster of that answer will oblige
> again.. (have you looked into HttpServletRequestgetRequestUrl() (going
> from memory so may not be exact..)
> 
> However, before you do that, is there some reason you want a "generic"
> answer? After all, this will be an entry in the struts-config.xml and
> hardcoding there is the norm not the exception.. Unless you have many
> ways of getting to that particular action and .. you know what i
> mean..:) I tend to like simple solutions best - but then again, I
> doubtless don't understand the complexities of your situation..
> 
> Geeta
> 
> > -Original Message-
> > From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 05, 2004 11:38 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: is this posible? return to the same page after being
> > executed
> > 
> > 
> > Yeah... :) what I was trying to ask is what the best way to 
> get in the
> > action the path to the page that originally called the action.
> > 
> > Thnks again.
> > 
> > -Mensaje original-
> > De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> > Enviado el: Miércoles, 05 de Mayo de 2004 11:56 a.m.
> > Para: Struts Users Mailing List
> > Asunto: RE: is this posible? return to the same page after being
> > executed
> > 
> > Yes, this will work: try it! :)
> > 
> > Geeta
> > 
> > > -Original Message-
> > > From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, May 05, 2004 11:06 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: is this posible? return to the same page after 
> > being executed
> > > 
> > > 
> > > Is there some way to return to the page / action that 
> > called to action
> > > that is being executed?
> > > I've 1 jsp that forwards to an action and I would like to 
> > > return to the
> > > same page that called the action, by setting the path in the
> > > ActionForward object.
> > >  
> > > Thanks.
> > > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: is this posible? return to the same page after being executed

2004-05-05 Thread Geeta Ramani
oh, ok!

This exact question I think was asked and answered maybe in the past month or so - 
sorry, I don't have the exact reference. So maybe you could search the archives - or 
the poster of that answer will oblige again.. (have you looked into 
HttpServletRequestgetRequestUrl() (going from memory so may not be exact..)

However, before you do that, is there some reason you want a "generic" answer? After 
all, this will be an entry in the struts-config.xml and hardcoding there is the norm 
not the exception.. Unless you have many ways of getting to that particular action and 
.. you know what i mean..:) I tend to like simple solutions best - but then again, I 
doubtless don't understand the complexities of your situation..

Geeta

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 11:38 AM
> To: 'Struts Users Mailing List'
> Subject: RE: is this posible? return to the same page after being
> executed
> 
> 
> Yeah... :) what I was trying to ask is what the best way to get in the
> action the path to the page that originally called the action.
> 
> Thnks again.
> 
> -Mensaje original-
> De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> Enviado el: Miércoles, 05 de Mayo de 2004 11:56 a.m.
> Para: Struts Users Mailing List
> Asunto: RE: is this posible? return to the same page after being
> executed
> 
> Yes, this will work: try it! :)
> 
> Geeta
> 
> > -Original Message-
> > From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 05, 2004 11:06 AM
> > To: 'Struts Users Mailing List'
> > Subject: is this posible? return to the same page after 
> being executed
> > 
> > 
> > Is there some way to return to the page / action that 
> called to action
> > that is being executed?
> > I've 1 jsp that forwards to an action and I would like to 
> > return to the
> > same page that called the action, by setting the path in the
> > ActionForward object.
> >  
> > Thanks.
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: is this posible? return to the same page after being executed

2004-05-05 Thread Geeta Ramani
Yes, this will work: try it! :)

Geeta

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 11:06 AM
> To: 'Struts Users Mailing List'
> Subject: is this posible? return to the same page after being executed
> 
> 
> Is there some way to return to the page / action that called to action
> that is being executed?
> I've 1 jsp that forwards to an action and I would like to 
> return to the
> same page that called the action, by setting the path in the
> ActionForward object.
>  
> Thanks.
> 

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



RE: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Geeta Ramani
Mike, Colin, Hubert: 

Thanks very much for your replies! I now have my struts app log4j integrated into 
eclipse. :))

To help eliminate future headaches, here's a link that helped me:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg01266.html

i added the Log4jInit servlet, updated web.xml, rebuilt and restarted and viola`, 
log4j now is working as advertised!

I now believe Mike's Log4jPluginAction would have done the job too, since as he 
mentioned in his note, log4j was not getting initialised. (don't ask me why: i cannot 
figure that bit out..) Btw, I left commons-logging.jar alone, didn't seem to be a 
problem..

Thanks a lot again: it's been a pretty ok Friday after all..:)
Geeta

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



  1   2   >