use html:link pass two param

2003-10-31 Thread javen fang
I have a bean list that have two property id / name

code:
--

html:link action=next.do paramId=first
paramName=list paramProperty=id next action
/html:link

--


And how can I pass the second parameter name after the
action next.do??
Thanks.



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

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



Re: [OT]How can i reply to the thread ???

2003-10-31 Thread struts
Your email client should prompt or have an option to use Reply-To  
instead of From address.

If not, just before you send it substitute 
[EMAIL PROTECTED] for the To address.

Oscar

On Fri, 31 Oct 2003, Looser wrote:

 Hi,
 
 sorry by this OT post, but i need to know how to reply to another reply 
 in a thread. When i open an message, there´s  just one button 'reply via 
 email to xxx'. When i use this button, my answer is obviously send to 
 the author, but not to the mailing-list. How do i achieve this ???
 
 Thanx for your answer...
 
 
 -
 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: Iterating List of Lists

2003-10-31 Thread javen fang
Where is member tag from???

Your own taglib?

--- Choopong C. [EMAIL PROTECTED] wrote:
 Try like this
 
 table
 logic:iterate id=organization
 name=organizations
   member
   trtd
   bean:write name=organization
 property=title/
   logic:iterate id=item name=organization
 property=items
   member
   br/-bean:write name=item
 property=title/
   /member
   /logic:iterate
 
   /td/tr
   /member
 /logic:iterate
 /table
 
 
 From: Chris Gastin [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List
 [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Subject: Iterating List of Lists
 Date: Thu, 30 Oct 2003 21:55:53 -0600
 
 I have List of Lists of DataObjects. I want to
 iterate through that List of
 Lists to get access to the Data Object, where I
 will print the values of 
 the
 attributes on the data object. I have the outer
 loop working, but I don't
 understand how to get the Data out of the list in
 the inner loop.
 
 This is my latest attempt:
 
 logic:iterate id=list name=di3List
 scope=request
  logic:iterate id=data
 collection=list
  libean:write
 name=data property=word/ -
 bean:write name=data
 property=definition//li
  /logic:iterate
 /logic:iterate
 
 

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

_
 Protect your PC - get McAfee.com VirusScan Online 

http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
 
 

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


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

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



Re: Hidden Field

2003-10-31 Thread Manish Singla
You may use
html:hidden property=keyValue value=%= username%/

just a note:
you may use .
bean:parameter id=username name=REMOTE_USER value=null/
instead of
request.getRemoteUser();

Manish Singla


Caroline Jen wrote:

 html:hidden property=dispatch value=author/
 works well because author is expected literally as
 the value of a property called dispatch.

 I also want to pass
 String username = request.getRemoteUser();
 as the value of a property called keyValue.

 But,
 html:hidden property=keyValue value=username/
 or
 html:hidden property=keyValue value=username/

 gives me problems.  What is the proper way of doing it?

 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product search
 http://shopping.yahoo.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: declaring action mappings at runtime

2003-10-31 Thread Ahmet ISIK
Kirk, thanks for the advice,
yes, you're right I think. I'm going to change it that way in the first 
refactoring time available.

Kirk Wylie wrote:
I know this is a little OT, but had you thought about doing it with 
xdoclet? Particularly if the Hibernate configurations are coming out of 
xdoclet in the first place (and everything's set at compile time), you 
could probably extend the Hibernate templates pretty easily to generate 
the action mappings automatically. Then you'd have everything based on 
Hibernate, done dynamically, and a faster startup time as well.

Just an idea.

Kirk Wylie
M7 Corporation
Ahmet ISIK wrote:

I'm doing it in a plugin.
My purpose is to develop generic CRUD operations, views and forms for
any model object that is persisted using Hibernate. For this, I
introspect Hibernate config and provide form fields according to
underlying object's properties.
I'm declaring actionmappings at runtime because I'm asking Hibernate for
a list of entities that are declared.
Martin Cooper wrote:
  Ahmet ISIK [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
 thanks Martin,
 I have found a solution. I have acquired module config by
 Globals.MODULE_KEY key from app context. Then I added programmatically
 configured ActionMappings to module config object. after that it is
 possible to use those action mappings. Is this a bad practice?
 
 
  Where are you doing this? (And why?)
 
  If you're doing it in a plug-in, then I believe it will work, but I 
don't
  see how that would be any more dynamic than adding them to your 
Struts
  config file. (Also in that case, you are already passed the module 
config,
  so you wouldn't need to look it up, as you mentioned you are doing.)
 
  If you're doing it outside of a plug-in, then I'm puzzled. Once 
Struts loads
  the config, it freezes it and throws IllegalStateException if you 
attempt to
  modify it.
 
  --
  Martin Cooper
 
 
 
 Martin Cooper wrote:
 
 Ahmet ISIK [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
 
 Hi,
 Is it possible to declare struts action mappings at runtime, and 
how?
 
 
 No, it's not possible. The config is read in at application 
startup and
 
  is
 
 then frozen. (The reason it's done this way is so that access to the
 
  config
 
 does not need to be synchronised once the app is up and running, thus
 leading to much improved overall performance.)
 
 --
 Martin Cooper
 
 
 
 
 Thanks in advance
 
 --
 Ahmet ISIK
 Ideal Teknoloji Bilisim zmleri A.S.- Iliskisel Is Kanali
 Yazilim Muhendisi
 http://www.idealteknoloji.com
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 Ahmet ISIK
 Ideal Teknoloji Bilisim zmleri A.S.- Iliskisel Is Kanali
 Yazilim Muhendisi
 [EMAIL PROTECTED]
 http://www.idealteknoloji.com
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

--
Ahmet ISIK
Ideal Teknoloji Bilisim zmleri A.S.- Iliskisel Is Kanali
Yazilim Muhendisi
[EMAIL PROTECTED]
http://www.idealteknoloji.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]



--
Ahmet ISIK
Ideal Teknoloji Bilisim zmleri A.S.- Iliskisel Is Kanali
Yazilim Muhendisi
[EMAIL PROTECTED]
http://www.idealteknoloji.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Doing an action and get back to executing page?

2003-10-31 Thread Frers Michael
hello
thx for reply

as far as i understood you mean i should create for each jsp an extra action
mapping entry in the struts config
and then doing a
mapping.getInputForward()

in the action class

only problem is that i have about 100+ jsp sites which can call this specifc
Action



Michael


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 5:47 PM
Subject: RE: Doing an action and get back to executing page?



 instead define the two action mapping to the same action class with input
from both the jsp's and returning the both of them and then well u have the
two different flows.
 -Original Message-
 From: Frers Michael [mailto:[EMAIL PROTECTED]
 Sent: 30 October 2003 16:41
 To: Struts Users Mailing List
 Subject: Doing an action and get back to executing page?


 Hello

 is there anyway to get back to the side which called an action?

 here more specific example

 i have 2 jsp sides: a.jsp and b.jsp

 from both i can call a strutsaction  dosomething.do

 after executing i want to get back to a or to b (depending who called the
side)

 i think best solution would be adding a hidden field telling the action
who was the caller
 (with probably much handling of beans from request etc)

 any other (better) ideas?

 thx in advance

 Michael

 Visit our website at http://www.ubs.com

 This message contains confidential information and is intended only
 for the individual named.  If you are not the named addressee you
 should not disseminate, distribute or copy this e-mail.  Please
 notify the sender immediately by e-mail if you have received this
 e-mail by mistake and delete this e-mail from your system.

 E-mail transmission cannot be guaranteed to be secure or error-free
 as information could be intercepted, corrupted, lost, destroyed,
 arrive late or incomplete, or contain viruses.  The sender therefore
 does not accept liability for any errors or omissions in the contents
 of this message which arise as a result of e-mail transmission.  If
 verification is required please request a hard-copy version.  This
 message is provided for informational purposes and should not be
 construed as a solicitation or offer to buy or sell any securities or
 related financial instruments.




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



RE: Workaround for IE streamer bug?

2003-10-31 Thread Bjørn T Johansen
Ok, now I have tried adding a dummy=.pdf on the url, but it still tells
me that it is downloading a file of Filetype = Adobe Acrobat Control for
ActiveX and ask me to open og save file. If I then choose open, IE
always ask me which application to use, even if it just told me that the
filetype was acrobat!??


BTJ

On Thu, 2003-10-30 at 19:41, Prabhat Kumar (IT) wrote:
 JavaScript?
 
 -Original Message-
 From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 30, 2003 1:36 PM
 To: Struts Users Mailing List
 Subject: RE: Workaround for IE streamer bug?
 
 
 Oki, that sounds like an idea :)
 But how do I add a querystring to my url when submitting a form?
 
 BTJ
 
 On Thu, 2003-10-30 at 19:05, Prabhat Kumar (IT) wrote:
  I guess this is a known problem with IE. I can't remember but I think we had the 
  same problem with IE, and we came across a suggestion somewhere to end the pdf 
  requesting URL with a .pdf (something like 
  http://servername/xyz/something.do?your-param=xyzdummy=.pdf) 
  
  
  -Original Message-
  From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 30, 2003 12:59 PM
  To: Struts Users Mailing List
  Subject: Re: Workaround for IE streamer bug?
  
  
  Well, I have tried both inline and attachment, the only difference is
  that when using attachment I get question of where to save the file on
  all the other browsers instead of just opening (as expected), and IE
  still doesn't work. In fact, using attachment is worse for IE...
  
  Any more suggestions are appreciated...
  
  BTJ
  
  On Thu, 2003-10-30 at 15:19, [EMAIL PROTECTED] wrote:
   This header currently works for me in a similar case. Try changing your 
   code:
   
   response.setHeader(Content-Disposition, attachment; filename=\ + 
   filename + \);
   
   HTH.

   Atenciosamente,
   Bruno Arantes de Andrade Bueno
   Webdeveloper Pleno
   
   Fone: +55 (34) 3231-1073
   Solution WEB - Soluções Para Internet!
   www.solutionweb.com.br
   
   
   
   
   
   Bjørn T Johansen [EMAIL PROTECTED]
   10/30/2003 07:05 AM
   Please respond to Struts Users Mailing List
   

   To: Struts Users Mailing List [EMAIL PROTECTED]
   cc: 
   Subject:Workaround for IE streamer bug?
   
   
   I have a little problem. I am using the following code to stream pdf
   files to the browser..:
   
   fis = new FileInputStream(filename);
 byte[] buf = new byte[fis.available()];
   
 response.setHeader(Content-Disposition, inline;filename= +
   filename + ;);
 response.setContentType(application/pdf);
 response.setHeader(Connection, keep-alive);
 response.setContentLength(buf.length);
 response.getOutputStream().write(buf,0,fis.read(buf));
 response.getOutputStream().flush();
 response.getOutputStream().close();
 fis.close();
   
   This works ok in all browsers except for IE. When using IE, a dialog box
   asking the user for which application to open the file in, is always
   displayed. Why? And is there a workaround for this?
   
   
   Thanks...
   
   BTJ
   
   
   -
   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: Iterating List of Lists

2003-10-31 Thread Choopong C.
No matter what, just a sign for our debugging in Browser.


From: javen fang [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Iterating List of Lists
Date: Thu, 30 Oct 2003 23:03:35 -0800 (PST)
Where is member tag from???

Your own taglib?

--- Choopong C. [EMAIL PROTECTED] wrote:
 Try like this

 table
 logic:iterate id=organization
 name=organizations
member
trtd
bean:write name=organization
 property=title/
logic:iterate id=item name=organization
 property=items
member
br/-bean:write name=item
 property=title/
/member
/logic:iterate

/td/tr
/member
 /logic:iterate
 /table


 From: Chris Gastin [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List
 [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Subject: Iterating List of Lists
 Date: Thu, 30 Oct 2003 21:55:53 -0600
 
 I have List of Lists of DataObjects. I want to
 iterate through that List of
 Lists to get access to the Data Object, where I
 will print the values of
 the
 attributes on the data object. I have the outer
 loop working, but I don't
 understand how to get the Data out of the list in
 the inner loop.
 
 This is my latest attempt:
 
 logic:iterate id=list name=di3List
 scope=request
  logic:iterate id=data
 collection=list
  libean:write
 name=data property=word/ -
 bean:write name=data
 property=definition//li
  /logic:iterate
 /logic:iterate
 
 

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


_
 Protect your PC - get McAfee.com VirusScan Online

http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


euro date

2003-10-31 Thread dutrieux






I declare in struts-config.xml a DynaActionForm class with a property
"euroDate" of class java.sql.date.

I register on the ConvertUtils instance a new convert class for the the
class "java.sql.Date" to support the european date (dd.mm.). That
work very fine.

But now my problem is that I would like display in the html:text
property="euroDate" the date : not in usa date (-mm-dd) but in
euro date (dd.mm.).

Does any body know a solution.

Best regards

-- 



Institut Pasteur






  

  
  Olivier Dutrieux
   
  
  Institut Pasteur 
Informatique de gestion

Micro-Informatique 
  25-28 rue du Docteur Roux 
75724 PARIS CEDEX 15 
  
   Tel: +33 (0) 1 40 61 31 62 
Fax: +33 (0) 1 45 68 89 89 
  

  







inline: Institut Pasteur

tiles and margins

2003-10-31 Thread koen boutsen
hi
I'm using tiles for my application. I don't work with definitions, but with layout.jsp 
pages :

BODY marginheight=0 marginwidth=0 
table border=0 cellpadding=0 cellspacing=0 width=100%

tr bgcolor=cyan
!-- banner --
td height=70 valign=toptiles:insert attribute=header //td
/tr
tr bgcolor=yellow!-- body --
td width=100% height=668tiles:insert attribute=body //td
/tr
/table
/BODY

I want my header in a certain color and my body in another color, with no margins 
around them. If I use the code above, I get these margins, even if I use marginheight 
= 0.

I tried to give the body tag from the header.jsp and body.jsp a bgcolor, but then my 
whole page takes the first color that is found.

If I don't explained it clearly, don't hesitate to mail me, because I'm really stuck 
on this one.

Thanks

Koen Boutsen
[EMAIL PROTECTED]



FREE ADHD DVD or CD-Rom (your choice) - click here!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
AOL users go here: 
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
This offer applies to U.S. Residents Only

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



problem with chained actions in IE it work while Mozilla(Firebird) shows 404 (the context path gets lost)

2003-10-31 Thread Martin Grüneberg
Hello togehter,

in my application I have a series of chained Actions defined like this:

action
path=/setupModifyData

type=activegroup.hdb.struts.action.LockDatasetAction
scope=request
name=insertDataForm
validate=false
forward name=Success path=/preloadData.do /
/action
action
path=/preloadData

type=activegroup.hdb.struts.action.ModifyPreloadAction
scope=request
name=insertDataForm
validate=false
forward name=Success path=/jsp/modifyData.jsp
/
forward name=Failure path=/unlockDataset.do /
forward name=View_Only path=/jsp/viewData.jsp
/
/action
action
path=/modifyData

type=activegroup.hdb.struts.action.ModifyDataAction
scope=request
name=insertDataForm
validate=true
input=/jsp/modifyData.jsp
forward name=Success path=/unlockDataset.do /
forward name=Failure path=/unlockDataset.do /
/action
action
path=/unlockDataset

type=activegroup.hdb.struts.action.UnlockDatasetAction
scope=request
name=insertDataForm
validate=true
input=/jsp/modifyData.jsp
forward name=Success
path=/jsp/closeAndReload.jsp /
/action
When I call (by click on a link) the /setupModifyData.do action in IE the
dataset is locked and the appcontext/jsp/modifyData.jsp showes up. When I
click on the same link in Mozilla(Firebird) a 404 Error is shown because the
appcontext gets lost somewhere and the resource /jsp/modifyData.jsp could
not be found.

Why does this happen?
Martin Grüneberg



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



struts source (newbie)

2003-10-31 Thread J P
Hello,
Pardon me, but Struts by nature is configurable / extendable and therefore 
editable? One would quite frequently like to get into the source of the .javas? I have 
downloaded and installed 1.1 but can see nothing but classes, JARs and WARs. I for 
expample want to configure the ActionServlet, but cannot becasue I cannot find the 
.java! I have unpacked the JARs and WARs but the source is thus far elusive. In the 
struts-blank app for example, all classes and config files are present, but what of 
the source? Is it not included in the distribution or is it separate?
 
Regards
 
Eager 2 Start. 


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

validate method

2003-10-31 Thread Khandelwal, Rahul
Hi All,

For some reason, I have to do some form field validation in my Action class.
And, if the validation fails, I have to return the control to the
same(input) page to display the error msg (using html:errors/). I have
previously done it in the validate method in the Form bean, but don't know
how to put the validation in the Action class.

Any help will be much appreciated.

Thanks,
Rahul
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.

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



Re: euro date

2003-10-31 Thread Mark Lowe
Just define the form property as a string

form-property name=date type=java.lang.String /

when you get the date from you model either format it in your referring 
class, using DateFormat.

java.util.Date date = new java.util.Date( dateString );

now you can format and then feed it back to the form.

Cheers Mark

On Friday, October 31, 2003, at 10:09 AM, dutrieux wrote:





I declare in struts-config.xml a DynaActionForm class with a property 
euroDate of class java.sql.date.

I register on the ConvertUtils instance a new convert class for the 
the class java.sql.Date to support the european date (dd.mm.). 
That work very fine.

But now my problem is that I would like display in the html:text 
property=euroDate the date : not in usa date (-mm-dd) but in 
euro date (dd.mm.).

Does any body know a solution.

Best regards

--



Institut Pasteur

BODY { MARGIN-TOP: 1em; FONT-SIZE: 12pt; MARGIN-LEFT: 1em; COLOR: 
#003399; FONT-FAMILY: Trebuchet MS }

image.tiff

image.tiff

image.tiff
Institut Pasteur


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


Re: Connection pool and MessageRessources

2003-10-31 Thread Ovidiu EFTIMIE
Hi James,
I've studied your solution, and I've noticed that you use a different connection
to the database and not the one that should be availble in an struts
application, and I think that could be a point of failure. That is why I'm
trying tu use the same connection pool as the rest of the application.

Ovidiu

- Original Message - 
From: James Mitchell [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 7:18 PM
Subject: RE: Connection pool and MessageRessources


 Hi Ovidiu

 I also wrote my own DBMessageResources.  With a simple hack, I was able
 to overcome the limitations of the existing API.

 The source code and example are available for download at:


 http://sourceforge.net/project/showfiles.php?group_id=49385release_id=1
 54972



 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx




  -Original Message-
  From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 30, 2003 1:07 PM
  To: [EMAIL PROTECTED]
  Subject: Connection pool and MessageRessources
 
 
  Hi,
  I'm working with Struts 1.1 and I have a problem with the
  MessageRessource and I
  don't know to handle it  the right way.
  In my application I have two constraints,among others :) ,
  - i must use an oci connection to the database
  - the error messages will be stored in the database
  For that I took two aproaches :
  ## One ##:  I have written a Struts plugin which builds the
  connection pool, and
  I've extended MessageRessourceFactory and MessageRessources
  with my own classes
  DBRessourceFactory and DBRessource to have my own mechanism
  for message
  retrivial. My problem is now how can I get a connection to
  the database from the
  connection pool I've just made ? Is there a way to
  communicate between my plugin
  and my DBRessource class ?
 
 
  ## Two ##: I make a class which will handle the connection
  pool creation and the
  retrivial of messages from the database.
  It will look like this :
  public class MessagesDBPool extends MessageRessources implements
  PlugIn,Serializable {
  public MessageDBPool (){
  super();
  }
  public MessageDBPool(MessageRessourcesFactory
  factory,String config){
  this(factory,config,false);
  }
  public MessageDBPool(MessageRessourcesFactory
  factory,String config,boolean
  returnNull){
  super(factory,config,returnNull);
  }
  public void init(ActionServlet servlet, ModuleConfig
  config) throws
  ServletException{
  //pool initialisation here
  }
  public void destroy(){
  //destroy pool here
  }
  }
  Can I do this in the first place ?
 
  Now the question is which one of this two solutions can work?
  Is there another
  way to do this ?
  Any suggestions are welcome .
 
  Thanks,
  Ovidiu EFTIMIE
 
 
 
 
  -
  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 source (newbie)

2003-10-31 Thread koen boutsen
you can download the source from the jakarta site
--

- Original Message -

DATE: Fri, 31 Oct 2003 02:15:03
From: J P [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: 

Hello,
Pardon me, but Struts by nature is configurable / extendable and therefore 
 editable? One would quite frequently like to get into the source of the .javas? I 
 have downloaded and installed 1.1 but can see nothing but classes, JARs and WARs. I 
 for expample want to configure the ActionServlet, but cannot becasue I cannot find 
 the .java! I have unpacked the JARs and WARs but the source is thus far elusive. In 
 the struts-blank app for example, all classes and config files are present, but what 
 of the source? Is it not included in the distribution or is it separate?
 
Regards
 
Eager 2 Start. 


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears




FREE ADHD DVD or CD-Rom (your choice) - click here!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
AOL users go here: 
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
This offer applies to U.S. Residents Only

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



AW: problem with chained actions in IE it work while Mozilla(Firebird) shows 404 (the context path gets lost) (SOLVED)

2003-10-31 Thread Martin Grüneberg
Solved, it was only a Browser caching problem

 -Ursprüngliche Nachricht-
 Von: Martin Grüneberg [mailto:[EMAIL PROTECTED] 
 Gesendet: Freitag, 31. Oktober 2003 11:10
 An: [EMAIL PROTECTED]
 Betreff: problem with chained actions in IE it work while 
 Mozilla(Firebird) shows 404 (the context path gets lost)
 
 
 Hello togehter,
 
 in my application I have a series of chained Actions defined 
 like this:
 
   action
   path=/setupModifyData
   
 type=activegroup.hdb.struts.action.LockDatasetAction
   scope=request
   name=insertDataForm
   validate=false
   forward name=Success 
 path=/preloadData.do /
   /action
   action
   path=/preloadData
   
 type=activegroup.hdb.struts.action.ModifyPreloadAction
   scope=request
   name=insertDataForm
   validate=false
   forward name=Success 
 path=/jsp/modifyData.jsp
 /
   forward name=Failure 
 path=/unlockDataset.do /
   forward name=View_Only 
 path=/jsp/viewData.jsp
 /
   /action
   action
   path=/modifyData
   
 type=activegroup.hdb.struts.action.ModifyDataAction
   scope=request
   name=insertDataForm
   validate=true
   input=/jsp/modifyData.jsp
   forward name=Success 
 path=/unlockDataset.do /
   forward name=Failure 
 path=/unlockDataset.do /
   /action
   action
   path=/unlockDataset
   
 type=activegroup.hdb.struts.action.UnlockDatasetAction
   scope=request
   name=insertDataForm
   validate=true
   input=/jsp/modifyData.jsp
   forward name=Success
 path=/jsp/closeAndReload.jsp /
   /action
 When I call (by click on a link) the /setupModifyData.do 
 action in IE the dataset is locked and the 
 appcontext/jsp/modifyData.jsp showes up. When I click on 
 the same link in Mozilla(Firebird) a 404 Error is shown 
 because the appcontext gets lost somewhere and the resource 
 /jsp/modifyData.jsp could not be found.
 
 Why does this happen?
 Martin Grüneberg
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



RE: tiles and margins

2003-10-31 Thread Holman, Cal
Try taking the html and body tags out of the header and body tags.  They should be 
tables  with their own attributes - you can then control the color of the 
independent tables.  That should give you more control.

Cal 

http://www.calandva.com/Last update 08/01/03


-Original Message-
From: koen boutsen [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003 05:10
To: [EMAIL PROTECTED]
Subject: tiles and margins

hi
I'm using tiles for my application. I don't work with definitions, but with layout.jsp 
pages :

BODY marginheight=0 marginwidth=0 
table border=0 cellpadding=0 cellspacing=0 width=100%

tr bgcolor=cyan
!-- banner --
td height=70 valign=toptiles:insert attribute=header //td
/tr
tr bgcolor=yellow!-- body --
td width=100% height=668tiles:insert attribute=body //td
/tr
/table
/BODY

I want my header in a certain color and my body in another color, with no margins 
around them. If I use the code above, I get these margins, even if I use marginheight 
= 0.

I tried to give the body tag from the header.jsp and body.jsp a bgcolor, but then my 
whole page takes the first color that is found.

If I don't explained it clearly, don't hesitate to mail me, because I'm really stuck 
on this one.

Thanks

Koen Boutsen
[EMAIL PROTECTED]



FREE ADHD DVD or CD-Rom (your choice) - click here!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
AOL users go here: 
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
This offer applies to U.S. Residents Only

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

  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



RE: tiles configuration

2003-10-31 Thread Holman, Cal
You cannot use a tiles definition as a URL so you need to use actions.  But if you use 
ForwardAction you get away with having a template and the tiles jsps - like your 
second example.

Cal

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 14:15
To: [EMAIL PROTECTED]
Subject: tiles configuration

Hi y'all,

I just started using struts and I have some questions on tiles.

In my definitions file, I have a definition called tiles.index for my main page.

In index.jsp, I do an insert:
tiles:insert definition=tiles.index flush=true /

Is there anyway for me to avoid creating the index.jsp? 

I know you can forward to a tiles definition in the struts config like so:
action   
path=/login
type=my login action
name=loginForm
scope=session
input=tiles.login
forward name=success redirect=true path=tiles.index /
/action

or

action
path=/index
type=org.apache.struts.actions.ForwardAction
parameter=tiles.index/

Is there a way for struts to recognize that a url like http://mysite.com/main; should 
use the definition or do I have to create a jsp file for all my pages?

Roy.

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

  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



Re: Connection pool and MessageRessources

2003-10-31 Thread Ovidiu EFTIMIE
I think I've found a solution.
I'll make an object (eventualy a struts PlugIn), DBMessage which receivies a
connection from my connection pool and retrives the error messages from the
database, and this object will not extend MessageRessources.
Then in my actions I'll have :

DbMessage dbmesg = (DbMessage)servlet.getAttribute(DBMESG);
String  message = dbmesg.getMessage(error_code);
ActionErrors errors = new ActionError();
errors.add(code,new ActionError(foo,message));

where foo is defined in my application.properties as
foo = {0}

How that sounds ?


Ovidiu

- Original Message - 
From: James Mitchell [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 7:18 PM
Subject: RE: Connection pool and MessageRessources


 Hi Ovidiu

 I also wrote my own DBMessageResources.  With a simple hack, I was able
 to overcome the limitations of the existing API.

 The source code and example are available for download at:


 http://sourceforge.net/project/showfiles.php?group_id=49385release_id=1
 54972



 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx




  -Original Message-
  From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 30, 2003 1:07 PM
  To: [EMAIL PROTECTED]
  Subject: Connection pool and MessageRessources
 
 
  Hi,
  I'm working with Struts 1.1 and I have a problem with the
  MessageRessource and I
  don't know to handle it  the right way.
  In my application I have two constraints,among others :) ,
  - i must use an oci connection to the database
  - the error messages will be stored in the database
  For that I took two aproaches :
  ## One ##:  I have written a Struts plugin which builds the
  connection pool, and
  I've extended MessageRessourceFactory and MessageRessources
  with my own classes
  DBRessourceFactory and DBRessource to have my own mechanism
  for message
  retrivial. My problem is now how can I get a connection to
  the database from the
  connection pool I've just made ? Is there a way to
  communicate between my plugin
  and my DBRessource class ?
 
 
  ## Two ##: I make a class which will handle the connection
  pool creation and the
  retrivial of messages from the database.
  It will look like this :
  public class MessagesDBPool extends MessageRessources implements
  PlugIn,Serializable {
  public MessageDBPool (){
  super();
  }
  public MessageDBPool(MessageRessourcesFactory
  factory,String config){
  this(factory,config,false);
  }
  public MessageDBPool(MessageRessourcesFactory
  factory,String config,boolean
  returnNull){
  super(factory,config,returnNull);
  }
  public void init(ActionServlet servlet, ModuleConfig
  config) throws
  ServletException{
  //pool initialisation here
  }
  public void destroy(){
  //destroy pool here
  }
  }
  Can I do this in the first place ?
 
  Now the question is which one of this two solutions can work?
  Is there another
  way to do this ?
  Any suggestions are welcome .
 
  Thanks,
  Ovidiu EFTIMIE
 
 
 
 
  -
  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: tiles and margins

2003-10-31 Thread khote
use a stylesheet.  You can declare it in your tiles definition and discover
it in your jsp
You can have style tags in the head, or use a linked stylesheet -- you
can declare that in a definition, if you use a controller you can
dynamically set it.
set:

body {
  padding: 0px;
  margin: 0px;
}

use inline styles in your tables and td's

- Original Message - 
From: koen boutsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 2:10 AM
Subject: tiles and margins


 hi
 I'm using tiles for my application. I don't work with definitions, but
with layout.jsp pages :

 BODY marginheight=0 marginwidth=0 
 table border=0 cellpadding=0 cellspacing=0 width=100%

 tr bgcolor=cyan
 !-- banner --
 td height=70 valign=toptiles:insert attribute=header //td
 /tr
 tr bgcolor=yellow!-- body --
 td width=100% height=668tiles:insert attribute=body //td
 /tr
 /table
 /BODY

 I want my header in a certain color and my body in another color, with no
margins around them. If I use the code above, I get these margins, even if I
use marginheight = 0.

 I tried to give the body tag from the header.jsp and body.jsp a bgcolor,
but then my whole page takes the first color that is found.

 If I don't explained it clearly, don't hesitate to mail me, because I'm
really stuck on this one.

 Thanks

 Koen Boutsen
 [EMAIL PROTECTED]


 
 FREE ADHD DVD or CD-Rom (your choice) - click here!

http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
 AOL users go here:
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
 This offer applies to U.S. Residents Only

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



Own parameters in an action forward

2003-10-31 Thread Zorn, Otto
Hi,

I'm very new in struts and I have a little problem:

How can I add own 'key - value - pairs' (parameters) inside an
action-class to an action-forward?

Hope someone can help me.
Otto

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



Re: euro date

2003-10-31 Thread Vic Cekvenich
Or you could use formBeans, one of more befits for update.

HOWEVER   you said display the date (not update), so no need for a 
formBean either.
You should localize when ever posible using JSTL fmt tag for dates and 
other things.

Mark Lowe wrote:
Just define the form property as a string

form-property name=date type=java.lang.String /

when you get the date from you model either format it in your referring 
class, using DateFormat.

java.util.Date date = new java.util.Date( dateString );

now you can format and then feed it back to the form.

Cheers Mark

On Friday, October 31, 2003, at 10:09 AM, dutrieux wrote:





I declare in struts-config.xml a DynaActionForm class with a property 
euroDate of class java.sql.date.

I register on the ConvertUtils instance a new convert class for the 
the class java.sql.Date to support the european date (dd.mm.). 
That work very fine.

But now my problem is that I would like display in the html:text 
property=euroDate the date : not in usa date (-mm-dd) but in 
euro date (dd.mm.).

Does any body know a solution.

Best regards

--



Institut Pasteur

BODY { MARGIN-TOP: 1em; FONT-SIZE: 12pt; MARGIN-LEFT: 1em; COLOR: 
#003399; FONT-FAMILY: Trebuchet MS }

image.tiff


image.tiff


image.tiff

Institut Pasteur
--
Victor Cekvenich,
Struts Instructor
(215) 321-9146
Advanced Struts Training
http://basebeans.com/do/cmsPg?content=TRAINING Server Side Java
training with Rich UI, mentoring, designs, samples and project recovery
in North East.
Simple best practice basic Portal, a Struts CMS, Membership, Forums,
Shopping and Credit processing, http://basicportal.com software, ready
to develop/customize; requires a db to run.


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


Re: validate method

2003-10-31 Thread Ben Anderson
   ActionErrors ae = form.validate( mapping, request );
   if( ae.size() != 0 ){
   saveErrors( request, ae );
   return new ActionForward( mapping.getInput() );
   }

From: Khandelwal, Rahul [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: validate method
Date: Fri, 31 Oct 2003 15:47:37 +0530
Hi All,

For some reason, I have to do some form field validation in my Action 
class.
And, if the validation fails, I have to return the control to the
same(input) page to display the error msg (using html:errors/). I have
previously done it in the validate method in the Form bean, but don't know
how to put the validation in the Action class.

Any help will be much appreciated.

Thanks,
Rahul
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to 
this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Surf and talk on the phone at the same time with broadband Internet access. 
Get high-speed for as low as $29.95/month (depending on the local service 
providers in your area).  https://broadband.msn.com

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


html:text

2003-10-31 Thread struts
This is maybe a stupid question but how can i print the user.userName value on screen 
instead of in a text box ?

eg:

html:text property=users.userName size=10 maxlength=10/

i want to do something like : bean:write property=users.userName/ but this is not 
working.

Thanks

Re: html:text

2003-10-31 Thread Marc AMIR-TAHMASSEB
%=users.userName %

struts wrote:

This is maybe a stupid question but how can i print the user.userName value on screen instead of in a text box ?

eg:

html:text property=users.userName size=10 maxlength=10/

i want to do something like : bean:write property=users.userName/ but this is not working.

Thanks
 



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


Re: html:text

2003-10-31 Thread Firat TIRYAKI
you should use the name too
name is the id you define in tags (logic:iterate maybe)
bean:write name=users property=userName/

and also

c:out value=${users.userName} should work

F.



- Original Message - 
From: struts [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 3:18 PM
Subject: html:text


This is maybe a stupid question but how can i print the user.userName value
on screen instead of in a text box ?

eg:

html:text property=users.userName size=10 maxlength=10/

i want to do something like : bean:write property=users.userName/ but
this is not working.

Thanks


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



Re: html:text

2003-10-31 Thread struts
No go , error...

javac] location: class org.apache.jsp.userlevel.pickup_jsp
[javac]   out.print(users.userName );
[javac] ^
[javac] 1 error



- Original Message - 
From: Marc AMIR-TAHMASSEB [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 2:23 PM
Subject: Re: html:text


 %=users.userName %

 struts wrote:

 This is maybe a stupid question but how can i print the user.userName
value on screen instead of in a text box ?
 
 eg:
 
 html:text property=users.userName size=10 maxlength=10/
 
 i want to do something like : bean:write property=users.userName/ but
this is not working.
 
 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: Own parameters in an action forward

2003-10-31 Thread Susan Bradeen

Otto, this is straight out of Struts in Action ... it creates a new
actionforward by appending parameters (in this case dispatch) to the path
of an existing actionforward (in this case article):

ActionForward forward = mapping.findForward(article);

StringBuffer path = new StringBuffer(forward.getPath());
boolean isQuery = (path.indexOf(?)=0);
if (isQuery)
path.append(amp;dispatch=view);
else
path.append(?dispatch=view);
return new ActionForward(path.toString());

HTH,
Susan

On 10/31/2003 07:48:03 AM Zorn, Otto wrote:

 Hi,

 I'm very new in struts and I have a little problem:

 How can I add own 'key - value - pairs' (parameters) inside an
 action-class to an action-forward?

 Hope someone can help me.
 Otto

 -
 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: Please Help!!! A Validation Rule Fail On A Second-Page Causes A Blank Page To Show Up

2003-10-31 Thread Kam Lung Leung
Hi Ted,

Thank you for your time in helping me out. After your email message I 
take a hard look at the jsp file and can not find what was wrong with it.
The secondPage.jsp is almost the same as the firstPage.jsp. When
I move all the code from the secondPage.jsp to the firstPage.jsp the 
validation process went fine. All fields are validated by the validator.
I have given up the hope to create a multipage form for now. And by the way 
I have purchased the Struts In Actions book along with other three books 
on the same subject. But there was not must information on multipage form. 
Do you have any suggestion on book that I may find some complete example 
on multi page form. To answers your your question about why do I reset all 
input fields to its original state when the getPage() is equal to 2 is that 
I only have two pages,firstPage.jsp and secondPage.jsp, each page would set the
page number to 0 and 1 correspondingly. I set the page to 2 in the action
class when the secondPage.jsp was executed. Then I call the form's reset method
to clear all the fields before the control goes back to the firstPage.jsp. I
guest you are right about removing the form bean should be good enough to remove
all attributes in form for both pages.

Thank again.

Kam Lung Leung
On Fri, 24 Oct 2003 17:19:03 -0400, Ted Husted wrote:

 
 Kam Lung Leung wrote:
   Why don't I get a pop up dialog box with error messages?
   Why the secondPage.jsp did not get executed when a validation
   error occurred?
   Why do I get a blank screen?
 
 Are you sure that it's blank? Sometimes the page doesn't render because 
 of errors in the HTML, which might only be exposed when the page is 
 trying to display error messages.
 
 I'm not sure why you would reset everything if getPage() is equal to 2. 
 The usual approach is to allow the properties to accumulate, until the 
 end of the workflow, and then dispose of the (session-scoped ActionForm 
 altogether. Generally, the only thing you ever need to reset is a 
 checkbox to false on a session-scope ActionForm.
 
 -Ted.
 
 
  Hi,
  
  I have been looking at this problem for the last four days and can't
figure
  out. I have an application that required workflow form. I created a
  CreateUserAccountAction class that extends the DispatchAction and a form
  MultiCreateUserAccountForm that extends the ValidatorForm.  The reset method
of
  the MultiCreateUserAccountForm clears all attributes under the current session
  when the getPage() is equal to 2. The CreateUserAccountAction has two methods
  that are similar to the execute method that are named
createUserAccountActionOne
  and createUserAccountActionTwo. I got this concept out of chapter 12 of the
book
  Profession Jakarta Struts by James Goodwill and Richard Hightower.
  
  *** Here are the symptoms  **
  If there is a required field that is missing (leaved out) or does not
 fulfill
  the validation rule on the firstPage.jsp when the submit button is pressed. A
 new
  dialog box popped up on the screen with the validation message(s) from the
  resource property file. When all fields are validated the control is forwarded
 to
  the secondPage.jsp.
  
  If there is a required field that is missing (leaved out) or does not
 fulfill
  the validation rule on the secondPage.jsp when the submit button is pressed. A
  blank page is showed up on the window without a new dialog box shows up on the
  screen. The server.log indicates an error occurred and the control returns to
 the
  same page (secondPage.jsp). To fixing this problem, I pressed the back page
  button of the browser and correctly filled in all missing fields or making
sure
  the input is conforming to the validation rule. When all fields on the second
  page are filled in correctly according to the validation rules then the
control
  is correctly forwarded back to the firstPage.jsp.
  
  **  My questions
  
  
  Any suggestion and how to fix this problem is deeply appriciated.
  
  
  Kam Lung Leung 
  
  
  
  
  *** ***More detail on how the jsp was set up  **
  The createUserAccountActionOne method calls the
  MultiCreateUserAccountForm.validate() method to validate the user input fields
 of
  the firstPage.jsp. Second, it calls the setPage() method with  1 as its
input
  parameter. Finally, it calls the
 MultiCreateUserAccountForm.setMethodToDispatch()
  with createUserAccountActionTwo as the input parameter.
   
  The createUserAccountActionTwo method calls the
  MultiCreateUserAccountForm.validate() method to validate the user input fields
 of
  the secondPage.jsp. Secondly, it remove the obsolete form bean with
  session.removeAttribute(mapping.getAttribute()). Thirdly, it calls the
setPage()
  method with  2 as its input parameter. Finally, it calls the reset() method
to
  clear all attributes under the current session.
  
  ** This are action 

html:text 2

2003-10-31 Thread Gonzalez Comesaña, Sergio Eduardo
How can I do to change the value of a Disabled property   to False or True  of a 
field html:text  from an Action or some class . 
Is possible access to tags properties  in run time  like html's Class (styls) or 
sizes  etc. 


Sergio Gonzalez . 
 



Aquest missatge electrònic pot  contenir informació confidencial o privilegiada.
Si vostè no és el destinatari del  missatge, o l'ha rebut per error, si us plau
notifiqui-ho al remitent i destrueixi el missatge amb tot el seu contingut.
Està completament  prohibida  qualsevol  còpia, ús o distribució no autoritzada
del contingut d'aquest missatge electrònic.

Este mensaje electrónico puede contener información confidencial o privilegiada.
Si usted  no es  el destinatario de este mensaje o lo ha recibido por error, por
favor notifíquelo al remitente y destruya el mensaje con todo su contenido.
Queda  expresamente  prohibida  cualquier  copia, utilización o  distribución no
autorizada del contenido de este mensaje electrónico.

This e-mail may contain confidential and/or privileged information.
If you  are  not the  intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any  unauthorized  copying,  disclosure  or distribution of the material in this
e-mail is strictly forbidden.


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



Re: html:text i'm lost

2003-10-31 Thread struts
When i do something like you proposed
bean:write name=users property=userName/

 error: org.apache.jasper.JasperException: Cannot find bean
sessionScope.users in any scope

In the action i have:
usersForm.setUsers(usersValues);

//-- assign form object to the request object

setForm(mapping, userForm, request);

//-- populate the form object

populateForm(form, request);





- Original Message - 
From: Firat TIRYAKI [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 2:35 PM
Subject: Re: html:text


 you should use the name too
 name is the id you define in tags (logic:iterate maybe)
 bean:write name=users property=userName/

 and also

 c:out value=${users.userName} should work

 F.



 - Original Message - 
 From: struts [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 3:18 PM
 Subject: html:text


 This is maybe a stupid question but how can i print the user.userName
value
 on screen instead of in a text box ?

 eg:

 html:text property=users.userName size=10 maxlength=10/

 i want to do something like : bean:write property=users.userName/ but
 this is not working.

 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: html:text i'm lost

2003-10-31 Thread Mike Jasnowski
The name you provide for the name attr in bean:write/ must match the
name you stored it in the request with.

-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003 8:41 AM
To: Struts Users Mailing List
Subject: Re: html:text i'm lost


When i do something like you proposed
bean:write name=users property=userName/

 error: org.apache.jasper.JasperException: Cannot find bean
sessionScope.users in any scope

In the action i have:
usersForm.setUsers(usersValues);

//-- assign form object to the request object

setForm(mapping, userForm, request);

//-- populate the form object

populateForm(form, request);





- Original Message -
From: Firat TIRYAKI [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 2:35 PM
Subject: Re: html:text


 you should use the name too
 name is the id you define in tags (logic:iterate maybe)
 bean:write name=users property=userName/

 and also

 c:out value=${users.userName} should work

 F.



 - Original Message -
 From: struts [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 3:18 PM
 Subject: html:text


 This is maybe a stupid question but how can i print the user.userName
value
 on screen instead of in a text box ?

 eg:

 html:text property=users.userName size=10 maxlength=10/

 i want to do something like : bean:write property=users.userName/ but
 this is not working.

 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: use html:link pass two param

2003-10-31 Thread Ruth, Brice
If you have the parameters stored in a java.util.Map object, simply 
specifying the name of that object as the name attribute to html:link 
(without any paramId/paramName/paramProperty attributes, will do the 
trick for you.

If your bean list isn't a java.util.Map, you can create one on the fly 
in your JSP like so:

jsp:useBean id=varName class=java.util.HashMap/
c:set target=${varName} property=param1 value=value1/
c:set target=${varName} property=param2 value=value2/
where param1/2 are the names you want the parameters passed as in the 
query string, and value1/2 are the values (which can be populated with 
EL or as the text body of the c:set statement)

After doing this, the name attribute to html:link would simply be 
varName - which, of course, you can choose to be whatever you want.

Hope this helps!
Brice
javen fang wrote:

I have a bean list that have two property id / name

code:
--
html:link action=next.do paramId=first
paramName=list paramProperty=id next action
/html:link
--

And how can I pass the second parameter name after the
action next.do??
Thanks.


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

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


RE: html:text i'm lost

2003-10-31 Thread Susan Bradeen

So, if you stored your form in the request under userForm, and you stored
users objects in your form, then I think something like this should work:

bean:write name=userForm property=users.userName /

Susan

On 10/31/2003 08:57:41 AM Mike Jasnowski wrote:

 The name you provide for the name attr in bean:write/ must match the
 name you stored it in the request with.

 -Original Message-
 From: struts [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 8:41 AM
 To: Struts Users Mailing List
 Subject: Re: html:text i'm lost


 When i do something like you proposed
 bean:write name=users property=userName/

 error: org.apache.jasper.JasperException: Cannot find bean
 sessionScope.users in any scope

 In the action i have:
 usersForm.setUsers(usersValues);

 //-- assign form object to the request object

 setForm(mapping, userForm, request);

 //-- populate the form object

 populateForm(form, request);





 - Original Message -
 From: Firat TIRYAKI [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 2:35 PM
 Subject: Re: html:text


  you should use the name too
  name is the id you define in tags (logic:iterate maybe)
  bean:write name=users property=userName/
 
  and also
 
  c:out value=${users.userName} should work
 
  F.
 
 
 
  - Original Message -
  From: struts [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 3:18 PM
  Subject: html:text
 
 
  This is maybe a stupid question but how can i print the user.userName
 value
  on screen instead of in a text box ?
 
  eg:
 
  html:text property=users.userName size=10 maxlength=10/
 
  i want to do something like : bean:write property=users.userName/
but
  this is not working.
 
  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: html:text i'm lost

2003-10-31 Thread Firat TIRYAKI
writing in a logic iterate loop or what?
F.

- Original Message - 
From: struts [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 3:41 PM
Subject: Re: html:text i'm lost


 When i do something like you proposed
 bean:write name=users property=userName/

  error: org.apache.jasper.JasperException: Cannot find bean
 sessionScope.users in any scope

 In the action i have:
 usersForm.setUsers(usersValues);

 //-- assign form object to the request object

 setForm(mapping, userForm, request);

 //-- populate the form object

 populateForm(form, request);





 - Original Message - 
 From: Firat TIRYAKI [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 2:35 PM
 Subject: Re: html:text


  you should use the name too
  name is the id you define in tags (logic:iterate maybe)
  bean:write name=users property=userName/
 
  and also
 
  c:out value=${users.userName} should work
 
  F.
 
 
 
  - Original Message - 
  From: struts [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 3:18 PM
  Subject: html:text
 
 
  This is maybe a stupid question but how can i print the user.userName
 value
  on screen instead of in a text box ?
 
  eg:
 
  html:text property=users.userName size=10 maxlength=10/
 
  i want to do something like : bean:write property=users.userName/
but
  this is not working.
 
  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: Iterating List of Lists

2003-10-31 Thread Larry Meadors
Are you saying you use the member tag just so you can look at the html
and see that it is being output?

Larry

 [EMAIL PROTECTED] 10/31/03 1:34 AM 
No matter what, just a sign for our debugging in Browser.


From: javen fang [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Iterating List of Lists
Date: Thu, 30 Oct 2003 23:03:35 -0800 (PST)

Where is member tag from???

Your own taglib?

--- Choopong C. [EMAIL PROTECTED] wrote:
  Try like this
 
  table
  logic:iterate id=organization
  name=organizations
  member
  trtd
  bean:write name=organization
  property=title/
  logic:iterate id=item name=organization
  property=items
  member
  br/-bean:write name=item
  property=title/
  /member
  /logic:iterate
 
  /td/tr
  /member
  /logic:iterate
  /table
 
 
  From: Chris Gastin [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List
  [EMAIL PROTECTED]
  To: Struts Users Mailing List
  [EMAIL PROTECTED]
  Subject: Iterating List of Lists
  Date: Thu, 30 Oct 2003 21:55:53 -0600
  
  I have List of Lists of DataObjects. I want to
  iterate through that List of
  Lists to get access to the Data Object, where I
  will print the values of
  the
  attributes on the data object. I have the outer
  loop working, but I don't
  understand how to get the Data out of the list in
  the inner loop.
  
  This is my latest attempt:
  
  logic:iterate id=list name=di3List
  scope=request
   logic:iterate id=data
  collection=list
   libean:write
  name=data property=word/ -
  bean:write name=data
  property=definition//li
   /logic:iterate
  /logic:iterate
  
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
_
  Protect your PC - get McAfee.com VirusScan Online
 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
 
 
 
-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 


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

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


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


-
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 source (newbie)

2003-10-31 Thread Hubert Rabago
You don't need the source to use struts in your
application.  Some of the classes are meant to be
extended and some are meant to be used directly.
Check out the user guide
http://jakarta.apache.org/struts/userGuide/index.html.

-Original Message-
From: koen boutsen [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 4:40 AM
To: Struts Users Mailing List
Subject: Re: struts source (newbie)


you can download the source from the jakarta site
--

- Original Message -

DATE: Fri, 31 Oct 2003 02:15:03
From: J P [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: 

Hello,
Pardon me, but Struts by nature is configurable /
extendable and 
therefore editable? One would quite frequently like
to get into the source of the .javas? I have
downloaded and installed 1.1 but can see nothing but
classes, JARs and WARs. I for expample want to
configure the ActionServlet, but cannot becasue I
cannot find the .java! I have unpacked the JARs and
WARs but the source is thus far elusive. In the
struts-blank app for example, all classes and config
files are present, but what of the source? Is it not
included in the distribution or is it separate?
 
Regards
 
Eager 2 Start.



__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



Re: Deploying on TOMCAT

2003-10-31 Thread Vinita Keswani
Thanks!! This is a great help

Jacob Wilson [EMAIL PROTECTED] wrote:Vinitha,

Assume 'Tomcat\webapps\root' is your project folder...

Create separate folders of images, js, html, styles etc. and place the respective 
files in the respective folders...

Place all your jsps in the root directly...

the web-inf should be in your root...

in the web-inf place your web.xml and struts-config and all tld files...

create a folder lib in your web-inf and place all the jars in the lib folder

set your java classpath in your catalina.bat that lies in the bin folder...

Run the server and write a action and check... This should work...

Hope this helps...

-J


Vinita Keswani wrote:

Hello,



I am trying to deploy my struts application on tomcat..does somebody have a list of 
do's and dont's for that which paths to set etc...for eg: where does struts-config go?



Thanks in advance



-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

RE: use html:link pass two param

2003-10-31 Thread James Mitchell
First of all, you should never have to put .do any where in your
application except the web.xml file.
That way, you change the mapping in one place and it flows to the rest
of the application.

Here's what I do:


%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c%


jsp:useBean id=userDetailLink class=java.util.HashMap/

c:set target=${userDetailLink} property=action value=editUser/
c:set target=${userDetailLink} property=id value=${user.id}/

html:link action=/manageUsers name=userDetailLink
Edit this user
/html:link



Which produces a link like this:

a href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
this user/a


The above example uses path mapping, but if I were using extension
mapping (*.do), it looks like this:

(with no changes to the source jsp)

a href=/app/manageUsers.do?action=editUseramp;id=44Edit this
user/a



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 -Original Message-
 From: javen fang [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 1:58 AM
 To: struts
 Subject: use html:link pass two param
 
 
 I have a bean list that have two property id / name
 
 code:
 --
 
 html:link action=next.do paramId=first
 paramName=list paramProperty=id next action
 /html:link
 
 --
 
 
 And how can I pass the second parameter name after the
 action next.do??
 Thanks.
 
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Ruth, Brice
I've been doing some googling on having a webapp precompiled when 
deployed to Tomcat via an Ant task and I'm a bit intimidated with what's 
involved. Has anyone out there done this? Right now, I have an Ant build 
setup as an external build in Eclipse that does a variety of things, 
including building, packing up my WAR, and installing this WAR to Tomcat 
using the catalina-ant install command that uses the management URL 
and an external context file to install the webapp in a (local) running 
Tomcat instance.

I'd like to follow-up the install with a directive to Tomcat to 
precompile the JSPs in the web application - does anyone have an Ant 
task that I could adapt to this purpose that they'd be willing to share?

Thanks!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: use html:link pass two param

2003-10-31 Thread Ruth, Brice
How do you go about enabling path mapping v. extension mapping in 
web.xml (or struts-config.xml)?

James Mitchell wrote:

First of all, you should never have to put .do any where in your
application except the web.xml file.
That way, you change the mapping in one place and it flows to the rest
of the application.
Here's what I do:

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c%
jsp:useBean id=userDetailLink class=java.util.HashMap/

c:set target=${userDetailLink} property=action value=editUser/
c:set target=${userDetailLink} property=id value=${user.id}/
html:link action=/manageUsers name=userDetailLink
Edit this user
/html:link


Which produces a link like this:

a href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
this user/a
The above example uses path mapping, but if I were using extension
mapping (*.do), it looks like this:
(with no changes to the source jsp)

a href=/app/manageUsers.do?action=editUseramp;id=44Edit this
user/a


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx


 

-Original Message-
From: javen fang [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 1:58 AM
To: struts
Subject: use html:link pass two param

I have a bean list that have two property id / name

code:
--
html:link action=next.do paramId=first
paramName=list paramProperty=id next action
/html:link
--

And how can I pass the second parameter name after the
action next.do??
Thanks.


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

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



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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


RE: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Paul McCulloch
In case you didn't know, you can precompile a specific jsp by simply making
a reqest to the page with a special paramter:

ttp://myapp/somepage.jsp?jsp_precompile

If you don't have a huge number of pages this might form the basis of a
quick and dirty hack.

Paul

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: 31 October 2003 15:14
To: Struts Users Mailing List
Subject: Eclipse + Ant + precompile - Tomcat


I've been doing some googling on having a webapp precompiled when 
deployed to Tomcat via an Ant task and I'm a bit intimidated with what's 
involved. Has anyone out there done this? Right now, I have an Ant build 
setup as an external build in Eclipse that does a variety of things, 
including building, packing up my WAR, and installing this WAR to Tomcat 
using the catalina-ant install command that uses the management URL 
and an external context file to install the webapp in a (local) running 
Tomcat instance.

I'd like to follow-up the install with a directive to Tomcat to 
precompile the JSPs in the web application - does anyone have an Ant 
task that I could adapt to this purpose that they'd be willing to share?

Thanks!

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



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


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


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



RE: Connection pool and MessageRessources

2003-10-31 Thread James Mitchell
You might not be realizing just how deeply the MesageResources is
integrated with Struts.

Your solution won't work if:

  * your app is using the validator

  * any of your jsp pages are using bean:message

  * any of your jsp pages use tags that use MessageResources
(which are any that use xyzKey such as srcKey, 
 pageKey, altKey, etc)


As far as application modification goes, the extension I 
created is a simple config change in struts-config, and voila!


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 -Original Message-
 From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 7:23 AM
 To: Struts Users Mailing List
 Subject: Re: Connection pool and MessageRessources
 
 
 I think I've found a solution.
 I'll make an object (eventualy a struts PlugIn), DBMessage 
 which receivies a
 connection from my connection pool and retrives the error 
 messages from the
 database, and this object will not extend MessageRessources.
 Then in my actions I'll have :
 
 DbMessage dbmesg = (DbMessage)servlet.getAttribute(DBMESG);
 String  message = dbmesg.getMessage(error_code);
 ActionErrors errors = new ActionError();
 errors.add(code,new ActionError(foo,message));
 
 where foo is defined in my application.properties as
 foo = {0}
 
 How that sounds ?
 
 
 Ovidiu
 
 - Original Message - 
 From: James Mitchell [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Thursday, October 30, 2003 7:18 PM
 Subject: RE: Connection pool and MessageRessources
 
 
  Hi Ovidiu
 
  I also wrote my own DBMessageResources.  With a simple 
 hack, I was able
  to overcome the limitations of the existing API.
 
  The source code and example are available for download at:
 
 
  
 http://sourceforge.net/project/showfiles.php?group_id=49385re
 lease_id=1
  54972
 
 
 
  --
  James Mitchell
  Software Engineer / Struts Evangelist
  http://www.struts-atlanta.org
  678.910.8017 (c)
  770.822.3359 (h)
  AIM:jmitchtx
 
 
 
 
   -Original Message-
   From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 30, 2003 1:07 PM
   To: [EMAIL PROTECTED]
   Subject: Connection pool and MessageRessources
  
  
   Hi,
   I'm working with Struts 1.1 and I have a problem with the
   MessageRessource and I
   don't know to handle it  the right way.
   In my application I have two constraints,among others :) ,
   - i must use an oci connection to the database
   - the error messages will be stored in the database
   For that I took two aproaches :
   ## One ##:  I have written a Struts plugin which builds the
   connection pool, and
   I've extended MessageRessourceFactory and MessageRessources
   with my own classes
   DBRessourceFactory and DBRessource to have my own mechanism
   for message
   retrivial. My problem is now how can I get a connection to
   the database from the
   connection pool I've just made ? Is there a way to
   communicate between my plugin
   and my DBRessource class ?
  
  
   ## Two ##: I make a class which will handle the connection
   pool creation and the
   retrivial of messages from the database.
   It will look like this :
   public class MessagesDBPool extends MessageRessources implements
   PlugIn,Serializable {
   public MessageDBPool (){
   super();
   }
   public MessageDBPool(MessageRessourcesFactory
   factory,String config){
   this(factory,config,false);
   }
   public MessageDBPool(MessageRessourcesFactory
   factory,String config,boolean
   returnNull){
   super(factory,config,returnNull);
   }
   public void init(ActionServlet servlet, ModuleConfig
   config) throws
   ServletException{
   //pool initialisation here
   }
   public void destroy(){
   //destroy pool here
   }
   }
   Can I do this in the first place ?
  
   Now the question is which one of this two solutions can work?
   Is there another
   way to do this ?
   Any suggestions are welcome .
  
   Thanks,
   Ovidiu EFTIMIE
  
  
  
  
   
 -
   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: Connection pool and MessageRessources

2003-10-31 Thread James Mitchell
 -Original Message-
 From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 5:34 AM
 To: Struts Users Mailing List
 Subject: Re: Connection pool and MessageRessources
 
 
 Hi James,
 I've studied your solution, and I've noticed that you use a 
 different connection
 to the database and not the one that should be availble in an struts
 application, and I think that could be a point of failure. 

No, actually you have that part wrong.  See, my extension uses OJB which
is configured from it's own xml file and not from the struts-config.xml.

Using the existing API (without any special hacks), you have no 
way to pass a connection, the DataSourceConfig, or even get at 
the ModuleConfig from any subclass of MessageResources.  That's why my
solution works without requiring any special coding.

My extension is designed to run independently of your application's
persistence mechanism(s), but if you happen to be using OJB, it's 
all good.

Somewhere on my todo list, is to implement the same extension using each
of the major ORM frameworks.  But like all things, it takes time, and
since I can't put food on the table writing Struts extensions, it'll 
have to wait.


 
 That is why I'm
 trying tu use the same connection pool as the rest of the application.

If your app used OJB, you could do exactly that.

 
 Ovidiu
 


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx



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



Re: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Ruth, Brice
Good tip ... thanks! I actually do have a lot of JSPs (especially tiles) 
... so this probably won't work for me at this moment.

Paul McCulloch wrote:

In case you didn't know, you can precompile a specific jsp by simply making
a reqest to the page with a special paramter:
ttp://myapp/somepage.jsp?jsp_precompile

If you don't have a huge number of pages this might form the basis of a
quick and dirty hack.
Paul

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: 31 October 2003 15:14
To: Struts Users Mailing List
Subject: Eclipse + Ant + precompile - Tomcat
I've been doing some googling on having a webapp precompiled when 
deployed to Tomcat via an Ant task and I'm a bit intimidated with what's 
involved. Has anyone out there done this? Right now, I have an Ant build 
setup as an external build in Eclipse that does a variety of things, 
including building, packing up my WAR, and installing this WAR to Tomcat 
using the catalina-ant install command that uses the management URL 
and an external context file to install the webapp in a (local) running 
Tomcat instance.

I'd like to follow-up the install with a directive to Tomcat to 
precompile the JSPs in the web application - does anyone have an Ant 
task that I could adapt to this purpose that they'd be willing to share?

Thanks!

 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: use html:link pass two param

2003-10-31 Thread Kris Schneider
web.xml:

!-- mapping for ActionServlet --
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern/do/*/url-pattern
/servlet-mapping

Quoting Ruth, Brice [EMAIL PROTECTED]:

 How do you go about enabling path mapping v. extension mapping in 
 web.xml (or struts-config.xml)?
 
 James Mitchell wrote:
 
 First of all, you should never have to put .do any where in your
 application except the web.xml file.
 That way, you change the mapping in one place and it flows to the rest
 of the application.
 
 Here's what I do:
 
 
 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
 %@ taglib uri=http://java.sun.com/jstl/core; prefix=c%
 
 
 jsp:useBean id=userDetailLink class=java.util.HashMap/
 
 c:set target=${userDetailLink} property=action value=editUser/
 c:set target=${userDetailLink} property=id value=${user.id}/
 
 html:link action=/manageUsers name=userDetailLink
  Edit this user
 /html:link
 
 
 
 Which produces a link like this:
 
 a href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
 this user/a
 
 
 The above example uses path mapping, but if I were using extension
 mapping (*.do), it looks like this:
 
 (with no changes to the source jsp)
 
 a href=/app/manageUsers.do?action=editUseramp;id=44Edit this
 user/a
 
 
 
 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx
 
 
 
 
   
 
 -Original Message-
 From: javen fang [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 1:58 AM
 To: struts
 Subject: use html:link pass two param
 
 
 I have a bean list that have two property id / name
 
 code:
 --
 
 html:link action=next.do paramId=first
 paramName=list paramProperty=id next action
 /html:link
 
 --
 
 
 And how can I pass the second parameter name after the
 action next.do??
 Thanks.
 
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
   
 
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Re: use html:link pass two param

2003-10-31 Thread Ruth, Brice
doesn't this still put 'do' somewhere in the URL?

Kris Schneider wrote:

web.xml:

!-- mapping for ActionServlet --
servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern/do/*/url-pattern
/servlet-mapping
Quoting Ruth, Brice [EMAIL PROTECTED]:

 

How do you go about enabling path mapping v. extension mapping in 
web.xml (or struts-config.xml)?

James Mitchell wrote:

   

First of all, you should never have to put .do any where in your
application except the web.xml file.
That way, you change the mapping in one place and it flows to the rest
of the application.
Here's what I do:

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c%
jsp:useBean id=userDetailLink class=java.util.HashMap/

c:set target=${userDetailLink} property=action value=editUser/
c:set target=${userDetailLink} property=id value=${user.id}/
html:link action=/manageUsers name=userDetailLink
Edit this user
/html:link


Which produces a link like this:

a href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
this user/a
The above example uses path mapping, but if I were using extension
mapping (*.do), it looks like this:
(with no changes to the source jsp)

a href=/app/manageUsers.do?action=editUseramp;id=44Edit this
user/a


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 

-Original Message-
From: javen fang [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 1:58 AM
To: struts
Subject: use html:link pass two param

I have a bean list that have two property id / name

code:
--
html:link action=next.do paramId=first
paramName=list paramProperty=id next action
/html:link
--

And how can I pass the second parameter name after the
action next.do??
Thanks.


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

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

   

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


 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
   

 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: struts plugin

2003-10-31 Thread gianluca
Really good. How can i clear xtask cache ?



 http://www.xmoon.it www.xmoon.it


RE: use html:link pass two param

2003-10-31 Thread James Mitchell
See Section 11.2 of the Servlet 2.3 API Specification or Section 10.2 of
the Servet 2.2 API Specification.

Then do some testingpun intended ;)



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 -Original Message-
 From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 11:03 AM
 To: Struts Users Mailing List
 Subject: Re: use html:link pass two param
 
 
 doesn't this still put 'do' somewhere in the URL?
 
 Kris Schneider wrote:
 
 web.xml:
 
 !-- mapping for ActionServlet --
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern/do/*/url-pattern
 /servlet-mapping
 
 Quoting Ruth, Brice [EMAIL PROTECTED]:
 
   
 
 How do you go about enabling path mapping v. extension mapping in 
 web.xml (or struts-config.xml)?
 
 James Mitchell wrote:
 
 
 
 First of all, you should never have to put .do any where in your
 application except the web.xml file.
 That way, you change the mapping in one place and it flows 
 to the rest
 of the application.
 
 Here's what I do:
 
 
 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
 %@ taglib uri=http://java.sun.com/jstl/core; prefix=c%
 
 
 jsp:useBean id=userDetailLink class=java.util.HashMap/
 
 c:set target=${userDetailLink} property=action 
 value=editUser/
 c:set target=${userDetailLink} property=id 
 value=${user.id}/
 
 html:link action=/manageUsers name=userDetailLink
Edit this user
 /html:link
 
 
 
 Which produces a link like this:
 
 a 
 href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
 this user/a
 
 
 The above example uses path mapping, but if I were using extension
 mapping (*.do), it looks like this:
 
 (with no changes to the source jsp)
 
 a href=/app/manageUsers.do?action=editUseramp;id=44Edit this
 user/a
 
 
 
 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx
 
 
 
 
  
 
   
 
 -Original Message-
 From: javen fang [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 1:58 AM
 To: struts
 Subject: use html:link pass two param
 
 
 I have a bean list that have two property id / name
 
 code:
 --
 
 html:link action=next.do paramId=first
 paramName=list paramProperty=id next action
 /html:link
 
 --
 
 
 And how can I pass the second parameter name after the
 action next.do??
 Thanks.
 
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 --
 ---
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED]
 

 
 
 
 ---
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED]
 
  
 
   
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
   
 
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
 -
 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: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Ian Joyce
Try this out: 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html#Web%20Application%20Compilation

You may need to do some tweeking, but it worked great for me.

 [EMAIL PROTECTED] 10/31/03 09:13AM 
I've been doing some googling on having a webapp precompiled when 
deployed to Tomcat via an Ant task and I'm a bit intimidated with what's 
involved. Has anyone out there done this? Right now, I have an Ant build 
setup as an external build in Eclipse that does a variety of things, 
including building, packing up my WAR, and installing this WAR to Tomcat 
using the catalina-ant install command that uses the management URL 
and an external context file to install the webapp in a (local) running 
Tomcat instance.

I'd like to follow-up the install with a directive to Tomcat to 
precompile the JSPs in the web application - does anyone have an Ant 
task that I could adapt to this purpose that they'd be willing to share?

Thanks!

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



-
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: use html:link pass two param

2003-10-31 Thread Kris Schneider
You can call it whatever you want - admin-tool from James' example. The
difference is this:

/app/do/manageUsers

vs. this:

/app/manageUsers.do

I think James was referring to the use of:

html:link action=next.do ...

when he said, you should never have to put .do any where in your
application... You really only need to do:

html:link action=/next ...

which will work regardless of how you do your servlet mapping.

Quoting Ruth, Brice [EMAIL PROTECTED]:

 doesn't this still put 'do' somewhere in the URL?
 
 Kris Schneider wrote:
 
 web.xml:
 
 !-- mapping for ActionServlet --
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern/do/*/url-pattern
 /servlet-mapping
 
 Quoting Ruth, Brice [EMAIL PROTECTED]:
 
   
 
 How do you go about enabling path mapping v. extension mapping in 
 web.xml (or struts-config.xml)?
 
 James Mitchell wrote:
 
 
 
 First of all, you should never have to put .do any where in your
 application except the web.xml file.
 That way, you change the mapping in one place and it flows to the rest
 of the application.
 
 Here's what I do:
 
 
 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
 %@ taglib uri=http://java.sun.com/jstl/core; prefix=c%
 
 
 jsp:useBean id=userDetailLink class=java.util.HashMap/
 
 c:set target=${userDetailLink} property=action value=editUser/
 c:set target=${userDetailLink} property=id value=${user.id}/
 
 html:link action=/manageUsers name=userDetailLink
Edit this user
 /html:link
 
 
 
 Which produces a link like this:
 
 a href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
 this user/a
 
 
 The above example uses path mapping, but if I were using extension
 mapping (*.do), it looks like this:
 
 (with no changes to the source jsp)
 
 a href=/app/manageUsers.do?action=editUseramp;id=44Edit this
 user/a
 
 
 
 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx
 
 
 
 
  
 
   
 
 -Original Message-
 From: javen fang [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 1:58 AM
 To: struts
 Subject: use html:link pass two param
 
 
 I have a bean list that have two property id / name
 
 code:
 --
 
 html:link action=next.do paramId=first
 paramName=list paramProperty=id next action
 /html:link
 
 --
 
 
 And how can I pass the second parameter name after the
 action next.do??
 Thanks.
 
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
  
 
   
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
   
 
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Re: use html:link pass two param

2003-10-31 Thread Ruth, Brice
Coolio, thanks!

James Mitchell wrote:

See Section 11.2 of the Servlet 2.3 API Specification or Section 10.2 of
the Servet 2.2 API Specification.
Then do some testingpun intended ;)



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx


 

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 11:03 AM
To: Struts Users Mailing List
Subject: Re: use html:link pass two param

doesn't this still put 'do' somewhere in the URL?

Kris Schneider wrote:

   

web.xml:

!-- mapping for ActionServlet --
servlet-mapping
servlet-nameaction/servlet-name
url-pattern/do/*/url-pattern
/servlet-mapping
Quoting Ruth, Brice [EMAIL PROTECTED]:



 

How do you go about enabling path mapping v. extension mapping in 
web.xml (or struts-config.xml)?

James Mitchell wrote:

  

   

First of all, you should never have to put .do any where in your
application except the web.xml file.
That way, you change the mapping in one place and it flows 
 

to the rest
   

of the application.

Here's what I do:

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c%
jsp:useBean id=userDetailLink class=java.util.HashMap/

c:set target=${userDetailLink} property=action 
 

value=editUser/
   

c:set target=${userDetailLink} property=id 
 

value=${user.id}/
   

html:link action=/manageUsers name=userDetailLink
Edit this user
/html:link


Which produces a link like this:

a 
 

href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
   

this user/a

The above example uses path mapping, but if I were using extension
mapping (*.do), it looks like this:
(with no changes to the source jsp)

a href=/app/manageUsers.do?action=editUseramp;id=44Edit this
user/a


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx






 

-Original Message-
From: javen fang [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 1:58 AM
To: struts
Subject: use html:link pass two param

I have a bean list that have two property id / name

code:
--
html:link action=next.do paramId=first
paramName=list paramProperty=id next action
/html:link
--

And how can I pass the second parameter name after the
action next.do??
Thanks.


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

--
   

---
   

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

[EMAIL PROTECTED]
   

 

  

   

---
 

--
   

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

[EMAIL PROTECTED]
   



 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
  

   



 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: Connection pool and MessageRessources

2003-10-31 Thread Ovidiu EFTIMIE
The think is we're not using OJB for this application, but your struts extension
is very interesting  and i'll keep it in my mind for future projects.

Thanks for yout response
Ovidiu

- Original Message - 
From: James Mitchell [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 4:13 PM
Subject: RE: Connection pool and MessageRessources


  -Original Message-
  From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 5:34 AM
  To: Struts Users Mailing List
  Subject: Re: Connection pool and MessageRessources
 
 
  Hi James,
  I've studied your solution, and I've noticed that you use a
  different connection
  to the database and not the one that should be availble in an struts
  application, and I think that could be a point of failure.

 No, actually you have that part wrong.  See, my extension uses OJB which
 is configured from it's own xml file and not from the struts-config.xml.

 Using the existing API (without any special hacks), you have no
 way to pass a connection, the DataSourceConfig, or even get at
 the ModuleConfig from any subclass of MessageResources.  That's why my
 solution works without requiring any special coding.

 My extension is designed to run independently of your application's
 persistence mechanism(s), but if you happen to be using OJB, it's
 all good.

 Somewhere on my todo list, is to implement the same extension using each
 of the major ORM frameworks.  But like all things, it takes time, and
 since I can't put food on the table writing Struts extensions, it'll
 have to wait.


 
  That is why I'm
  trying tu use the same connection pool as the rest of the application.

 If your app used OJB, you could do exactly that.

 
  Ovidiu
 


 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx



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



html-el:form tag question

2003-10-31 Thread Jim Kennedy


Here's my standard html form tag:

form name=main action=doit method=post



I need to be able to name my form in my application.  How do I do that
with the el form tag.  It is not this:



html-el:form name=main action=/doit.do method=post scope=request



name has another meaning for this tag.  what is the equivalent for name in a
standard HTML form tag?



thanks



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



RE: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Holman, Cal
I am using tomcat 5.0.12 and struts 1.1 with tiles and have been successful in 
precompiling.  The tomcat documentation has a pretty good example.  The hard part is 
translating someone else's directory structure into yours to apply all the examples.  
I posted my solution to my web site at 
http://www.calandva.com/holmansite/do/blog/blogging 

I also use Eclipse for development but due to the number of steps and substitution in 
the various output xml and properties files still create the final product with ant - 
invoked in Eclipse or externally.  Not sure I explained it well enough and I left off 
my compile and war targets - let me know if you have questions.  

Cal

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003 10:14
To: Struts Users Mailing List
Subject: Eclipse + Ant + precompile - Tomcat

I've been doing some googling on having a webapp precompiled when
deployed to Tomcat via an Ant task and I'm a bit intimidated with what's
involved. Has anyone out there done this? Right now, I have an Ant build
setup as an external build in Eclipse that does a variety of things,
including building, packing up my WAR, and installing this WAR to Tomcat
using the catalina-ant install command that uses the management URL
and an external context file to install the webapp in a (local) running
Tomcat instance.

I'd like to follow-up the install with a directive to Tomcat to
precompile the JSPs in the web application - does anyone have an Ant
task that I could adapt to this purpose that they'd be willing to share?

Thanks!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



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

  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



Re: html-el:form tag question

2003-10-31 Thread Ruth, Brice
The name attribute on the HTML generated by html:form is 
automatically set to the name of the action that will be receiving the 
form input, if I'm not mistaken. So, in your case, it would be named 
doit, if I'm not mistaken. This, I believe, is done to support 
validation through javascript.

Jim Kennedy wrote:

Here's my standard html form tag:

form name=main action=doit method=post



I need to be able to name my form in my application.  How do I do that
with the el form tag.  It is not this:


html-el:form name=main action=/doit.do method=post scope=request



name has another meaning for this tag.  what is the equivalent for name in a
standard HTML form tag?


thanks



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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


R: struts plugin

2003-10-31 Thread Mario
Yes, just point to /struts/console.html
You can clear xml cache and see global/session scope objects.


-Messaggio originale-
Da: gianluca [mailto:[EMAIL PROTECTED] 
Inviato: venerdì 31 ottobre 2003 17.09
A: '[EMAIL PROTECTED]'
Oggetto: Re: struts plugin

Really good. How can i clear xtask cache ?



 http://www.xmoon.it www.xmoon.it



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



Re: html-el:form tag question

2003-10-31 Thread Jim Kennedy
I figured it out.  It's actually set to the name of the form-bean.  And I
can live with that.

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: Ruth, Brice [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 11:22 AM
Subject: Re: html-el:form tag question


 The name attribute on the HTML generated by html:form is
 automatically set to the name of the action that will be receiving the
 form input, if I'm not mistaken. So, in your case, it would be named
 doit, if I'm not mistaken. This, I believe, is done to support
 validation through javascript.

 Jim Kennedy wrote:

 Here's my standard html form tag:
 
 form name=main action=doit method=post
 
 
 
 I need to be able to name my form in my application.  How do I do that
 with the el form tag.  It is not this:
 
 
 
 html-el:form name=main action=/doit.do method=post
scope=request
 
 
 
 name has another meaning for this tag.  what is the equivalent for name
in a
 standard HTML form tag?
 
 
 
 thanks
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.



 -
 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: Connection pool and MessageRessources

2003-10-31 Thread Ovidiu EFTIMIE
Yes I know it is very tighly integrated with Struts, and actualy  we're comply
with all things you've enumerated below.
The validator will not be used because all validation will be done with
javascript already present in the jsp page, and the only server side validation
we'll have will be to find out if the client has disabled javascript, and  we'll
not be using bean:message beacause we'll not have a multi language site.

I know that my solution cannot be universally applied, and it's just a way to
overcome Struts limitations regarding the MessageRessources.
I'll hope that in future versions something similar with your extension could be
integrated into Struts, because is a little bit frustrating to manage error
messages(for example) in two separate places (an Oracle table and
application.properties as in my case).

Thanks for your response, and I hope Id didn't took a lot of your time

Ovidiu

- Original Message - 
From: James Mitchell [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 4:13 PM
Subject: RE: Connection pool and MessageRessources


 You might not be realizing just how deeply the MesageResources is
 integrated with Struts.

 Your solution won't work if:

   * your app is using the validator

   * any of your jsp pages are using bean:message

   * any of your jsp pages use tags that use MessageResources
 (which are any that use xyzKey such as srcKey,
  pageKey, altKey, etc)


 As far as application modification goes, the extension I
 created is a simple config change in struts-config, and voila!


 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx




  -Original Message-
  From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 7:23 AM
  To: Struts Users Mailing List
  Subject: Re: Connection pool and MessageRessources
 
 
  I think I've found a solution.
  I'll make an object (eventualy a struts PlugIn), DBMessage
  which receivies a
  connection from my connection pool and retrives the error
  messages from the
  database, and this object will not extend MessageRessources.
  Then in my actions I'll have :
 
  DbMessage dbmesg = (DbMessage)servlet.getAttribute(DBMESG);
  String  message = dbmesg.getMessage(error_code);
  ActionErrors errors = new ActionError();
  errors.add(code,new ActionError(foo,message));
 
  where foo is defined in my application.properties as
  foo = {0}
 
  How that sounds ?
 
 
  Ovidiu
 
  - Original Message - 
  From: James Mitchell [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Sent: Thursday, October 30, 2003 7:18 PM
  Subject: RE: Connection pool and MessageRessources
 
 
   Hi Ovidiu
  
   I also wrote my own DBMessageResources.  With a simple
  hack, I was able
   to overcome the limitations of the existing API.
  
   The source code and example are available for download at:
  
  
  
  http://sourceforge.net/project/showfiles.php?group_id=49385re
  lease_id=1
   54972
  
  
  
   --
   James Mitchell
   Software Engineer / Struts Evangelist
   http://www.struts-atlanta.org
   678.910.8017 (c)
   770.822.3359 (h)
   AIM:jmitchtx
  
  
  
  
-Original Message-
From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 1:07 PM
To: [EMAIL PROTECTED]
Subject: Connection pool and MessageRessources
   
   
Hi,
I'm working with Struts 1.1 and I have a problem with the
MessageRessource and I
don't know to handle it  the right way.
In my application I have two constraints,among others :) ,
- i must use an oci connection to the database
- the error messages will be stored in the database
For that I took two aproaches :
## One ##:  I have written a Struts plugin which builds the
connection pool, and
I've extended MessageRessourceFactory and MessageRessources
with my own classes
DBRessourceFactory and DBRessource to have my own mechanism
for message
retrivial. My problem is now how can I get a connection to
the database from the
connection pool I've just made ? Is there a way to
communicate between my plugin
and my DBRessource class ?
   
   
## Two ##: I make a class which will handle the connection
pool creation and the
retrivial of messages from the database.
It will look like this :
public class MessagesDBPool extends MessageRessources implements
PlugIn,Serializable {
public MessageDBPool (){
super();
}
public MessageDBPool(MessageRessourcesFactory
factory,String config){
this(factory,config,false);
}
public MessageDBPool(MessageRessourcesFactory
factory,String config,boolean
returnNull){
super(factory,config,returnNull);
}
public void init(ActionServlet servlet, ModuleConfig
config) throws

Mappings

2003-10-31 Thread Edgar P Dollin
Has anyone encoded map keys as path parameters in the struts config?  I am
doing this but was wondering if there were any 'gotchas' I haven't forseen.

What I am doing (in MockStrutsTestCase) is using the 'success' forward from
an action be conditional or hard-coded.  If it was conditional (developer
would use the 'key' as the path in struts-config) the forward path is looked
up elsewhere, else it is used as is.

Thanks in advance.

Edgar

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



Re: findByProperty() in the scaffold.sql.AccessBase - Need One Additional Parameter to the Pair of Property/Value

2003-10-31 Thread Caroline Jen
Please help.  Need your clever ideas.  Thank you.
--- Caroline Jen [EMAIL PROTECTED] wrote:
 I am using the findByProperty method in the
 org.apache.commons.scaffold.sql.AccessBase.  The
 findByProperty method takes one pair of
 property/value as it parameters.  As such, visitors
 of
 the web site can query all articles in the database
 by
 providing 'author' as the property and supply the
 name
 of the author (xyz) as value.
 
 public static final Collection findByProperty
 (
 Object target,
 String property,
 String value
 ) throws ParameterException, PopulateException,
 ResourceException
 
 I have this field category in my database.  I want
 to search and get all the articles written by
 author(property) with name xyz (value) within the
 HISTORY category.  The value of the category will be
 supplied by the application developer (NOT BY THE
 VISITOR of the web site via selecting from a
 drop-down
 list and fill out the value in the text field).
 
 I need help in handling this kind of situation. 
 Thanks in advance.
 
 -Caroline
 
 __
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 http://launch.yahoo.com/promos/britneyspears/
 

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


__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



Requiredif error?

2003-10-31 Thread Greg Hess








Hi All,



I get the following error when I submit my form using the requiredif:



25 Oct 2003
12:03:13,311 - ERROR org.apache.commons.validator.Validator
- reflection: null

java.lang.reflect.InvocationTargetException

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 at java.lang.reflect.Method.invoke(Method.java:324)

 at org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:454)

 at org.apache.commons.validator.Validator.validateField(Validator.java:544)

 at org.apache.commons.validator.Validator.validate(Validator.java:582)

 at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)

 at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942)

 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)

 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

 at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)

 at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)

 at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)

 at com.caucho.http.security.SecurityFilter.doFilter(SecurityFilter.java:115)

 at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)

 at com.caucho.server.http.Invocation.service(Invocation.java:315)

 at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)

 at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)

 at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164)

 at com.caucho.server.TcpConnection.run(TcpConnection.java:139)

 at java.lang.Thread.run(Thread.java:536)

Caused by: java.lang.NullPointerException

 at org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldChecks.java:200)

 ...
23 more



My config is good:




form name=archiveRestoreForm


field


 property=archive


 depends=requiredif


 arg0
key=archiveRestoreForm.archiveFile/

 var

  var-namefield[0]/var-name

  var-valueevent/var-value

  /var

  var

  var-namefield-test[0]/var-name

  var-valueNOTNULL/var-value

  /var
 


/field

  /form



If I switch the rule to required all is well. Any help is
much appreciated.




 
  
  Greg
   Hess
  
 
 
  
  Software
  Engineer
  
 
 
  
  Wrapped
  Apps Corporation
  
 
 
  
  275 Michael Cowpland Dr.
  
 
 
  
  Suite
   201
  
 
 
  
  Ottawa, Ontario
  
 
 
  
  K2M
  2G2
  
 
 
  
  Tel:
  (613) 591 -7552
  
 
 
  
  Fax:
  (613) 591-0523
  
 
 
  
  1 (877) 388-6742
  
 
 
  
  www.wrappedapps.com
  
 
 
  
  
  
 











Re: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Ruth, Brice
Thanks for the pointer to your blog, between that and the example 
provided by the Tomcat docs, I was able to get what I was looking for - 
fully automated pre-compiling  deploying. Excellent!

Holman, Cal wrote:

I am using tomcat 5.0.12 and struts 1.1 with tiles and have been successful in precompiling.  The tomcat documentation has a pretty good example.  The hard part is translating someone else's directory structure into yours to apply all the examples.  I posted my solution to my web site at http://www.calandva.com/holmansite/do/blog/blogging 

I also use Eclipse for development but due to the number of steps and substitution in the various output xml and properties files still create the final product with ant - invoked in Eclipse or externally.  Not sure I explained it well enough and I left off my compile and war targets - let me know if you have questions.  

Cal

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003 10:14
To: Struts Users Mailing List
Subject: Eclipse + Ant + precompile - Tomcat
I've been doing some googling on having a webapp precompiled when
deployed to Tomcat via an Ant task and I'm a bit intimidated with what's
involved. Has anyone out there done this? Right now, I have an Ant build
setup as an external build in Eclipse that does a variety of things,
including building, packing up my WAR, and installing this WAR to Tomcat
using the catalina-ant install command that uses the management URL
and an external context file to install the webapp in a (local) running
Tomcat instance.
I'd like to follow-up the install with a directive to Tomcat to
precompile the JSPs in the web application - does anyone have an Ant
task that I could adapt to this purpose that they'd be willing to share?
Thanks!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above.  If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments.  If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Deploying struts application on iplanet 6.0 or 4.0

2003-10-31 Thread alok . garg
Hello ,
I want to deploy the struts application on iplanet 6.0 or 4.0.

Thanking you in advance...

Alok Garg
Polaris Software Lab Ltd.
( + 91 - 022 - 28290019 Ext. # 1308 )


This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

Re: Design decision for Globals class

2003-10-31 Thread Kirk Wylie
Craig R. McClanahan wrote:
Typesafe enums make sense when the underlying data really is an
enumeration of values that represents the total set of valid inputs to a
method.  This is true, for example, when the constants are the integer
subscripts into a fixed size array, and you want to avoid the
possibility of IndexOutOfBound exceptions.  (On the other hand, it makes
iterating through the values harder.)  I don't find them of much use
when the constants are Strings, because in most of those scenarios the
number of legal values is usually not limited -- the constants are just
well-known identifiers rather than being the only valid values.  For
example, it wouldn't make sense to define a typesafe enum class for
request attribute keys.
Another place I've found typesafe enumerations to be extremely useful is 
situations where the total set of values is fixed at compilation time 
(which is pretty much required for the pattern), and the constants 
themselves don't matter. In other words, you're just using them to 
create a well defined set for type safety, rather than caring about the 
constants themselves (I quite often use typesafe enumerations without 
underlying constants at all in fact).

Craig
Kirk Wylie
M7 Corporation
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Requiredif error?

2003-10-31 Thread Ramadoss Chinnakuzhandai
Try
 var-namefieldTest[0]/var-name
 
 
-Original Message-
From: Greg Hess [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 25, 2003 12:21 PM
To: Struts
Subject: Requiredif error?


Hi All,
 
I get the following error when I submit my form using the requiredif:
 
25 Oct 2003 12:03:13,311 - ERROR org.apache.commons.validator.Validator - reflection: 
null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:454)
at org.apache.commons.validator.Validator.validateField(Validator.java:544)
at org.apache.commons.validator.Validator.validate(Validator.java:582)
at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)
at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at 
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at 
com.caucho.http.security.SecurityFilter.doFilter(SecurityFilter.java:115)
at 
com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at 
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.NullPointerException
at 
org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldChecks.java:200)
... 23 more
 
My config is good:
 
form name=archiveRestoreForm
field
  property=archive
  depends=requiredif
  arg0 key=archiveRestoreForm.archiveFile/
var
  var-namefield[0]/var-name
  var-valueevent/var-value
  /var
  var
  var-namefield-test[0]/var-name
  var-valueNOTNULL/var-value
  /var  
/field
/form
 
If I switch the rule to required all is well. Any help is much appreciated.
 

Greg Hess

Software Engineer

Wrapped Apps Corporation

275 Michael Cowpland Dr.

Suite 201

Ottawa, Ontario

K2M 2G2

Tel: (613) 591 -7552

Fax: (613) 591-0523

1 (877) 388-6742

www.wrappedapps.com

 http://www.wrappedapps.com 
 


Re: Unit Test Actions

2003-10-31 Thread Ted Husted
Steven Woody wrote:
I skimmed through the code, but dont get a concrete ideal.  Does ProcessAction.java is a part of 'Scaffold'?  Would you please point me to a full documentation about the project?  Thanks!
There's some coverage in the book, but it's really not documented 
outside of the source code.


Ok, I'm abou to use WebTest.   And, if not so boring I still want to ask, how do you compare WebTest with Fitness?
Fitness is a general-purpose testing framework, with a special emphasis 
on acceptance testing. WebTest is focused on testing web sites. Period. 
A WebTest could be used as an client-level acceptance test, since it 
tests what the client's care about: the end result. But, a WebTest is 
not a replacement for a programmer's unit test. We need to catch most 
problems before they ever trickle down to the presentation.

Unlike FitNess and JUnit, WebTest is more like an end-user application 
than an engineering framework. The elements you use are already defined. 
You don't run around creating Java subclasses. You just write the XML 
script and then keep it updated. But since it's just a script, it's easy 
to update.

-Ted.



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


2 message resource files andmessages in Action class problem

2003-10-31 Thread Ashish Kulkarni
Hi,
I have 2 message resource file defines in my
struts-config file, it works perfect in jsp where i
can use bundle keyword on bean:message .. tag, but
it does not work in my action class where i want to
set messages from message resource
So 
bean:message key=approval.001  bundle=approvals/
works fine in jsp while


errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError(approval.001));
saveErrors(request, errors);
does not work in Action class and i get error bean not
found in scope on jsp when i try to display the
message
Ashish

__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



Re: 2 message resource files andmessages in Action class problem

2003-10-31 Thread atta-ur rehman
hi,

what do you mean by when i try to dispay it? are you using html:errors
tag or some other mechanism?

in your JSP page have you tried:

html:errors bundle=approval /

ATTA
- Original Message - 
From: Ashish Kulkarni [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 10:32 AM
Subject: 2 message resource files andmessages in Action class problem


 Hi,
 I have 2 message resource file defines in my
 struts-config file, it works perfect in jsp where i
 can use bundle keyword on bean:message .. tag, but
 it does not work in my action class where i want to
 set messages from message resource
 So
 bean:message key=approval.001  bundle=approvals/
 works fine in jsp while


 errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError(approval.001));
 saveErrors(request, errors);
 does not work in Action class and i get error bean not
 found in scope on jsp when i try to display the
 message
 Ashish

 __
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 http://launch.yahoo.com/promos/britneyspears/

 -
 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]How can i reply to the thread ???

2003-10-31 Thread Looser
[EMAIL PROTECTED] schrieb:

Your email client should prompt or have an option to use Reply-To  
instead of From address.

If not, just before you send it substitute 
[EMAIL PROTECTED] for the To address.
 

Ok , let´s try ...

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


forward ... redirect=true question

2003-10-31 Thread Chiming Huang
HI,
 
How does a brower request the main.jsp if forward to success from an action class?  
Does it add a http://hostname before the /main.jsp?  How does Struts get the 
hostname information?  Please see the action-mapping below.
 
Currently I am having problem if users access our logon page by IP address. We could 
not get the correct session for user info.  For example, http://1.2.3.4/logon.jsp.  
But our apache httpd.conf defines the ServerName to  a host name not IP address.  So, 
after forwarding to the success, the URL is changed to http://hostname/main.jsp.  Is 
there a way to work around this?
 
Thanks,
Chiming
 
 
My environment is
Apache 1.3.26
Tomcat 4.1.24
Struts 1.02
 
action-mappings
action path=/logon

forward name=success path=/main.jsp redirect=true/
/action
/action-mappings


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

sending object with query.

2003-10-31 Thread imran ali
Hi All,

I am sending a parameter with query request in this way:

script
function foo()
{
  url = /LoanGeniusWeb/pricingQuoteDetail.do?;
  url += object + 'abcd';
  document.quoteListForm.action = url;
  document.quoteListForm.submit();
}
/script

Now instead of 'abcd' If I want to pass a collection of object.
How should I do it. I tried it by replacing 'abcd' with a collection.
But it seems this is the way of passing 'parameters' not 'attributes'.
So even if I pass a collection in this way I am getting string representation of 
collection, not the collection object.
How should I go about it.
Help please. thanx a lot

Imran.



Imran

RE: Deploying struts application on iplanet 6.0 or 4.0

2003-10-31 Thread James Mitchell
You're welcome in advance.  Now, what's your question?



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 1:01 PM
 To: [EMAIL PROTECTED]
 Subject: Deploying struts application on iplanet 6.0 or 4.0
 
 
 Hello ,
 I want to deploy the struts application on iplanet 6.0 or 4.0.
 
 Thanking you in advance...
 
 Alok Garg
 Polaris Software Lab Ltd.
 ( + 91 - 022 - 28290019 Ext. # 1308 )
 
 
 


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



RE: Connection pool and MessageRessources

2003-10-31 Thread James Mitchell
As far as what will happen in the future, Struts will be using Resources
from the commons sandbox (well, once it is released).

You should take a look over there for more ideas.

Thanks and good luck!!



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 -Original Message-
 From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 11:30 AM
 To: Struts Users Mailing List
 Subject: Re: Connection pool and MessageRessources
 
 
 Yes I know it is very tighly integrated with Struts, and 
 actualy  we're comply
 with all things you've enumerated below.
 The validator will not be used because all validation 
 will be done with
 javascript already present in the jsp page, and the only 
 server side validation
 we'll have will be to find out if the client has disabled 
 javascript, and  we'll
 not be using bean:message beacause we'll not have a multi 
 language site.
 
 I know that my solution cannot be universally applied, and 
 it's just a way to
 overcome Struts limitations regarding the MessageRessources.
 I'll hope that in future versions something similar with your 
 extension could be
 integrated into Struts, because is a little bit frustrating 
 to manage error
 messages(for example) in two separate places (an Oracle table and
 application.properties as in my case).
 
 Thanks for your response, and I hope Id didn't took a lot of your time
 
 Ovidiu
 
 - Original Message - 
 From: James Mitchell [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 4:13 PM
 Subject: RE: Connection pool and MessageRessources
 
 
  You might not be realizing just how deeply the MesageResources is
  integrated with Struts.
 
  Your solution won't work if:
 
* your app is using the validator
 
* any of your jsp pages are using bean:message
 
* any of your jsp pages use tags that use MessageResources
  (which are any that use xyzKey such as srcKey,
   pageKey, altKey, etc)
 
 
  As far as application modification goes, the extension I
  created is a simple config change in struts-config, and voila!
 
 
  --
  James Mitchell
  Software Engineer / Struts Evangelist
  http://www.struts-atlanta.org
  678.910.8017 (c)
  770.822.3359 (h)
  AIM:jmitchtx
 
 
 
 
   -Original Message-
   From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
   Sent: Friday, October 31, 2003 7:23 AM
   To: Struts Users Mailing List
   Subject: Re: Connection pool and MessageRessources
  
  
   I think I've found a solution.
   I'll make an object (eventualy a struts PlugIn), DBMessage
   which receivies a
   connection from my connection pool and retrives the error
   messages from the
   database, and this object will not extend MessageRessources.
   Then in my actions I'll have :
  
   DbMessage dbmesg = (DbMessage)servlet.getAttribute(DBMESG);
   String  message = dbmesg.getMessage(error_code);
   ActionErrors errors = new ActionError();
   errors.add(code,new ActionError(foo,message));
  
   where foo is defined in my application.properties as
   foo = {0}
  
   How that sounds ?
  
  
   Ovidiu
  
   - Original Message - 
   From: James Mitchell [EMAIL PROTECTED]
   To: 'Struts Users Mailing List' [EMAIL PROTECTED]
   Sent: Thursday, October 30, 2003 7:18 PM
   Subject: RE: Connection pool and MessageRessources
  
  
Hi Ovidiu
   
I also wrote my own DBMessageResources.  With a simple
   hack, I was able
to overcome the limitations of the existing API.
   
The source code and example are available for download at:
   
   
   
   http://sourceforge.net/project/showfiles.php?group_id=49385re
   lease_id=1
54972
   
   
   
--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx
   
   
   
   
 -Original Message-
 From: Ovidiu EFTIMIE 
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 30, 2003 1:07 PM
 To: [EMAIL PROTECTED]
 Subject: Connection pool and MessageRessources


 Hi,
 I'm working with Struts 1.1 and I have a problem with the
 MessageRessource and I
 don't know to handle it  the right way.
 In my application I have two constraints,among others :) ,
 - i must use an oci connection to the database
 - the error messages will be stored in the database
 For that I took two aproaches :
 ## One ##:  I have written a Struts plugin which builds the
 connection pool, and
 I've extended MessageRessourceFactory and MessageRessources
 with my own classes
 DBRessourceFactory and DBRessource to have my own mechanism
 for message
 retrivial. My problem is now how can I get a connection to
 the database from the
 connection pool I've just made ? Is there a way to
 communicate between my plugin
 and my DBRessource class ?
  

Store object in application scope

2003-10-31 Thread Ruth, Brice
I'm writing a servlet that will do some init jobs and I'd like to be 
able to store some objects in application scope so that they are 
visible from my JSPs - how best would I go about doing this from a 
Servlet? My Servlet class is extending HttpServlet and I'm going to be 
implementing the init(ServletConfig), mainly.

Thanks!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: 2 message resource files andmessages in Action class problem

2003-10-31 Thread Ashish Kulkarni
Hi
yes if i do that it works fine, but my problem is the
following
some error messages come from maps.properties file,
which is default and some come from
approval.properties file, so is there a way to make a
single tag work for both

Ashish
--- atta-ur rehman [EMAIL PROTECTED] wrote:
 hi,
 
 what do you mean by when i try to dispay it? are
 you using html:errors
 tag or some other mechanism?
 
 in your JSP page have you tried:
 
 html:errors bundle=approval /
 
 ATTA
 - Original Message - 
 From: Ashish Kulkarni [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 10:32 AM
 Subject: 2 message resource files andmessages in
 Action class problem
 
 
  Hi,
  I have 2 message resource file defines in my
  struts-config file, it works perfect in jsp where
 i
  can use bundle keyword on bean:message .. tag,
 but
  it does not work in my action class where i want
 to
  set messages from message resource
  So
  bean:message key=approval.001 
 bundle=approvals/
  works fine in jsp while
 
 
  errors.add(ActionErrors.GLOBAL_ERROR,
 new
 ActionError(approval.001));
  saveErrors(request, errors);
  does not work in Action class and i get error bean
 not
  found in scope on jsp when i try to display the
  message
  Ashish
 
  __
  Do you Yahoo!?
  Exclusive Video Premiere - Britney Spears
  http://launch.yahoo.com/promos/britneyspears/
 
 

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

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


__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



Re: Store object in application scope

2003-10-31 Thread Ruth, Brice
Nevermind, I think I have it, thanks.

Ruth, Brice wrote:

I'm writing a servlet that will do some init jobs and I'd like to be 
able to store some objects in application scope so that they are 
visible from my JSPs - how best would I go about doing this from a 
Servlet? My Servlet class is extending HttpServlet and I'm going to be 
implementing the init(ServletConfig), mainly.

Thanks!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: 2 message resource files andmessages in Action class problem

2003-10-31 Thread atta-ur rehman
i'll add two tags in the jsp page!

html:errors /
html:errors bundle=approval /

ATTA
- Original Message - 
From: Ashish Kulkarni [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 11:21 AM
Subject: Re: 2 message resource files andmessages in Action class problem


 Hi
 yes if i do that it works fine, but my problem is the
 following
 some error messages come from maps.properties file,
 which is default and some come from
 approval.properties file, so is there a way to make a
 single tag work for both
 
 Ashish
 --- atta-ur rehman [EMAIL PROTECTED] wrote:
  hi,
  
  what do you mean by when i try to dispay it? are
  you using html:errors
  tag or some other mechanism?
  
  in your JSP page have you tried:
  
  html:errors bundle=approval /
  
  ATTA
  - Original Message - 
  From: Ashish Kulkarni [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 10:32 AM
  Subject: 2 message resource files andmessages in
  Action class problem
  
  
   Hi,
   I have 2 message resource file defines in my
   struts-config file, it works perfect in jsp where
  i
   can use bundle keyword on bean:message .. tag,
  but
   it does not work in my action class where i want
  to
   set messages from message resource
   So
   bean:message key=approval.001 
  bundle=approvals/
   works fine in jsp while
  
  
   errors.add(ActionErrors.GLOBAL_ERROR,
  new
  ActionError(approval.001));
   saveErrors(request, errors);
   does not work in Action class and i get error bean
  not
   found in scope on jsp when i try to display the
   message
   Ashish
  
   __
   Do you Yahoo!?
   Exclusive Video Premiere - Britney Spears
   http://launch.yahoo.com/promos/britneyspears/
  
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
  
  
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 http://launch.yahoo.com/promos/britneyspears/
 
 -
 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: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread David Erickson
We currently have an ant function that just builds the directory structure
of a deployed webapp then points tomcat at that build directory.. is there
anyway to precompile the jsps in this situation without creating a war?  And
how does tomcat know to goto the precompiled files when a request for the
actual jsp comes in?
thanks,
David

- Original Message - 
From: Ruth, Brice [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 10:45 AM
Subject: Re: Eclipse + Ant + precompile - Tomcat


 Thanks for the pointer to your blog, between that and the example
 provided by the Tomcat docs, I was able to get what I was looking for -
 fully automated pre-compiling  deploying. Excellent!

 Holman, Cal wrote:

 I am using tomcat 5.0.12 and struts 1.1 with tiles and have been
successful in precompiling.  The tomcat documentation has a pretty good
example.  The hard part is translating someone else's directory structure
into yours to apply all the examples.  I posted my solution to my web site
at http://www.calandva.com/holmansite/do/blog/blogging
 
 I also use Eclipse for development but due to the number of steps and
substitution in the various output xml and properties files still create the
final product with ant - invoked in Eclipse or externally.  Not sure I
explained it well enough and I left off my compile and war targets - let me
know if you have questions.
 
 Cal
 
 -Original Message-
 From: Ruth, Brice [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 10:14
 To: Struts Users Mailing List
 Subject: Eclipse + Ant + precompile - Tomcat
 
 I've been doing some googling on having a webapp precompiled when
 deployed to Tomcat via an Ant task and I'm a bit intimidated with what's
 involved. Has anyone out there done this? Right now, I have an Ant build
 setup as an external build in Eclipse that does a variety of things,
 including building, packing up my WAR, and installing this WAR to Tomcat
 using the catalina-ant install command that uses the management URL
 and an external context file to install the webapp in a (local) running
 Tomcat instance.
 
 I'd like to follow-up the install with a directive to Tomcat to
 precompile the JSPs in the web application - does anyone have an Ant
 task that I could adapt to this purpose that they'd be willing to share?
 
 Thanks!
 
 --
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 Learn more about Paymentech's payment processing services at
www.paymentech.com
 THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments
are proprietary and confidential information intended only for the use of
the recipient(s) named above.  If you are not the intended recipient, you
may not print, distribute, or copy this message or any attachments.  If you
have received this communication in error, please notify the sender by
return e-mail and delete this message and any attachments from your
computer.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.



 -
 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: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Ruth, Brice
Yep, the same setup works in that situation - and the way Tomcat knows 
to use the precompiled JSPs is that special entries for each of the 
servlets generated from jasper (the JSP compiler) are entered into the 
web.xml file (this, of course, can be automated).

David Erickson wrote:

We currently have an ant function that just builds the directory structure
of a deployed webapp then points tomcat at that build directory.. is there
anyway to precompile the jsps in this situation without creating a war?  And
how does tomcat know to goto the precompiled files when a request for the
actual jsp comes in?
thanks,
David
- Original Message - 
From: Ruth, Brice [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 10:45 AM
Subject: Re: Eclipse + Ant + precompile - Tomcat

 

Thanks for the pointer to your blog, between that and the example
provided by the Tomcat docs, I was able to get what I was looking for -
fully automated pre-compiling  deploying. Excellent!
Holman, Cal wrote:

   

I am using tomcat 5.0.12 and struts 1.1 with tiles and have been
 

successful in precompiling.  The tomcat documentation has a pretty good
example.  The hard part is translating someone else's directory structure
into yours to apply all the examples.  I posted my solution to my web site
at http://www.calandva.com/holmansite/do/blog/blogging
 

I also use Eclipse for development but due to the number of steps and
 

substitution in the various output xml and properties files still create the
final product with ant - invoked in Eclipse or externally.  Not sure I
explained it well enough and I left off my compile and war targets - let me
know if you have questions.
 

Cal

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003 10:14
To: Struts Users Mailing List
Subject: Eclipse + Ant + precompile - Tomcat
I've been doing some googling on having a webapp precompiled when
deployed to Tomcat via an Ant task and I'm a bit intimidated with what's
involved. Has anyone out there done this? Right now, I have an Ant build
setup as an external build in Eclipse that does a variety of things,
including building, packing up my WAR, and installing this WAR to Tomcat
using the catalina-ant install command that uses the management URL
and an external context file to install the webapp in a (local) running
Tomcat instance.
I'd like to follow-up the install with a directive to Tomcat to
precompile the JSPs in the web application - does anyone have an Ant
task that I could adapt to this purpose that they'd be willing to share?
Thanks!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Learn more about Paymentech's payment processing services at
 

www.paymentech.com
 

THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments
 

are proprietary and confidential information intended only for the use of
the recipient(s) named above.  If you are not the intended recipient, you
may not print, distribute, or copy this message or any attachments.  If you
have received this communication in error, please notify the sender by
return e-mail and delete this message and any attachments from your
computer.
 

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


 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


idName attribute not in nested:radio TLD file

2003-10-31 Thread Nate Bowler
Is there a reason for this? I need this attribute, so I just added it to the
TLD myself. It seems to work fine. Is it an oversight?

I only did a quick check, but I couldn't see from the source code why this
wouldn't be in there.

Nate Bowler


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



Re: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread David Erickson
What values are expected to go into
jasper2 validateXml=false

uriroot=/salesweb

webXmlFragment=${WEB-INF.dir}/generated_web.xml

outputDir=${WEB-INF.dir}/src /

the uriroot, webXMLFragment, and outputDir?  Are they the full path names on
the local file system? like c:\whatever or /home/whatever  or is it web
context path stuff like /salesweb/WEB-INF or whatever?

Thanks

David

- Original Message - 
From: Ruth, Brice [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 12:42 PM
Subject: Re: Eclipse + Ant + precompile - Tomcat


 Yep, the same setup works in that situation - and the way Tomcat knows
 to use the precompiled JSPs is that special entries for each of the
 servlets generated from jasper (the JSP compiler) are entered into the
 web.xml file (this, of course, can be automated).

 David Erickson wrote:

 We currently have an ant function that just builds the directory
structure
 of a deployed webapp then points tomcat at that build directory.. is
there
 anyway to precompile the jsps in this situation without creating a war?
And
 how does tomcat know to goto the precompiled files when a request for the
 actual jsp comes in?
 thanks,
 David
 
 - Original Message - 
 From: Ruth, Brice [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 10:45 AM
 Subject: Re: Eclipse + Ant + precompile - Tomcat
 
 
 
 
 Thanks for the pointer to your blog, between that and the example
 provided by the Tomcat docs, I was able to get what I was looking for -
 fully automated pre-compiling  deploying. Excellent!
 
 Holman, Cal wrote:
 
 
 
 I am using tomcat 5.0.12 and struts 1.1 with tiles and have been
 
 
 successful in precompiling.  The tomcat documentation has a pretty good
 example.  The hard part is translating someone else's directory structure
 into yours to apply all the examples.  I posted my solution to my web
site
 at http://www.calandva.com/holmansite/do/blog/blogging
 
 
 I also use Eclipse for development but due to the number of steps and
 
 
 substitution in the various output xml and properties files still create
the
 final product with ant - invoked in Eclipse or externally.  Not sure I
 explained it well enough and I left off my compile and war targets - let
me
 know if you have questions.
 
 
 Cal
 
 -Original Message-
 From: Ruth, Brice [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 10:14
 To: Struts Users Mailing List
 Subject: Eclipse + Ant + precompile - Tomcat
 
 I've been doing some googling on having a webapp precompiled when
 deployed to Tomcat via an Ant task and I'm a bit intimidated with
what's
 involved. Has anyone out there done this? Right now, I have an Ant
build
 setup as an external build in Eclipse that does a variety of things,
 including building, packing up my WAR, and installing this WAR to
Tomcat
 using the catalina-ant install command that uses the management URL
 and an external context file to install the webapp in a (local) running
 Tomcat instance.
 
 I'd like to follow-up the install with a directive to Tomcat to
 precompile the JSPs in the web application - does anyone have an Ant
 task that I could adapt to this purpose that they'd be willing to
share?
 
 Thanks!
 
 --
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 Learn more about Paymentech's payment processing services at
 
 
 www.paymentech.com
 
 
 THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments
 
 
 are proprietary and confidential information intended only for the use of
 the recipient(s) named above.  If you are not the intended recipient, you
 may not print, distribute, or copy this message or any attachments.  If
you
 have received this communication in error, please notify the sender by
 return e-mail and delete this message and any attachments from your
 computer.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
 -
 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]
 
 
 

 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.



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




-
To unsubscribe, e-mail: [EMAIL 

RE: Store object in application scope

2003-10-31 Thread Richard J. Duncan
getServletContext.setAttribute(...)

Regards,
 
Rich


-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 2:20 PM
To: Struts Users Mailing List
Subject: Store object in application scope

I'm writing a servlet that will do some init jobs and I'd like to be 
able to store some objects in application scope so that they are 
visible from my JSPs - how best would I go about doing this from a 
Servlet? My Servlet class is extending HttpServlet and I'm going to be 
implementing the init(ServletConfig), mainly.

Thanks!

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



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



RE: Store object in application scope

2003-10-31 Thread Wiebe de Jong
I do the same thing. Here is a code snippet:

public class AppStart extends HttpServlet {

// this will execute at startup
public void init() throws ServletException {

  // province/state list
  ArrayList provList = new ArrayList();

  getServletContext().setAttribute(appProvList, provList);

Wiebe de Jong
http://frontierj.blogspot.com 

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 11:20 AM
To: Struts Users Mailing List
Subject: Store object in application scope

I'm writing a servlet that will do some init jobs and I'd like to be 
able to store some objects in application scope so that they are 
visible from my JSPs - how best would I go about doing this from a 
Servlet? My Servlet class is extending HttpServlet and I'm going to be 
implementing the init(ServletConfig), mainly.

Thanks!

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



-
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: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread David Erickson
Ok I solved that question its looking for an exact directory.  But now I'm
getting this error when trying to build:
java.lang.NoClassDefFoundError:
org/apache/xerces/impl/XMLNSDocumentScannerImpl$NSContentDispatcher

And I made sure that my path has the newest versions of the xerces jars...
any ideas?

Here is my build file

target name=jspc

delete dir=${WEB-INF.dir}/src/

taskdef name=jasper2 classname=org.apache.jasper.JspC 

classpath id=jspc.classpath

pathelement location=${java.home}/../lib/tools.jar/

fileset dir=${tomcat.home}/server/lib

include name=*.jar/

/fileset

fileset dir=${tomcat.home}/common/lib

include name=*.jar/

/fileset

fileset dir=${basedir}/web/WEB-INF/lib

include name=*.jar/

/fileset

/classpath

/taskdef

mkdir dir=${WEB-INF.dir}/src/

jasper2 validateXml=false

uriroot=c:\projects\salesweb\build

webXmlFragment=c:\projects\salesweb\uild\WEB-INF\generated_web.xml

outputDir=c:\projects\salesweb\uild\WEB-INF\src /

/target



the xerces jars are in eveyr one of the fileset include dirs.. what gives?

-David

- Original Message - 
From: David Erickson [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 1:10 PM
Subject: Re: Eclipse + Ant + precompile - Tomcat


 What values are expected to go into
 jasper2 validateXml=false

 uriroot=/salesweb

 webXmlFragment=${WEB-INF.dir}/generated_web.xml

 outputDir=${WEB-INF.dir}/src /

 the uriroot, webXMLFragment, and outputDir?  Are they the full path names
on
 the local file system? like c:\whatever or /home/whatever  or is it web
 context path stuff like /salesweb/WEB-INF or whatever?

 Thanks

 David

 - Original Message - 
 From: Ruth, Brice [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 12:42 PM
 Subject: Re: Eclipse + Ant + precompile - Tomcat


  Yep, the same setup works in that situation - and the way Tomcat knows
  to use the precompiled JSPs is that special entries for each of the
  servlets generated from jasper (the JSP compiler) are entered into the
  web.xml file (this, of course, can be automated).
 
  David Erickson wrote:
 
  We currently have an ant function that just builds the directory
 structure
  of a deployed webapp then points tomcat at that build directory.. is
 there
  anyway to precompile the jsps in this situation without creating a war?
 And
  how does tomcat know to goto the precompiled files when a request for
the
  actual jsp comes in?
  thanks,
  David
  
  - Original Message - 
  From: Ruth, Brice [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 10:45 AM
  Subject: Re: Eclipse + Ant + precompile - Tomcat
  
  
  
  
  Thanks for the pointer to your blog, between that and the example
  provided by the Tomcat docs, I was able to get what I was looking
for -
  fully automated pre-compiling  deploying. Excellent!
  
  Holman, Cal wrote:
  
  
  
  I am using tomcat 5.0.12 and struts 1.1 with tiles and have been
  
  
  successful in precompiling.  The tomcat documentation has a pretty good
  example.  The hard part is translating someone else's directory
structure
  into yours to apply all the examples.  I posted my solution to my web
 site
  at http://www.calandva.com/holmansite/do/blog/blogging
  
  
  I also use Eclipse for development but due to the number of steps and
  
  
  substitution in the various output xml and properties files still
create
 the
  final product with ant - invoked in Eclipse or externally.  Not sure I
  explained it well enough and I left off my compile and war targets -
let
 me
  know if you have questions.
  
  
  Cal
  
  -Original Message-
  From: Ruth, Brice [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 10:14
  To: Struts Users Mailing List
  Subject: Eclipse + Ant + precompile - Tomcat
  
  I've been doing some googling on having a webapp precompiled when
  deployed to Tomcat via an Ant task and I'm a bit intimidated with
 what's
  involved. Has anyone out there done this? Right now, I have an Ant
 build
  setup as an external build in Eclipse that does a variety of things,
  including building, packing up my WAR, and installing this WAR to
 Tomcat
  using the catalina-ant install command that uses the management URL
  and an external context file to install the webapp in a (local)
running
  Tomcat instance.
  
  I'd like to follow-up the install with a directive to Tomcat to
  precompile the JSPs in the web application - does anyone have an Ant
  task that I could adapt to this purpose that they'd be willing to
 share?
  
  Thanks!
  
  --
  Brice D. Ruth
  Sr. IT Analyst
  Fiskars Brands, Inc.
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  Learn more about Paymentech's payment processing services at
  
  
  www.paymentech.com
  
  
  

Re: Store object in application scope

2003-10-31 Thread Ruth, Brice
OK, I'm having very little luck with this. I'm trying to pre-parse an 
XML document that is used by a few different JSPs, so that each of them 
doesn't need to do a c:import and x:parse - I've checked the source 
for the JSTL XML ParseSupport class to see what its doing, and it seems 
pretty basic (I'm not using filters, so its a bit simpler). I save the 
org.w3c.dom.Document to application scope, then, within the JSP, I do:

jsp:useBean id=varName class=org.w3c.dom.Document/

I'm getting an exception thrown of type java.lang.InstantiationException 
... correct me if I'm wrong, but if its actually finding my object in 
Application scope, then it shouldn't be throwing this, right? Do I need 
the jsp:useBean at all? Or can I just start using $varName in my 
x:forEach statements, straight-away?

Wiebe de Jong wrote:

I do the same thing. Here is a code snippet:

public class AppStart extends HttpServlet {

// this will execute at startup
public void init() throws ServletException {
 // province/state list
 ArrayList provList = new ArrayList();
 getServletContext().setAttribute(appProvList, provList);

Wiebe de Jong
http://frontierj.blogspot.com 

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 11:20 AM
To: Struts Users Mailing List
Subject: Store object in application scope

I'm writing a servlet that will do some init jobs and I'd like to be 
able to store some objects in application scope so that they are 
visible from my JSPs - how best would I go about doing this from a 
Servlet? My Servlet class is extending HttpServlet and I'm going to be 
implementing the init(ServletConfig), mainly.

Thanks!

 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


RE: Deploying struts application on iplanet 6.0 or 4.0

2003-10-31 Thread alok . garg

I want to deploy my Struts application which is running in Tomcat in
iplanet server version 6.0. with no service packs

Alok Garg
Polaris Software Lab Ltd.
( + 91 - 022 - 28290019 Ext. # 1308 )


   
  
  James Mitchell 
  
  [EMAIL PROTECTED] To:  'Struts Users Mailing 
List' [EMAIL PROTECTED]   
  e.org   cc:  (bcc: alok.garg/Polaris)   
  
   Subject: RE: Deploying struts 
application on iplanet 6.0 or 4.0   
  11/01/03 12:40   
  
  AM   
  
  Please respond   
  
  to Struts Users 
  
  Mailing List
  
   
  
   
  




You're welcome in advance.  Now, what's your question?



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 1:01 PM
 To: [EMAIL PROTECTED]
 Subject: Deploying struts application on iplanet 6.0 or 4.0


 Hello ,
 I want to deploy the struts application on iplanet 6.0 or 4.0.

 Thanking you in advance...

 Alok Garg
 Polaris Software Lab Ltd.
 ( + 91 - 022 - 28290019 Ext. # 1308 )





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






This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

Re: sending object with query.

2003-10-31 Thread Manish Singla
attribute ( and getAttribute ) is utility of java servlet container.
You cannot have attributes in client script...
General HTTP request do not support attribute.
imran ali wrote:
Hi All,

I am sending a parameter with query request in this way:

script
function foo()
{
  url = /LoanGeniusWeb/pricingQuoteDetail.do?;
  url += object + 'abcd';
  document.quoteListForm.action = url;
  document.quoteListForm.submit();
}
/script
Now instead of 'abcd' If I want to pass a collection of object.
How should I do it. I tried it by replacing 'abcd' with a collection.
But it seems this is the way of passing 'parameters' not 'attributes'.
So even if I pass a collection in this way I am getting string representation of 
collection, not the collection object.
How should I go about it.
Help please. thanx a lot
Imran.



Imran


--
Thanks
Manish Singla
x73166
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Deploying struts application on iplanet 6.0 or 4.0

2003-10-31 Thread James Mitchell
You will need to upgrade to 6.1.  If I were you, I wouldn't waste my
time trying anything less.

If your customer/boss says they can't or won't, tell them that they will
spend more time trying to make it work then they ever would have if
they had just upgraded...trust me!



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 31, 2003 4:06 PM
 To: Struts Users Mailing List
 Subject: RE: Deploying struts application on iplanet 6.0 or 4.0
 
 
 
 I want to deploy my Struts application which is running in Tomcat in
 iplanet server version 6.0. with no service packs
 
 Alok Garg
 Polaris Software Lab Ltd.
 ( + 91 - 022 - 28290019 Ext. # 1308 )
 
 
   

   James Mitchell

   [EMAIL PROTECTED] To:  
 'Struts Users Mailing List' 
 [EMAIL PROTECTED]   
   e.org   cc:  (bcc: 
 alok.garg/Polaris) 
Subject: RE: 
 Deploying struts application on iplanet 6.0 or 4.0   
   11/01/03 12:40  

   AM  

   Please respond  

   to Struts Users

   Mailing List   

   

   

 
 
 
 
 You're welcome in advance.  Now, what's your question?
 
 
 
 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017 (c)
 770.822.3359 (h)
 AIM:jmitchtx
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 1:01 PM
  To: [EMAIL PROTECTED]
  Subject: Deploying struts application on iplanet 6.0 or 4.0
 
 
  Hello ,
  I want to deploy the struts application on iplanet 6.0 or 4.0.
 
  Thanking you in advance...
 
  Alok Garg
  Polaris Software Lab Ltd.
  ( + 91 - 022 - 28290019 Ext. # 1308 )
 
 
 
 
 
 -
 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: Store object in application scope

2003-10-31 Thread Nail, Evan Burke

Hey Brice, 

I would agree I don't think it's finding your bean, as a result its trying to 
instantiate a Document object, and of course being an interface Document doesn't like 
someone trying to instantiate it. 

If your object is in the app scope, your should just be able to use it. 

You could try doing a logic present tag and test to see if its really there. Otherwise 
you can always just enumerate through the attribute names/elements in the servlet 
context and see what's there. 

bn


-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003 2:47 PM
To: Struts Users Mailing List
Subject: Re: Store object in application scope


OK, I'm having very little luck with this. I'm trying to pre-parse an 
XML document that is used by a few different JSPs, so that each of them 
doesn't need to do a c:import and x:parse - I've checked the source 
for the JSTL XML ParseSupport class to see what its doing, and it seems 
pretty basic (I'm not using filters, so its a bit simpler). I save the 
org.w3c.dom.Document to application scope, then, within the JSP, I do:

jsp:useBean id=varName class=org.w3c.dom.Document/

I'm getting an exception thrown of type java.lang.InstantiationException 
... correct me if I'm wrong, but if its actually finding my object in 
Application scope, then it shouldn't be throwing this, right? Do I need 
the jsp:useBean at all? Or can I just start using $varName in my 
x:forEach statements, straight-away?

Wiebe de Jong wrote:

I do the same thing. Here is a code snippet:

public class AppStart extends HttpServlet {

// this will execute at startup
public void init() throws ServletException {

  // province/state list
  ArrayList provList = new ArrayList();

  getServletContext().setAttribute(appProvList, provList);

Wiebe de Jong
http://frontierj.blogspot.com 

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2003 11:20 AM
To: Struts Users Mailing List
Subject: Store object in application scope

I'm writing a servlet that will do some init jobs and I'd like to be 
able to store some objects in application scope so that they are 
visible from my JSPs - how best would I go about doing this from a 
Servlet? My Servlet class is extending HttpServlet and I'm going to be 
implementing the init(ServletConfig), mainly.

Thanks!

  


-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



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



**
This e-mail is the property of Enron Corp. and/or its relevant affiliate and may 
contain confidential and privileged material for the sole use of the intended 
recipient (s). Any review, use, distribution or disclosure by others is strictly 
prohibited. If you are not the intended recipient (or authorized to receive for the 
recipient), please contact the sender or reply to Enron Corp. at [EMAIL PROTECTED] and 
delete all copies of the message. This e-mail (and any attachments hereto) are not 
intended to be an offer (or an acceptance) and do not create or evidence a binding and 
enforceable contract between Enron Corp. (or any of its affiliates) and the intended 
recipient or any other party, and may not be relied on by anyone as the basis of a 
contract by estoppel or otherwise. Thank you. 
**


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



RE: Eclipse + Ant + precompile - Tomcat

2003-10-31 Thread Holman, Cal
The jasper2 taskdef should not need your own lib directory - it should load with the 
tomcat and jdk libs.  If so then it is using tomcat's xerces and all should be ok.  
Also it looks like you have some \ in the wrong place.  The build directory that the 
URI root points 2 should be the root directory of you exploded web app - in this case 
build

It is better when debugging to use all absolute references then create variables - you 
seem to reference what should be the same directory structure with 
${basedir}/web/WEB-INF/lib,  ${WEB-INF.dir}/src, and c:\projects\salesweb\build.  
It helps when trying to figure out what you are trying to do.

If you are creating an exploded war then after you compile and move your files you can 
compile the jsps in the same directory - the only cleanup would be to add the 
generated xml into your web.xml.

Cal

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003 15:33
To: Struts Users Mailing List
Subject: Re: Eclipse + Ant + precompile - Tomcat

Ok I solved that question its looking for an exact directory.  But now I'm
getting this error when trying to build:
java.lang.NoClassDefFoundError:
org/apache/xerces/impl/XMLNSDocumentScannerImpl$NSContentDispatcher

And I made sure that my path has the newest versions of the xerces jars...
any ideas?

Here is my build file

target name=jspc

delete dir=${WEB-INF.dir}/src/

taskdef name=jasper2 classname=org.apache.jasper.JspC 

classpath id=jspc.classpath

pathelement location=${java.home}/../lib/tools.jar/

fileset dir=${tomcat.home}/server/lib

include name=*.jar/

/fileset

fileset dir=${tomcat.home}/common/lib

include name=*.jar/

/fileset

fileset dir=${basedir}/web/WEB-INF/lib

include name=*.jar/

/fileset

/classpath

/taskdef

mkdir dir=${WEB-INF.dir}/src/

jasper2 validateXml=false

uriroot=c:\projects\salesweb\build

webXmlFragment=c:\projects\salesweb\uild\WEB-INF\generated_web.xml

outputDir=c:\projects\salesweb\uild\WEB-INF\src /

/target



the xerces jars are in eveyr one of the fileset include dirs.. what gives?

-David

- Original Message -
From: David Erickson [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 1:10 PM
Subject: Re: Eclipse + Ant + precompile - Tomcat


 What values are expected to go into
 jasper2 validateXml=false

 uriroot=/salesweb

 webXmlFragment=${WEB-INF.dir}/generated_web.xml

 outputDir=${WEB-INF.dir}/src /

 the uriroot, webXMLFragment, and outputDir?  Are they the full path names
on
 the local file system? like c:\whatever or /home/whatever  or is it web
 context path stuff like /salesweb/WEB-INF or whatever?

 Thanks

 David

 - Original Message -
 From: Ruth, Brice [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 12:42 PM
 Subject: Re: Eclipse + Ant + precompile - Tomcat


  Yep, the same setup works in that situation - and the way Tomcat knows
  to use the precompiled JSPs is that special entries for each of the
  servlets generated from jasper (the JSP compiler) are entered into the
  web.xml file (this, of course, can be automated).
 
  David Erickson wrote:
 
  We currently have an ant function that just builds the directory
 structure
  of a deployed webapp then points tomcat at that build directory.. is
 there
  anyway to precompile the jsps in this situation without creating a war?
 And
  how does tomcat know to goto the precompiled files when a request for
the
  actual jsp comes in?
  thanks,
  David
  
  - Original Message -
  From: Ruth, Brice [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 10:45 AM
  Subject: Re: Eclipse + Ant + precompile - Tomcat
  
  
  
  
  Thanks for the pointer to your blog, between that and the example
  provided by the Tomcat docs, I was able to get what I was looking
for -
  fully automated pre-compiling  deploying. Excellent!
  
  Holman, Cal wrote:
  
  
  
  I am using tomcat 5.0.12 and struts 1.1 with tiles and have been
  
  
  successful in precompiling.  The tomcat documentation has a pretty good
  example.  The hard part is translating someone else's directory
structure
  into yours to apply all the examples.  I posted my solution to my web
 site
  at http://www.calandva.com/holmansite/do/blog/blogging
  
  
  I also use Eclipse for development but due to the number of steps and
  
  
  substitution in the various output xml and properties files still
create
 the
  final product with ant - invoked in Eclipse or externally.  Not sure I
  explained it well enough and I left off my compile and war targets -
let
 me
  know if you have questions.
  
  
  Cal
  
  -Original Message-
  From: Ruth, Brice [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 31, 2003 10:14
  To: Struts Users Mailing List
  Subject: Eclipse + Ant + precompile - Tomcat
  
  I've been doing some googling on having a webapp 

dtd check on validation.xml: date pattern

2003-10-31 Thread Robert Lamping
I made a stupid mistake. I intended to validate a date and entered the
following

field property=datumIngediend
depends=required, date
arg0 key=aanvraagForm.datumingediend.toonnaam/
var
var-namePattern/var-name
var-valuedd-MM-/var-value
/var
/field

On one machine this worked, as the DateFormat.SHORT format was obviously the
one I intended.
But at my laptop fortunately this didn't work, so I found the error. 

Pattern of course should be datePattern or datePatternStrict.

I tried to check the validation.xml with the dtd by adding the dtd to the
XML file and placing the dtd-file in the same directory as the
validation.xml.
With a XML plugin for Eclipse I can validate the 

!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  validation_1_1.dtd

I would like to limit var-name to certain values. Like datePattern, min,
max, maxLenght etc. 
As I don't know enough about DTDs, my question is: how do I built in such a
dtd-check?

Kind regards,

Robert Lamping
The Netherlands


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



Buttons in Struts

2003-10-31 Thread Caroline Jen
We have html:submit for the submit buttion in
struts.  I am trying to add some additional features
to the submit button:

BUTTON TYPE=submit NAME=submit VALUE=submit
STYLE=font: 10pt Arial Black; background:Teal
width:75px; height:25pxRead/Send Mails/BUTTON

I wonder if there is something like it in struts.

__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



RE: dtd check on validation.xml: date pattern

2003-10-31 Thread Yansheng Lin
I think you can do something like this:

!ELEMENT var-name (datePattern| min | max | maxLenght)

Don't know exact syntax though unfortunately:).


-Original Message-
From: Robert Lamping [mailto:[EMAIL PROTECTED] 
Sent: October 31, 2003 4:09 PM
To: Struts Users Mailing List
Subject: dtd check on validation.xml: date pattern


I made a stupid mistake. I intended to validate a date and entered the
following

field property=datumIngediend
depends=required, date
arg0 key=aanvraagForm.datumingediend.toonnaam/
var
var-namePattern/var-name
var-valuedd-MM-/var-value
/var
/field

On one machine this worked, as the DateFormat.SHORT format was obviously the
one I intended.
But at my laptop fortunately this didn't work, so I found the error. 

Pattern of course should be datePattern or datePatternStrict.

I tried to check the validation.xml with the dtd by adding the dtd to the
XML file and placing the dtd-file in the same directory as the
validation.xml.
With a XML plugin for Eclipse I can validate the 

!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  validation_1_1.dtd

I would like to limit var-name to certain values. Like datePattern, min,
max, maxLenght etc. 
As I don't know enough about DTDs, my question is: how do I built in such a
dtd-check?

Kind regards,

Robert Lamping
The Netherlands


-
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: Buttons in Struts

2003-10-31 Thread Takis Diakoumis
there is a style tag in the dtd.

use as you have in your example.

html:submit style=font: 10pt Arial Black; background:Teal width:75px;
height:25px



- Original Message - 
From: Caroline Jen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 01, 2003 10:31 AM
Subject: Buttons in Struts


 We have html:submit for the submit buttion in
 struts.  I am trying to add some additional features
 to the submit button:

 BUTTON TYPE=submit NAME=submit VALUE=submit
 STYLE=font: 10pt Arial Black; background:Teal
 width:75px; height:25pxRead/Send Mails/BUTTON

 I wonder if there is something like it in struts.

 __
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 http://launch.yahoo.com/promos/britneyspears/

 -
 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: use html:link pass two param

2003-10-31 Thread javen fang
Thanks all, thanks James Mitchell!

I use the method James Mitchell tell me.
And I read JSTL Spec and tutorial in javaword.com
http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl-p3.html

But I encouter a error,and I don't know why this
occur:

javax.servlet.ServletException: Invalid property in
set:  cid

These are my code:
jsp:useBean id=cus class=java.util.HashMap/
...
  c:set target=${cus} property=cid
value=list.id/
  c:set target=${cus} property=company
value=list.company/
html:link action=linkman_list
name=cusLinkman/html:link

My container is tomcat5.0

--- Kris Schneider [EMAIL PROTECTED] wrote:
 You can call it whatever you want - admin-tool
 from James' example. The
 difference is this:
 
 /app/do/manageUsers
 
 vs. this:
 
 /app/manageUsers.do
 
 I think James was referring to the use of:
 
 html:link action=next.do ...
 
 when he said, you should never have to put .do
 any where in your
 application... You really only need to do:
 
 html:link action=/next ...
 
 which will work regardless of how you do your
 servlet mapping.
 
 Quoting Ruth, Brice [EMAIL PROTECTED]:
 
  doesn't this still put 'do' somewhere in the URL?
  
  Kris Schneider wrote:
  
  web.xml:
  
  !-- mapping for ActionServlet --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern/do/*/url-pattern
  /servlet-mapping
  
  Quoting Ruth, Brice [EMAIL PROTECTED]:
  

  
  How do you go about enabling path mapping v.
 extension mapping in 
  web.xml (or struts-config.xml)?
  
  James Mitchell wrote:
  
  
  
  First of all, you should never have to put
 .do any where in your
  application except the web.xml file.
  That way, you change the mapping in one place
 and it flows to the rest
  of the application.
  
  Here's what I do:
  
  
  %@ page contentType=text/html;charset=UTF-8
 language=java %
  %@ taglib uri=/WEB-INF/struts-html.tld 
 prefix=html %
  %@ taglib uri=http://java.sun.com/jstl/core;
 prefix=c%
  
  
  jsp:useBean id=userDetailLink
 class=java.util.HashMap/
  
  c:set target=${userDetailLink}
 property=action value=editUser/
  c:set target=${userDetailLink} property=id
 value=${user.id}/
  
  html:link action=/manageUsers
 name=userDetailLink
   Edit this user
  /html:link
  
  
  
  Which produces a link like this:
  
  a

href=/app/admin-tool/manageUsers?action=editUseramp;id=44Edit
  this user/a
  
  
  The above example uses path mapping, but if I
 were using extension
  mapping (*.do), it looks like this:
  
  (with no changes to the source jsp)
  
  a

href=/app/manageUsers.do?action=editUseramp;id=44Edit
 this
  user/a
  
  
  
  --
  James Mitchell
  Software Engineer / Struts Evangelist
  http://www.struts-atlanta.org
  678.910.8017 (c)
  770.822.3359 (h)
  AIM:jmitchtx
  
  
  
  
   
  

  
  -Original Message-
  From: javen fang
 [mailto:[EMAIL PROTECTED] 
  Sent: Friday, October 31, 2003 1:58 AM
  To: struts
  Subject: use html:link pass two param
  
  
  I have a bean list that have two property id /
 name
  
  code:
 

--
  
  html:link action=next.do paramId=first
  paramName=list paramProperty=id next
 action
  /html:link
  
 

--
  
  
  And how can I pass the second parameter name
 after the
  action next.do??
  Thanks.
  
  
  
 

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

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

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

  
  -- 
  Brice D. Ruth
  Sr. IT Analyst
  Fiskars Brands, Inc.
  
  
  

  
  
  -- 
  Brice D. Ruth
  Sr. IT Analyst
  Fiskars Brands, Inc.
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 

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


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

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