RE: Simple html:submit question

2003-08-14 Thread Ravi Kora
Ya, u can do that or u can use a html:link tag(generates a href in
html) like below. You ultimately submit the form in the javascript fn of
href.

html:link href=javascript:submitfn();
html:img src=img.gif /
/html:link 

HTH,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M)
301-519-0727(H)


 -Original Message-
 From: Norr, Peter [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 12, 2003 10:22 AM
 To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
 Subject: RE: Simple html:submit question
 
 
 Should I use an onclick method handler to the image tag so I 
 can submit the form??
 
 
 
 -Original Message-
 From: Alex Shneyderman [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 12, 2003 7:29 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Simple html:submit question
 
 
 
 Use html:image tag.
 
  -Original Message-
  From: Norr, Peter [mailto:[EMAIL PROTECTED]
  Sent: Monday, August 11, 2003 6:26 PM
  To: 'Struts Users Mailing List'
  Subject: Simple html:submit question
  
  How do I use my own image in a html:submit/ or html:cancel/ tag?
  
 
 --
 --
 --
  
  This message is intended only for the personal and 
 confidential use of
 the
  designated recipient(s) named above.  If you are not the intended
  recipient of this message you are hereby notified that any review, 
  dissemination, distribution or copying of this message is strictly 
  prohibited.  This communication is for information purposes 
 only and 
  should not be
 regarded
  as
  an offer to sell or as a solicitation of an offer to buy 
 any financial
  product, an official confirmation of any transaction, or as an
 official
  statement of Lehman Brothers.  Email transmission cannot be 
 guaranteed
 to
  be
  secure or error-free.  Therefore, we do not represent that this
  information is complete or accurate and it should not be 
 relied upon 
  as such.  All information is subject to change without notice.
  
  
  
 -
  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]
 
 
 --
 
 This message is intended only for the personal and 
 confidential use of the designated recipient(s) named above.  
 If you are not the intended recipient of this message you are 
 hereby notified that any review, dissemination, distribution 
 or copying of this message is strictly prohibited.  This 
 communication is for information purposes only and should not 
 be regarded as an offer to sell or as a solicitation of an 
 offer to buy any financial product, an official confirmation 
 of any transaction, or as an official statement of Lehman 
 Brothers.  Email transmission cannot be guaranteed to be 
 secure or error-free.  Therefore, we do not represent that 
 this information is complete or accurate and it should not be 
 relied upon as such.  All information is subject to change 
 without notice.
 
 
 -
 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: Refreshing Issue.

2003-07-11 Thread Ravi Kora
Hi,
This is a common problem and have a look at the 'Synchronizer Token'
J2EE pattern for more details. Below I am pasting the URL where the
problem is elucidiated.
http://www.javaworld.com/javatips/jw-javatip136_p.html

HTH,
Ravi Kora


 -Original Message-
 From: Ravi Garg [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 11, 2003 6:26 AM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: Refreshing Issue.
 
 
 Dear Anurag,
   This is a general problem. Actually when you refresh 
 your page then the previous action which has called this 
 page(which is in this case this page it self) is again 
 submitted. And this previous page is taken from the history 
 of your computer. To prevent this you can do one thing the 
 clear history on submit of this page or else disable the 
 refresh option.
 
 
 Cheers
 Ravi
 
 -Original Message-
 From: Anurag Garg [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 11, 2003 3:38 PM
 To: Struts Users Mailing List (E-mail)
 Subject: Refreshing Issue.
 
 Hi All,
 
 I am facing a problem in jsp page refreshing. After 
 submitting the page to add a new record in the database, I 
 again display the same page with the added record in the 
 list. Now If I press F5 (I am not clicking the ADD
 button) it again adds a new record(duplicate record) in the 
 database, which it should not do.
 
 I have added the following line in my Action Class
   response.setHeader(pragma,no-cache);
 
 I have also added the following statement in the struts-config.xml
   controller nocache=true/
 
 But still it is adding the duplicate record in the database 
 when i press F5. Any solution how to overcome this problem..
 
 Thanks and Regards,
 Anurag Garg
 
 
 -
 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: [OT] Transaction Safe Java Code

2003-06-12 Thread Ravi Kora
If you r using the same connection for both the methods, then u can
rollback. I wud suggest you to do sth like this
Main method()
{
Open ur connection
  Method1(pass connection object);
  Method2(pass connection object);
 Rollback or commit the connection based on ur exceptions etc.
Close the connection
}

I guess the above shud be doable.
-Ravi

 -Original Message-
 From: Navjot Singh [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, June 12, 2003 11:14 AM
 To: Struts Users Mailing List
 Subject: [OT] Transaction Safe Java Code
 
 
 Hi List,
 
 I have 2 methods that i am calling in same sequence.
 
 + txnMethod1()
 + txnMethod2()
 
 I wish either both of them get _executed_ or none of them.
 
 Can i rollback the state to what was before method1's 
 _execution_ if method2 fails?
 
 Is it possible or i should start thinking simple?
 
 ---
 regards
 Navjot Singh
 Net4India Ltd.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



struts-DC/Baltimore [was Re: struts-atlanta]

2003-06-01 Thread Ravi Kora
There is a Struts group in DC. We r still to have a first meeting though.
Since Baltimore is near to DC, I suggest you guys too join the DC so that we
have a substantial number and kick off with a meeting shortly. visit the
group at
http://groups.yahoo.com/group/Struts_DC/

-Ravi

- Original Message -
From: Mark Galbreath [EMAIL PROTECTED]
Newsgroups: Struts
Sent: Friday, May 30, 2003 1:33 PM
Subject: RE: [struts-atlanta] Possible Upcoming meeting topic


 That's totally cool.  Is anybody else here from the Baltimore area?  We
 could hold our first meeting in Fells Point at Berthas (screw those
Atlanta
 teetotalers!) - Wednesday night is local jazz night.

 Mark

 -Original Message-
 From: Ernie Svehla [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 5:02 PM
 To: Struts Users Mailing List
 Subject: Re: [struts-atlanta] Possible Upcoming meeting topic


 I am all in favor of forming a Baltimore Chapter, if there
 isn't anyone else who wants to take the lead on this say
 no more!

 Ernie Svehla
 IntelliObjects Inc.

 On Fri, 30 May 2003 15:52:47 -0400
   Mark Galbreath [EMAIL PROTECTED] wrote:
 THAT will never happen!  (no beer)
 
 -Original Message-
 From: Chappell, Simon P
 [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 3:50 PM
 To: Struts Users Mailing List
 Subject: RE: [struts-atlanta] Possible Upcoming meeting
 topic
 
 
 Any time you want Mark. We meet in Dodgeville. (And NO
 beer! ;-)
 
 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 2:48 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [struts-atlanta] Possible Upcoming meeting
 topic
 
 
 Hey!  when are we going to have a Baltimore chapter???
 
 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 3:35 PM
 To: Struts Users Mailing List
 Subject: Re: [struts-atlanta] Possible Upcoming meeting
 topic
 
 
 That's great Bill!!
 
 So, for now we are tentatively slated for June's
 presentation by David
 Zygmont at Mirant on Tues June 24, 2003.
 
 Bill's presentation is tentatively scheduled for Tues
 July 29, 2003.
 
 I will update the web site as soon as I can.
 
 
 --
 James Mitchell
 Software Developer/Struts Evangelist
 http://www.struts-atlanta.org
 
 
 
 - Original Message -
 From: Siggelkow, Bill [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 3:07 PM
 Subject: RE: [struts-atlanta] Possible Upcoming meeting
 topic
 
 
  I definitely think we should cover EL since the
 struts-el tags can
  take
 advantage of it.  I have started working on a
 presentation I
 definitely want
  to make sure that I put things in the context of Struts.
 Some aspects
  of
 JSTL I am thinking are best to just skim over (e.g. tag library
 validators and especially
  the SQL tags -- what were they thinking! :)
 
  The XML tags are cool but I am thinking that I may not
 be
 able to get
  too
 far in-depth on those.
 
  Please give me any other suggestions.
 
  JSF is interesting too -- that is further out on my
 radar
 right now --
 maybe someone could pick that one up.
 
  Bill Siggelkow
  678.579.6458
  Mirant
  http://www.mirant.com http://www.mirant.com/
 
 
 
   Yahoo! Groups Sponsor
 -~-- Get A Free Psychic Reading! Your Online
  Answer To Life's Important
 Questions.
  http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/nhFolB/TM
 
 -~
  -
 
  To unsubscribe from this group, send an email to:
  [EMAIL PROTECTED]
 
 
 
  Your use of Yahoo! Groups is subject to
  http://docs.yahoo.com/info/terms/
 
 
 
 -
 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: javax.servlet.ServletException

2003-02-04 Thread Ravi Kora
Your  action entries in struts-config do not have any form beans
associated with them. If that is the case, no form beans will be created
for those actions. This means that 'form' parameter in execute() method
is null. I am not very sure if this is the problem though!
Hope this works.

Regards,
Ravi Kora
[EMAIL PROTECTED]
301-869-3299(H)
337-739-3434(M)


-Original Message-
From: EG [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 04, 2003 12:06 PM
To: Struts Users Mailing List
Subject: Re: javax.servlet.ServletException


Here the web.xml ane struts-config.xml

web-app

  !-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  /servlet

  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

  !-- The Welcome File List --
  welcome-file-list
welcome-filelogin.jsp/welcome-file
  /welcome-file-list

/web-app

here the loginAction class

package com.javapro.struts;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public final class LoginAction extends Action {
  public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request, HttpServletResponse
response)
throws IOException, ServletException {

String userName = request.getParameter(userName);
String password = request.getParameter(password);
if (userName!=null  password!=null 
  userName.equals(eric)  password.equals(eric)) {
  HttpSession session = request.getSession();
  session.setAttribute(loggedIn, 1);
  RequestDispatcher rd =
request.getRequestDispatcher(/mainMenu.jsp);
  rd.forward(request, response);
}
else {
  RequestDispatcher rd = request.getRequestDispatcher(/login.jsp);
  rd.forward(request, response);
}
return null;
  }
}

struts-config
  action-mappings
action path=/login type=com.javapro.struts.LoginAction/
action path=/logout type=com.javapro.struts.LogoutAction/
action path=/viewSecret
type=com.javapro.struts.ViewSecretAction/
  /action-mappings
/struts-config


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: Continuous datastream from server to client

2002-11-05 Thread Ravi Kora
Hi, 
I have a html page which contains large data. I do not want the user to
wait till the page gets all the data. I want to start displaying atleast
some portion of data(like 10 rows) and then display the rest when the
server gets it. I guess you were discussing sth on the same lines. I was
struggling for a way to get this done in Struts.

If you have encountered this, can you please tell me how to go about it
or Can you direct me to any resources relating to this problem?

Regards,
Ravi Kora

-Original Message-
From: Joe Germuska [mailto:Joe;Germuska.com] 
Sent: Tuesday, November 05, 2002 12:03 PM
To: Struts Users Mailing List
Subject: RE: Continuous datastream from server to client


At 4:58 PM +0100 2002/11/05, Reinhard Dunst wrote:
Hi, thanks for answer.
I'm using OJB for database access but for the moment without proxy. I 
think the user is responsible to print only lists of acceptable lenght.

But if he wants to print a long list he should do, across ?? pages and 
not page by page.
When I saw, that I could run into memory problems, my next idea was to
use
the PrintWriter from HttpServletResponse, create html code and flush
every
10th row.
But I never tried it. An other Idea is to create a PDF File in the
background. During creation I render a pagecounter on a seperate page
and
when finished I create a link on output page, but thats my last option.

So you think, there is no way to send data with undefined length from 
server to the client?

I guess I had missed your original requirement that this come out as 
a single document...  I believe that you can send data without an 
explicit content-length, but I'm not entirely sure.   HTTP doesn't 
have an explicit end-of-stream string or content-marker so I'm not 
sure how it would know you're done if you don't set the 
content-length, but I'm pretty sure i've heard of it being done...

It's certainly OK to print directly to the Response's writer from 
Struts -- just return null from execute()/perform().

If you can generate a PDF file, you might consider restructuring the 
application so that the user requests a report be emailed to him/her. 
You can launch the generation of the report as a separate thread and 
return a response promptly.  This is nice if it takes a little while 
to generate the report.

Joe

-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records.
--Sam Goody, 1956

--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: [Cust-Taglibs] How to mark a option using html:select?

2002-09-27 Thread Ravi Kora

I think you can't have a scriplet in a Struts tag as in the statement
html:select ... value=%=user.getCompany()%/

However, if you have tried it and it worked, please mail me back
-Ravi


Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

Sent: Friday, September 27, 2002 7:54 AM
To: [EMAIL PROTECTED]
Subject: RE: [Cust-Taglibs] How to mark a option using html:select?


You cannot nest tags this way. You need to do something like:

html:select ... value=%=user.getCompany()%/

or

bean:define id=userCompany name=user property=company/
html:select ... value=%=userCompany.toString()%/

- Thorsten

 -Original Message-
 From: Rademacher Tobias [mailto:[EMAIL PROTECTED]]
 Sent: 27 September 2002 11:55
 To: '[EMAIL PROTECTED]'
 Subject: [Cust-Taglibs] How to mark a option using html:select?
 
 
 I'm currently struggling with the fine custom taglibs of struts.
 
 I have question about the selection tag. I'm currently using:
 
   html:select property=role 
style=margin-left:25%
 
   html:options collection=roles 
   labelProperty=name 
   property=name
/
 /html:select
 
 Works fine. But anyway I want to get a specfic option marked,
 how do I do
 this?
 
 The following code fails in Catalina 4.0.3
 
   html:select property=role 
style=margin-left:25%
  value=bean:write name=user property=company/
 
   html:options collection=roles 
   labelProperty=name 
   property=name
/
 /html:select
 
 What did I wrong? Assing fix string to value attrib works
 fine. But not a
 dynamically assinged value?
 How can I achive that?
 
 Thx for any help.
 
 Bye
 Toby
 
 PS: What is the difference of html:options and
 html:optionsCollection? The
 docu of the last metioned tag  is fairly poor.
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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


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




RE: SAP DB

2002-09-05 Thread Ravi Kora

Hi,
I am also interested in Comments about this question. I am working on
SAP DB right now and feel it is very good for my needs. I never worked
on MySql to compare both of them. 

-Ravi
-Original Message-
From: Ferran Parra [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 05, 2002 12:21 PM
To: Struts Users Mailing List
Subject: SAP DB


Hi is the SAP DB open source database a good DBMS?? why not is popular
than mysql?? thanks
---
Ferran Parra
[EMAIL PROTECTED]
http://www.mubimedia.com
MUBIMEDIA S.L.
C/ Mallorca, 275, 1r 2a 08008 BCN
Tel: 93 215 21 91 / Fax: 93 215 41 21
---


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




RE: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic JavaScripts

2002-09-03 Thread Ravi Kora

Ted,
In your example, you have the following html tag
a href='javascript:doItem(bean:write name=itemForm
property=item/)'

Is there a way to have this as struts tag and still have the dynamic
part in it like this?
html:link href='javascript:doItem(bean:write name=itemForm
property=item/)'

Will the above work?

Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 8:56 AM
To: [EMAIL PROTECTED]
Subject: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic
JavaScripts


The Struts framework ensures that we can perform data validation without

the benefit if JavaScript. But that doesn't mean we can't use JavaScript

in our Struts applications. Most web developers rely on JavaScript to 
provide core features on the presentation layer, and Struts developers 
are no exception.

For more see http://husted.com/struts/tips/010.html


-- Ted Husted, Husted dot Com, Fairport NY US
-- co-author, Java Web Development with Struts
-- Order it today:
-- http://husted.com/struts/book.html



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


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




RE: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic JavaScripts

2002-09-03 Thread Ravi Kora

My actual intention was to question if we can use dynamic scriplets in
Struts tags like the following
html:text name=txt value=bean:write name=itemForm
property=item/ onBlur='javascript:doItem(bean:write
name=itemForm property=item/)'

Will the expression in the Value attribute evaluate at run time like a
scriplet expression in JSP?


Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 11:19 AM
To: Struts Users Mailing List
Subject: Re: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic
JavaScripts


The purpose of the Struts HTML link tag is to render the href attribute 
from an ActionForward path OR as context-relative reference to a page in

your application, and to URL-encode either along the way.

What would be the benefit of using a HTML link tag here?

-Ted.

Ravi Kora wrote:

 Ted,
 In your example, you have the following html tag
 a href='javascript:doItem(bean:write name=itemForm 
 property=item/)'
 
 Is there a way to have this as struts tag and still have the dynamic 
 part in it like this? html:link href='javascript:doItem(bean:write 
 name=itemForm property=item/)'
 
 Will the above work?
 
 Thanks  Regards,
 Ravi Kora
 [EMAIL PROTECTED]
 337-739-3434(M)
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 8:56 AM
 To: [EMAIL PROTECTED]
 Subject: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic
 JavaScripts
 
 
 The Struts framework ensures that we can perform data validation 
 without
 
 the benefit if JavaScript. But that doesn't mean we can't use 
 JavaScript
 
 in our Struts applications. Most web developers rely on JavaScript to
 provide core features on the presentation layer, and Struts developers

 are no exception.
 
 For more see http://husted.com/struts/tips/010.html
 
 
 -- Ted Husted, Husted dot Com, Fairport NY US
 -- co-author, Java Web Development with Struts
 -- Order it today:
 -- http://husted.com/struts/book.html
 
 
 
 --
 To unsubscribe, e-mail: 
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]



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


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




RE: html:submit and Image instead of button

2002-09-03 Thread Ravi Kora

Have a javascript function in the href tag like below.

html:link href=javascript:submitAct(1) 
html:img src=your image.gif /
/html:link 

The javascript function submitAct will have sth like below
function submitAct(index){
  if (index==0)  {...}
  document.forms[0].submit();
}   

Hope this helps. Bye
-Ravi







Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 11:50 AM
To: Struts Users Mailing List
Subject: html:submit and Image instead of button



Hi,

I have 4 buttons on an jsp page, but what if i have to use image instead
of buttons,

like html:submitAdd/html:submit

will have a button with Add Text, and then in my Action class i can find
out which button has been pressed, 

but what if i have to use Image instead of a button, like how can i find
out which image was clicked if i have 4 images on a jsp with
value=sumbit

input type=image value=submit name=login border=0
src=images/en/buttons/login_off.gif width=75 height=24
onMouseOut=MM_swapImgRestore()
onMouseOver=MM_swapImage('login','','images/buttons/login_on.gif',1) 

input type=image value=submit name=signoff border=0
src=images/en/buttons/signoff_off.gif width=75 height=24
onMouseOut=MM_swapImgRestore()
onMouseOver=MM_swapImage('signoff','','images/buttons/signoff_on.gif',1
) 

the above  are 2 tags with same one html:form
action=/pages/selectenv

so how will i come to know which image was clicked, what is the best way
to do it

Ashish


A$HI$H


-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


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




RE: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic JavaScripts

2002-09-03 Thread Ravi Kora

No, I didn't. I resorted to normal input tag when I had to use a
dynamic scriplet in the tag. Any better ideas on this?
-Ravi

Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: Bartley, Chris P [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 11:31 AM
To: 'Struts Users Mailing List'
Subject: RE: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic
JavaScripts


No, you can't (it's invalid XML).  Have you tried it?

 -Original Message-
 From: Ravi Kora [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 10:37 AM
 To: 'Struts Users Mailing List'
 Subject: RE: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic 
 JavaScripts
 
 
 My actual intention was to question if we can use dynamic scriplets in

 Struts tags like the following html:text name=txt 
 value=bean:write name=itemForm property=item/ 
 onBlur='javascript:doItem(bean:write
 name=itemForm property=item/)'
 
 Will the expression in the Value attribute evaluate at run time like a

 scriplet expression in JSP?
 
 
 Thanks  Regards,
 Ravi Kora
 [EMAIL PROTECTED]
 337-739-3434(M)
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 11:19 AM
 To: Struts Users Mailing List
 Subject: Re: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic
 JavaScripts
 
 
 The purpose of the Struts HTML link tag is to render the href
 attribute 
 from an ActionForward path OR as context-relative reference 
 to a page in
 
 your application, and to URL-encode either along the way.
 
 What would be the benefit of using a HTML link tag here?
 
 -Ted.
 
 Ravi Kora wrote:
 
  Ted,
  In your example, you have the following html tag
  a href='javascript:doItem(bean:write name=itemForm
  property=item/)'
  
  Is there a way to have this as struts tag and still have
 the dynamic
  part in it like this? html:link
 href='javascript:doItem(bean:write
  name=itemForm property=item/)'
  
  Will the above work?
  
  Thanks  Regards,
  Ravi Kora
  [EMAIL PROTECTED]
  337-739-3434(M)
  
  -Original Message-
  From: Ted Husted [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 8:56 AM
  To: [EMAIL PROTECTED]
  Subject: [Struts Tip] # 10 Use Struts JSP Tags to create dynamic 
  JavaScripts
  
  
  The Struts framework ensures that we can perform data validation
  without
  
  the benefit if JavaScript. But that doesn't mean we can't use
  JavaScript
  
  in our Struts applications. Most web developers rely on
 JavaScript to
  provide core features on the presentation layer, and Struts
 developers
 
  are no exception.
  
  For more see http://husted.com/struts/tips/010.html
  
  
  -- Ted Husted, Husted dot Com, Fairport NY US
  -- co-author, Java Web Development with Struts
  -- Order it today:
  -- http://husted.com/struts/book.html
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail: 
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 

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


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




RE: html:submit and Image instead of button

2002-09-03 Thread Ravi Kora

Have a property for that bean say
Private Sting act;
and in the jsp have a corresponding hidden tag like
html:hidden property=act/

In the javascript function set the act to whatever you want depending on
the index like
function submitAct(index){ 
if (index==0) { document.form.act.value=act1; 
} 
document.forms[0].submit(); 
} 

Finally, in the Action class get the value of the property act for the
form. Hope this helps!
-R


Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 12:21 PM
To: Struts Users Mailing List
Subject: RE: html:submit and Image instead of button



hi 
But cant i do it in my action class instead in javascript,??
 
 Ravi Kora wrote:Have a javascript function in the href tag like below.





The javascript function submitAct will have sth like below function
submitAct(index){ if (index==0) {...} document.forms[0].submit(); } 

Hope this helps. Bye
-Ravi







Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 11:50 AM
To: Struts Users Mailing List
Subject: html:submit and Image instead of button



Hi,

I have 4 buttons on an jsp page, but what if i have to use image instead
of buttons,

like Add

will have a button with Add Text, and then in my Action class i can find
out which button has been pressed, 

but what if i have to use Image instead of a button, like how can i find
out which image was clicked if i have 4 images on a jsp with
value=sumbit

 [input] src=images/en/buttons/login_off.gif width=75 height=24
onMouseOut=MM_swapImgRestore()
onMouseOver=MM_swapImage('login','','images/buttons/login_on.gif',1) 

 [input] src=images/en/buttons/signoff_off.gif width=75 height=24
onMouseOut=MM_swapImgRestore()
onMouseOver=MM_swapImage('signoff','','images/buttons/signoff_on.gif',1
) 

the above are 2 tags with same one action=/pages/selectenv

so how will i come to know which image was clicked, what is the best way
to do it

Ashish


A$HI$H


-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


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


A$HI$H


-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


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




How to pass paramaeters to display dynamic text using html:errors tag?

2002-07-30 Thread Ravi Kora

Hi,
I am a newbie to struts. Right now, I am able to display server side
errors using the html:errors tag. But, I want to extend the
functionality of this to display some dynamic text. 
I want to pass a parameter to the tag in Application.properties file
which adds the parameter to the text dynamically and adds the object to
ActionErrors class. I know this feature is supported in struts but I am
not able to find any source about this. Can someone help me with this?


Thanks  Regards,
Ravi Kora
337-739-3434(M) 


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




Iterating multiple collections using logic:iterate- Is it possible with Struts?

2002-07-16 Thread Ravi Kora

Did anyone come across the problem of iterating over multiple collection
objects in logic:iterate? The tag works fine if we have a single
collection. But I am not getting it to work with multiple collections. I
want to know if anyone has done the above using the logic:iterate tags? 
-Ravi

Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 15, 2002 3:14 PM
To: Struts Users Mailing List
Subject: RE: Html:checkbox issue


Try this...


HTML
HEAD
TITLE/TITLE
/HEAD
BODY

form name=myForm method=post action=/myapp/doAction.do INPUT
type=checkbox name=checkbox1check 1br INPUT type=checkbox
name=checkbox2check 2br INPUT type=checkbox name=checkbox3check
3br INPUT type=checkbox name=checkbox4check 4br INPUT
type=checkbox name=checkbox5check 5br INPUT type=checkbox
name=checkbox6check 6br

/form
SCRIPT LANGUAGE=javascript
!--
function SetChecked(val) {
dml=document.forms[myForm];
len = dml.elements.length;
var i=0;
for( i = 0 ; i  len ; i++) {
if (dml.elements[i].type=='checkbox') {
if ( val == 'off' ){
dml.elements[i].checked=false;
}else if ( val == 'invert' ) {
dml.elements[i].checked =
(!dml.elements[i].checked);
}else{
dml.elements[i].checked=true;
}
}
}
}

//--
/SCRIPT

Pnbsp;/P
a href=javascript:SetChecked('on')Check All/a/
a href=javascript:SetChecked('off')Clear All/a/
a href=javascript:SetChecked('invert')Invert/a

/BODY
/HTML

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




 -Original Message-
 From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 15, 2002 9:44 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Html:checkbox issue


 This is just a shot in the dark, but could you specify the onclick 
 attribute of the checkbox to run some javascript?  When clicked, you 
 could swap the checkbox properties back and forth between checked and 
 not checked.  Does anyone else think something like this would work 
 well?  It's just an idea...

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



 -Original Message-
 From: Toni Nehme [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 15, 2002 9:36 AM
 To: [EMAIL PROTECTED]
 Subject: Html:checkbox issue



 Hi All,


 I have checkbox displayed in a table and I am trying to create a a 
 checkbox outside the table to check All the checkboxes inside the 
 table.

 My table is using the logic:iterate tag and displays the table.

 Please, let me know if anybody knows how to solve this.


 Thanks.

 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

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



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


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




Iterating multiple collections using logic:iterate tag

2002-07-15 Thread Ravi Kora

Hi,

Can someone help me to iterate over multiple collections using
logic:iterate tags. It is taking as nested loop if I place the the tag
one after the other.

Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 


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




How do we calculate session size?

2002-07-12 Thread Ravi Kora

Hi all,
I want to know what are the objects that come into consideration while
calculating the session size. Is it only the session objects(or session
attributes) which have to be considered for calculating session size? If
there are some other things plz lemme know.

I know I am being very dumb here but ..!


Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 12, 2002 5:47 AM
To: 'Struts Users Mailing List'
Subject: RE: Problem with session ojects: memory size, updates 


Hi,

Your English is a hell of a lot better than my French...Your question is
one that comes up a lot on the list try a search at:

http://www.mail-archive.com/struts-user@jakarta.apache.org

for 'session size'. One pertinent post is:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg34592.html

In short, the answer to what should go in the session depends on how
your application will be used. If you expect a *very* high number of
concurrent users your session should be under 4k (taken from iAS,
WebLogic and WebSphere docs, white papers etc). 

It will also depend on your hardware, how much RAM is available, network
bandwidth, database size/speed etc. If you can predict the highest level
of concurrent users, multiple your maximum session size by this. The
result will be the amount of RAM taken up by all the sessions put
together, if you have sufficient RAM to handle this and all over
requirements, then the session size is not an issue.  Note however that
the number of users can explode unexpectedly, so the best practice
recommendation is to keep session size as small as possible. 

As for the speed of looking up objects from the session, this will
depend on your app server, when clustering some app servers will store
the session in a db or other persistent store, lookups in this case are
relatively expensive. If you are not clustering, I wouldn't worry about
the speed of the lookup (even if you are I wouldn't worry about it that
much - its not a bottle neck I've ever come across.)

Jon Ridgway


-Original Message-
From: Heligon Sandra [mailto:[EMAIL PROTECTED]] 
Sent: 11 July 2002 15:12
To: '[EMAIL PROTECTED]'
Subject: Problem with session ojects: memory size, updates 


Sorry, my english level isn't very good.

I read that the Struts framework doesn't make (oblige) 
to use one particular model implementation (EJB, JavaDataObject,
JavaBean, ...).
But the JavaBean solution is understood or greatly recommended,
isn't it ?
Because struts uses JSP to display data and JSP pages use
JavaBean tags.
If  we work whit XML representations of  remote business
objects, is it better to
use struts XSL tags rather than generate JavaBean from the XML
description ?
The XSL solution requires to know XSL tags and  is slower and
more complex.
With JavaBean solution I am frightened having memory or request
time
problem.
The user does a request, the selected Action gets business data
from the
enterprise tier, generates one or several JavaBean instances and
stores the JavaBean 
in the HttpSession. 
But the HttpSession size will grow quickly.
It is difficult to know when we have to store data in request
scope or session scope.
Has somebody advices about this dilemma? 
I am tending to put data systematically in HttpSession in order
to reduce network traffic if the user
ask again this page.
What is the max size of the session objects ? 
If we user rights on the business objects, we will have the same
JavaBean in several HttpSessions.
What do you think about this problem ? 

A last question if we have numerous session objects, when we
will have to update one
of them it will be very slow to find it in the list.
Do you have advices about that ?
Is the JavaBean/HttpSession solution realistic with real-time
data?

Thanks a lot in advance. 

 


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


The contents of this email are intended only for the named addressees
and may contain confidential and/or privileged material. If received in
error please contact UPCO on +44 (0) 113 201 0600 and then delete the
entire e-mail from your system. Unauthorised review, distribution,
disclosure or other use of this information could constitute a breach of
confidence. Your co-operation in this matter is greatly appreciated. 

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


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




logic:empty and logic:notEmpty tags

2002-07-12 Thread Ravi Kora

I am using logic:empty tags in my application and it throws an error
saying that the taglib doesn't support that tag. I am using Struts
1.0.2. 
Can anyone tell me if Struts 1.0.2 supports the logic:empty and
logic:notEmpty tags? If it des not, how to go about?

I would really appreciate if someone responds!

Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 



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




Problem with html:link and html:img

2002-07-08 Thread Ravi Kora

Hi,
I have a page where I want to combine my html:link and html:img tags. In
regular html, it would be something like this. 
a href=dummy.htmlimg src=submit.gif /a 

I want to write the same thing using struts tags.On clicking the image,
I want to invoke a JavaScript function which eventually submits the
form. So, I wrote my code like this. html:link onClick=func() 
html:img src=submit.gif / 
/html:link

This code does not work.I am using Struts 1.0.2. Can someone please help
me with this?


Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]


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


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




RE: Problem with html:link and html:img

2002-07-08 Thread Ravi Kora

Yes, that is what I have tried. But it doesn't seem to work.

Regards,
Ravi Kora

-Original Message-
From: Nina-Annick Stranzenbach [mailto:[EMAIL PROTECTED]]

Sent: Monday, July 08, 2002 9:44 AM
To: 'Struts Users Mailing List'
Subject: Re: Problem with html:link and html:img


have you tried  html:link onclick=func() 
html:img src=submit.gif / 
/html:link ?


On Mon, 2002-07-08 at 16:08, Ravi Kora wrote:
 Hi,
 I have a page where I want to combine my html:link and html:img tags. 
 In regular html, it would be something like this. a 
 href=dummy.htmlimg src=submit.gif /a
 
 I want to write the same thing using struts tags.On clicking the 
 image, I want to invoke a JavaScript function which eventually submits

 the form. So, I wrote my code like this. html:link onClick=func() 

 html:img src=submit.gif / /html:link
 
 This code does not work.I am using Struts 1.0.2. Can someone please 
 help me with this?
 
 
 Thanks  Regards,
 Ravi Kora
 [EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail: 
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 



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


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




html:link and html:img combination

2002-07-06 Thread Ravi Kora

Hi,
I have a page where I want to combine my html:link and html:img tags. In
regular html, it would be something like this.
a href=dummy.htmlimg src=submit.gif /a 

I want to write the same thing using struts tags.On clicking the image,
I want to invoke a JavaScript function.So, I wrote my code like this.
html:link onClick=func() 
html:img src=submit.gif / 
/html:link

This code does not work.I am using Struts 1.0.2. Can someone please help
me with this?


Thanks  Regards,
Ravi Kora
[EMAIL PROTECTED]


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