RE: [OT]CVS client

2004-02-04 Thread Jimmy Emmanual
Almost all IDE's also have cvs clients.

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 2:14 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT]CVS client


if you don't need a GUI, you can install cygwin and use the cvs client from
that. 

-Original Message-
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 03, 2004 3:17 PM
To: [EMAIL PROTECTED]
Subject: [OT]CVS client
Importance: High

Hi,
can anybody suggest me any better CVS client other than WinCVS and
JCVS? 

Tnx in advance,

-Ramadoss


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


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

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



RE: How to remove forms from session

2004-01-14 Thread Jimmy Emmanual
try this:

if (mapping.getAttribute() != null) {
  if( request.equals(mapping.getScope()) )
request.removeAttribute(mapping.getAttribute());
  else
session.removeAttribute(mapping.getAttribute());
}

-Original Message-
From: Brian Styles [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 7:19 AM
To: [EMAIL PROTECTED]
Subject: How to remove forms from session


Hi all,

sometimes I want to force remove form objects that are stored in session.
I was trying to do this by using the following code:

 HttpSession session = request.getSession(  );
 session.invalidate();

However, I've seen that this doesn't work and sometimes the object remains 
in session - and the information is available on the jsp once I go back to 
it.

So perhaps someone could tell me the correct way to remove form beans from 
the session object.
thanks very much,
Brian

_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


-
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: using ApplicationResources in jsp...

2003-12-05 Thread Jimmy Emmanual
why do you need to? why not just:

html:html
body
bean:message key=title.from.ressources/
/body
/html:html


-Original Message-
From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 9:07 AM
To: Struts Users Mailing List
Subject: RE: using ApplicationResources in jsp...


because i need to get the value of my property inside a % ... %

 -Message d'origine-
 De : Hunziker Dennis [mailto:[EMAIL PROTECTED]
 Envoyé : vendredi 5 décembre 2003 15:03
 À : 'Struts Users Mailing List'
 Objet : RE: using ApplicationResources in jsp...
 
 
 why not try the following:
 bean:message key=title.from.ressources/
 
 -Original Message-
 From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] 
 Sent: Freitag, 5. Dezember 2003 15:01
 To: [EMAIL PROTECTED]
 Subject: using ApplicationResources in jsp...
 
 
 Hi,
 i wonder to know if it's possible to use a property in 
 ApplciationResources
 in  the jsp code.
  
 I want to do something like this :
  
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
 %@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
 %
 String title = title.from.ressources; // i don't know how 
 to access it !
 %
 html:html
 body
 %=title%
 /body
 /html:html
  
  
  
 --
 Marc AMIR-TAHMASSEB
 [EMAIL PROTECTED]
 mailto:[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: Scheduler

2003-12-02 Thread Jimmy Emmanual
There are also Jcontab - jcontab.sf.net


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 8:02 AM
To: [EMAIL PROTECTED]
Subject: Re: Scheduler



We are using an open source project called Quartz, available on source
forge, for this kind of thing. It has been working really well here. We
register classes with a cron style timer and at the given times the
registered class is called back.

There is also mention in the documentation about how this works in
containers and how the specs are not violated.

regrds
IV


  from:Gurpreet Dhanoa [EMAIL PROTECTED]
  date:Tue, 02 Dec 2003 12:15:16
  to:  [EMAIL PROTECTED]
  subject: Re: Scheduler
 
 Hi HG
 
 I will surely share the sucess after sucessfully implementing it.
 Understand the value of this mailing list.
 Dont wory dude.
 
 Thanks for help
 
 Cheers
 gary
 
 
 
 
 
 
 
 - Original Message -
 From: HG [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 5:38 PM
 Subject: Re: Scheduler
 
 
  Please share your success with the rest of us...
 
  I am in need of similar functionality...very soon...
 
  - Original Message -
  From: Gurpreet Dhanoa [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Tuesday, December 02, 2003 1:04 PM
  Subject: Re: Scheduler
 
 
   hi HG
  
   Thanks for the thought i have found the path tomove on. Hope it may
work
   out. Anyway thread problem is related to EJB Container as such strut
  allows
   one to use Thread
  
   Thanks
   Gary
   - Original Message -
   From: HG [EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Sent: Tuesday, December 02, 2003 5:26 PM
   Subject: Re: Scheduler
  
  
Hi Gurpreet
   
I haven't tried this...but it came across my mind as I need
something
similar very soon.
   
You could write a Struts plugin... init() method called on start of
  webapp
and destroy() method called on shutdown of webapp.
   
In the init() method you could start a thread that wakes up at
  specified
interval, say each minute, to check if there is some tasks that need
 to
  be
done, eg sending mails, cleaning up, make some coffee (;-))
   
In the destroy method you could stop the thread again
   
I don't know if this violates with the J2EE spec...I remember
reading
something about threads...but that might be for EJBs only...Anyone
can
   shed
some light on this issue?
   
Regards
   
Henrik
   
- Original Message -
From: Gurpreet Dhanoa [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:47 PM
Subject: Scheduler
   
   
hi All
   
   
I want to implement a scheduler program something at the starting of
 the
application or at the starting of tomcat.
   
Basically i need one of my program to track all of the reminders i
 have
   set
in an web-application.
   
Say if i have set a reminder to send an email to client at 1400 hrs
 then
   it
should send that email at that time without the need of signing into
 the
account.
   
   
   
Any help will be of great use.
   
   
Thanks
Gary
   
   
   
   
-
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]
 



http://www.amazon.co.uk/exec/obidos/redirect-home?tag=velloscouk-21placemen
t=home_multi.gifsite=amazon

-
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] Good reporting engine/tools

2003-11-25 Thread Jimmy Emmanual
Actuate: http://www.actuate.com/home/index.asp

-Original Message-
From: Butt, Dudley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 9:50 AM
To: '[EMAIL PROTECTED]'
Subject: [OT] Good reporting engine/tools


Hi all, 

Has anyone used any good reporting stuff recently? Please let me know. We're
currently evaluating to get rid of our Crystal reports, just need to know
some other options...THANX 


NOTICE: 

This message contains privileged and confidential information intended 
only for the person or entity to which it is addressed. 
Any review, retransmission, dissemination, copy or other use of, or 
taking of any action in reliance upon this information by persons or 
entities other than the intended recipient, is prohibited. 

If you received this message in error, please notify the sender 
immediately by e-mail, facsimile or telephone and thereafter delete the 
material from any computer. 

The New Africa Capital Group, its subsidiaries or associates do not 
accept liability for any personal views expressed in this message.

-
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: checkbox onclick event not getting called

2003-11-25 Thread Jimmy Emmanual
try onclick=check(this.myname)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 11:20 AM
To: [EMAIL PROTECTED]
Subject: checkbox onclick event not getting called


Hi,
 
My code is like the following, when I click the checkbox, nothing happened
(the 'add' button suppose to get disabled). I put a alert statment in the
javascript, and didn't get it showed when click the checkbox... seems the
function didn't get called at all, can anybody tell me why? Thanks a lot!
 
SCRIPT LANGUAGE=JavaScript
function check(element) {
alert(getting called);
document.myform.add.disabled = ( element.checked );
}
html:form action=myAction name=myForm
html:submit propery=add value=Add/
input type=checkbox onclick=check(this) name=myname value=myvalue/




-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

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



RE: checkbox onclick event not getting called

2003-11-25 Thread Jimmy Emmanual
This is the modified version of your code that i tried. It works in ie 5.5
and netscape 7.1
script
function check(element) {
alert(getting called);
document.myForm.add.disabled = true;
}
/script

form action=myAction name=myForm
input type=submit value=Submit name=add
input type=checkbox onclick=check(this.myname)
name=myname value=myvalue/
/form


-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 12:04 PM
To: 'Struts Users Mailing List'
Subject: RE: checkbox onclick event not getting called


try onclick=check(this.myname)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 11:20 AM
To: [EMAIL PROTECTED]
Subject: checkbox onclick event not getting called


Hi,
 
My code is like the following, when I click the checkbox, nothing happened
(the 'add' button suppose to get disabled). I put a alert statment in the
javascript, and didn't get it showed when click the checkbox... seems the
function didn't get called at all, can anybody tell me why? Thanks a lot!
 
SCRIPT LANGUAGE=JavaScript
function check(element) {
alert(getting called);
document.myform.add.disabled = ( element.checked );
}
html:form action=myAction name=myForm
html:submit propery=add value=Add/
input type=checkbox onclick=check(this) name=myname value=myvalue/




-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

-
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: URGENT: getting a Session Attribute from ActionForm

2003-11-21 Thread Jimmy Emmanual
just create a hidden control on the form and assign the value to the session
variable.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 10:42 AM
To: [EMAIL PROTECTED]
Subject: URGENT: getting a Session Attribute from ActionForm


Hi All is there a way i can pass a request in an ActionForm. I need to get
a session attribute thro the request and write the getters in ActionForm
according to the values in the session.Please let me know

Thanks
--Mohan





-
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] Handling database connection exceptions

2003-11-17 Thread Jimmy Emmanual
Why don't you throw the exception from the Data Access class and catch it in
DispatchAction and if there is an exception then forward to the error jsp
page else to the display jsp?

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 3:22 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Handling database connection exceptions

Shyam,
Where in your JSP does the NullPointerException occur? Is it in a method
call in a scriptlet? If so, your JSP is still indirectly accessing the
database. What Wendy suggested was that the the database access class be
invoked from your DisplactAction class and the results be put in a
collection and set as an attribute in the request. That way, any problems
with getting the data would be caught in your Action class and then you
could forward to an error page.

Otherwise, why can't you just specify an error page using the errorPage
attribute in your JSP's [EMAIL PROTECTED] ... tag?

-Richard

-Original Message-
From: Shyam A [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 3:10 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: [OT] Handling database connection exceptions


Wendy,

Thanks for your mail. I don't know if you fully
understood where I'm coming from! As I said, the
database connection is accessed from a Data Access
class (read model), which is called from my
DispatchAction class. Since the exception is not
caught in my DispatchAction class (the methods throw Exception), it is
propagated to my JSP's. It doesn't mean my JSP's directly access the
database!

Anyway, thanks for your help.

Shyam


--- Wendy Smoak [EMAIL PROTECTED] wrote:
  I have a Database servlet configured in web.xml,
 which
  intialises a connection pool on Server startup.
  However, if the data source is unavailable, I get
 a
  Null Pointer exception on my JSPs, which is
  propagated from my Data Access class.
 
 IMO, the problem is that you're accessing the
 database from the JSP.
 And this, in a Struts webapp?!  The view has no
 business talking to the
 model.
 
 If you move the data access to the Action, then you
 can catch the error
 and gracefully forward to an error page.
 
 Meanwhile, you can define error pages in web.xml so
 that your users
 don't see the stack trace.  For example, I have
 this:
error-page
  

exception-typejavax.servlet.ServletException/exception-type
  

location/WEB-INF/jsp/exceptionServlet.jsp/location
/error-page
 which gives the user an apology and a phone number
 to call.
 
 --
 Wendy Smoak
 Applications Systems Analyst, Sr.
 Arizona State University, PA, IRM 
 

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


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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

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

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



RE: [OT] generate HTML file from XML and XSLT

2003-11-14 Thread Jimmy Emmanual
Try something similar to this:

import javax.xml.transform.*;

StringBuffer outHTML = new StringBuffer();
StringWriter ouput = new StringWriter();

java.net.URL xslUrl = this.getClass().getResource(test.xsl);
java.net.URL xmlUrl = this.getClass().getResource(test.xml);

String xslFile = xslUrl.toString();
String xmlFile = xmlUrl.toString();

try {
TransformerFactory tfactory = TransformerFactory.newInstance();

//get the XML Input file
Source xmlSource = new StreamSource(xslFile);

//get the stylesheet
Source xslSource = new StreamSource(xslFile);

//generate the transformer
Transformer transformer = tFactory.newTransformer(xslSource);

//Perform the transformation
transformer.transform(xmlSource, new StreamResult(output));
} catch ( TransformerException te) {
//
}

outHTML.append( output.toString() );

===

now you have a StringBuffer of the xsl transformation.


-Original Message-
From: Paul McCulloch [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 9:42 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] generate HTML file from XML and XSLT


Hava a look at the sample servlets etc. that come with the Apache Xalan-J
package.

Paul

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: 13 November 2003 19:14
To: [EMAIL PROTECTED]
Subject: [OT] generate HTML file from XML and XSLT


Hi,
I have a XML file and a XSLT file, i need to create a
HTML file in a temp directory then read this file to
get a String so can email this String or print the
String as HTML
is it possible to do it?? and how 
I am using jdk1.4.1 
Ashish


=
A$HI$H

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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

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



RE: Help please -- How to provide a Back button?

2003-10-29 Thread Jimmy Emmanual
a href=javascript:history.go(-1)Back/a

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:25 PM
To: Struts Users Mailing List
Subject: Re: Help please -- How to provide a Back button?


for ur question 2:

you can use javascript function to call two different action:

function faddpurpose() {
document.editform.methodtocall.value = addpurpose;
document.editform.forwardpage.value = totalsuccess;
document.editform.target=_self;
document.editform.submit();
}

function fcalculatepaypd() {
document.editform.methodtocall.value = calculatepaypd;
document.editform.forwardpage.value = totalsuccess;
document.editform.target=_self;
document.editform.submit();
}
html:form name=editform method=post action=adjrecordsdispatch.do
type=aaa.ers.struts.forms.RecordsForm

so U can create a dispatch action and call two different action changing 
value for methodtocall.If you are not using dispatch action then just set 
your forms action to whatever action U want to go to..




ZYD [EMAIL PROTECTED]
10/29/2003 01:18 AM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:Help please -- How to provide a Back button?


Dear all,

Question 1:

How to provide a Back button on a page?

Is there a html tag like the one for Cancel button: html:cancel ?

Question 2:

How to provide two submit buttons on one JSP page,
when click on the 1st button, the page is submitted to 1st action,
when click on the 2nd button, it's submitted to 2nd action?

Any response will be appreciated.
Thanks.

bruce


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



RE: STRUTS as a project in ECLIPSE

2003-08-27 Thread Jimmy Emmanual
http://jakarta.apache.org/struts/faqs/eclipse.html

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 7:55 AM
To: [EMAIL PROTECTED]
Subject: STRUTS as a project in ECLIPSE


How do I import the Source distribution of STRUTS as a project in ECLIPSE ?

Regards
Sreekant G



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



RE: data source problems

2003-08-22 Thread Jimmy Emmanual
Try driverClassName as the property.

-Original Message-
From: Fumo, Vince [mailto:[EMAIL PROTECTED]
Sent: Friday, August 22, 2003 3:32 PM
To: 'Struts Users Mailing List'
Subject: RE: data source problems


Thank you David, I gave that a shot and I made some headway, however, now at
Tomcat startup (and obvioulsy Struts startup) I'm getting an exception that
basicly states Cannot load JDBC driver class 'null' (full startup is
below). I'm sure I have my struts-config correct and I have the JDBC driver
in the WEB-INF/lib directory and also the tomcat common/lib directory. Any
ideas on where I'm messed up this time?

relevant struts-config

!--  Data Source Configuration --

data-sources
data-source type=org.apache.commons.dbcp.BasicDataSource
set-property property=descriptionvalue=MySQL
datasource /
set-property property=driverClass
value=com.mysql.jdbc.Driver /  
set-property property=url
value=jdbc:mysql://localhost/ed_test /  
set-property property=username   value=ed-web /
set-property property=password   value=dashboard /
set-property property=maxActive  value=10
/
set-property property=maxCount   value=10 /
set-property property=minCount   value=2 /  
set-property property=maxWaitvalue=5000
/  
set-property property=defaultAutoCommit  value=false /
set-property property=defaultReadOnlyvalue=false /
set-property property=validationQueryvalue=SELECT
COUNT(*) FROM family /
/data-source
/data-sources

the tomcat startup log

Starting service Tomcat-Standalone
Apache Tomcat/4.1.24
Aug 22, 2003 3:28:47 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
Aug 22, 2003 3:28:47 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
Aug 22, 2003 3:28:47 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='resources.application', returnNull=true
Aug 22, 2003 3:28:47 PM org.apache.struts.action.ActionServlet
initModuleDataSources
SEVERE: Initializing application data source
org.apache.struts.action.DATA_SOURCE
java.sql.SQLException: Cannot load JDBC driver class 'null'
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:529)
at
org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:38
1)
at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j
ava:1087)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3420)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:307)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:559
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

RE: no getter method found

2003-08-19 Thread Jimmy Emmanual
try:

Last Name: html:text property=lastName/br

where the N in name is cap.

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 2:34 PM
To: 'Struts Users Mailing List'
Subject: RE: no getter method found


Actually, my last email was wrong, they should be:
public String getLastName()
and
public void setLastName();

-Richard


-Original Message-
From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 19, 2003 6:55 AM
To: [EMAIL PROTECTED]
Subject: no getter method found


I have the below in my jsp page

Last Name: html:text property=lastname/br

and this in my ActionForm subclass

private String lastName = null;

  public String getlastname(){
 return this.lastName;
  }

  public void setlastname( String lastName){
 this.lastName = lastName;
  }

But I keep getting the no gett found error message...
No getter method for property lastname of bean
org.apache.struts.taglib.html.BEAN


What should the getter method be called?


--

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]

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

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



RE: Redirect option instead of findForward!!!Urgent

2003-08-14 Thread Jimmy Emmanual
You can also customize the forward in your action class.

//forward to the appropriate view
ActionForward forward = new ActionForward();

forward.setPath(/newrequest/index.jsp);

StringBuffer path = new StringBuffer(forward.getPath());

boolean isQuery = (path.indexOf(?) = 0);

if (isQuery)
path.append(parm1=value1);
path.append(parm2=value2);
else {
path.append(?parm1=value1);
path.append(parm2=value2);
}

forward.setPath(path.toString());

//Set redirect
forward.setRedirect(true);

forward.setContextRelative(true);

return forward;


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 5:46 AM
To: Struts Users Mailing List
Subject: Re: Redirect option instead of findForward!!!Urgent


I'd definitely upgrade to 1.1.0 but I don't know if it will help.

The request object cannot be passed with the redirect though - the 
redirect AFAIK is just a

meta http-equiv=refresh content=0; URL=http://blahblah;

header, which goes out to the browser to tell it to send another new 
request.

In your position I would enumerate over the request properties at the 
beginning of your showPassword action, and log the output to verify that 
you are not getting those properties you don't want. Theoretically you 
should only have hidValue=N, unless you put them all in a cookie.

Adam


Anurag Garg wrote:
 Hi Adam,
 
 I have already tried this option, but still it is giving me the same
 problem. This is how I have defined in the struts-config.
 
 When i do mapping.findForward(showPassword) in my TestAC i am taken to
the
 correct page but the request object is also passed with it although i have
 set the redirect attribute as true.
 
 action path=/test type=com.action.TestAC
   name=sourcingAF scope=request validate=false
 input=/pages/Test.jsp
   forward name=showLogout path=/pages/Logout.jsp/
   forward name=showPassword
path=/ShowPassword.do?hidValue=N
 redirect=true /
 
 I am using the struts rc-2. Any problem with it.
 
 
 Anurag Garg
 
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 07, 2003 1:35 PM
 To: Struts Users Mailing List
 Subject: Re: Redirect option instead of findForward!!!Urgent
 
 
 Hi Anurag,
 you specify in struts-config in the forward element for the action
 mapping, that it should redirect. (=true)
 
 Adam
 
 Anurag Garg wrote:
 
Hello All,

I have created a page where i submit the data for saving it in the
 
 database.
 
I have some hidden variables defined in the same page. After saving the
 
 data
 
when my control comes in the action class I do mapping.findForward to the
other page. The new page also contains some hidden variables which have
 
 the
 
same name as the previous page. When the new page's action class gets
executed the value of hidden variables from the previous page is picked as
the findforward is taking my request object to the other page. Now i dont
want my request object from the previous page to move to the new page. Is
there any option which can do response.sendRedirect for me so that i dont
take my request object of the previous page along to the new page. I have
tried to reset the variables in the action class before doing findforward
 
 to
 
the new page.

Thanks for the response in advance

Anurag Garg.


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


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


-
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: Sample code to upload file with struts

2003-08-12 Thread Jimmy Emmanual
Take a look at struts-upload application that is shipped with struts.

-Original Message-
From: Pierre Houdagba [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 3:59 PM
To: 'Struts Users Mailing List'
Subject: Sample code to upload file with struts


I need a sample code to upload a file selected by the user
c:\myfolder\filetoupload.csv
Please help
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: Logical Server Name

2003-07-31 Thread Jimmy Emmanual
try adding the port # and a database name.

set-property property=url value=jdbc:sybase:Tds:LNT_MAST:4100/testdb/

-Original Message-
From: Chirag Mehta [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 1:40 PM
To: struts-user
Subject: Logical Server Name


Hello,

Can anyone help?

I am using a BasicDataSource config in my config.xml file to reference a
sybase database. Using a logical server name, the code gives me a
IOException.

in my config.xml:
set-property property=url value=jdbc:sybase:Tds:LNT_MAST/
exception::
javax.servlet.ServletException: java.sql.SQLException: JZ003: Incorrect
URL format. URL: LNT_MAST

But if I use the physical server name I have no problems setting up the
DB Connection. (Well I haven't got any exceptions so far)

Has anyone got any idea of any code I may have to change for my app to
resolve from the logical server name? (The logical server name resolves
from a interface file which is on my network server)

Thanks a million

Chirag
--
NOTICE: If received in error, please destroy and notify sender.  Sender
does not waive confidentiality or privilege, and use is prohibited.



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



RE: pleeeez

2003-07-23 Thread Jimmy Emmanual
make sure your custom tag is defined in web.xml and the
ApplicationResource.properties file is defined in struts-config.xml

-Original Message-
From: Monang Setyawan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 7:19 AM
To: Struts Users Mailing List
Subject: plz



I'm stuck w/ this:

15:32:07,375 WARN  [jbossweb] WARNING: Exception for 
/naker/test.jsp
java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
at java.lang.Class.getDeclaredMethods(Class.java:1114)
at java.beans.Introspector$1.run(Introspector.java:1103)
at java.security.AccessController.doPrivileged(Native Method)
at
java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1101)

I've got that when i use custom tag in my page.


and this:
15:33:00,484 WARN  [jbossweb] WARNING: Exception for /naker/
javax.servlet.ServletException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:74)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


I've put my  in WEB-INF/classes, and 
I've check everything else.

Any idea?


-
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: package org.apache.struts.action Does Not Exist?

2003-07-19 Thread Jimmy Emmanual
are you sure struts.jar is in your classpath? It doesn't matter that
struts.jar is in $TOMCATHOME\webapps\MyApplication\WEB-INF\lib when you are
compiling. only that it is in your classpath.

echo $CLASSPATH or echo %CLASSPATH% and see if you see struts.jar.

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 8:15 PM
To: [EMAIL PROTECTED]
Subject: package org.apache.struts.action Does Not Exist?


I have been using Struts (jakarta-struts-1.1-rc2) for
about two weeks. I have tested a number of things and
made them work.

Today, while I was trying to compile a model bean (I
have compiled it before without any problem), I got
compilation error: 
package org.apache.struts.action does not exist

I double checked that the struts.jar is in the
$TOMCATHOME\webapps\MyApplication\WEB-INF\lib
directory. What could have happened?

The source code of my model bean is:

package resources.version1;

import javax.servlet.http.*;
import org.apache.struts.action.*;


public class LogonBean {

String userType, userID ,password;

public LogonBean() {}

public void setParameters(HttpServletRequest request)
{
userID = request.getParameter(userID);
password = request.getParameter(password);
}

public ActionErrors validate() {

if (!userID.equals(password)) {
ActionErrors ae = new ActionErrors();
ae.add(userID, new
ActionError(error.invalid.logon));
return ae;
}

if (userID.equals(admin)) {
userType = Adminstrator;
} else
if (userID.equals(user)) {
userType = User;
} else {
ActionErrors ae = new ActionErrors();
ae.add(userID, new
ActionError(error.invalid.logon));
return ae;
}

return null;
}

public String getUserType() {
return userType;
}

public void setUserType(String userType) {
this.userType = userType;
}
}   



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.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: Java Script Confirm and struts

2003-07-15 Thread Jimmy Emmanual
1. Change the html:submit to html:text

2. pass the form to the script and then submit

script
 function confirmSubmt(form) {
   var agree=confirm(Make Sure all the Values are correct, once submitted
this form cannot be take back);

   if (agree)
  form.submit();
   else
  return false;
 }
/script

3. change onClick to pass the form.
   onClick=confirmSubmit(this.form)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 3:28 PM
To: [EMAIL PROTECTED]
Subject: RE: Java Script Confirm and struts


Hi did as u guys said but it submits the page anyway, i want the page not
submitted if i press the cancel button.It submits the page if press OK or
Cancel This is what i did...


script
function confirmSubmit(){
var agree=confirm(Make Sure all the Values are correct,
once submitted
this form cannot be take back);
if(agree)
return true;
else
return false;
}
/script

html:submit property=Submit value=Continue onclick=
javascript:confirmSubmit()/

--Thanx in advance

 onclick=return confirm('Your message here')

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 15, 2003 12:39 PM
 To: [EMAIL PROTECTED]
 Subject: Java Script Confirm and struts


 Hi i wud like to have a confirm box that displays a message saying

  make sure all the values are correct, once it is submitted it cannot
 be take back

 I want to have this when a user clicks a continue on a JSP page, if
 the user clicks yes on the continue box it shud submit the form but if
 the user
 clicks no then the form shud not be submitted.I started writing it but
 i donno what to

   html:submit property=Submit value=Continue onclick= /

 what do i need to write for the onclick for what i need to happen.


 --Thanx in advance
Mohan



 - 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: Any Possibility of Passing Parameters to a ActionMapping

2003-07-02 Thread Jimmy Emmanual
yes.

you can do it in the config file if it is just a static parameter or in the
Action Class.

1. forward name=test path=test.jsp?thistest=mytest

2.
ActionForward forward = mapping.findForward(test);
StingBuffer path = new StringBuffer(forward.getPath();
path.append(?thistest=mytest);
return new ActionForward(path.toString());

Jimmy


-Original Message-
From: AshokD [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 6:58 AM
To: Struts Users Mailing List
Subject: Any Possibility of Passing Parameters to a ActionMapping


Hi,

I have a question regarding ActionMapping and Forwards.

I have a url which is configured in struts-config.xml as forward.

From my Action class I can simply forward to this url, but I need to pass a
parameter to this URL.

Is it possible ?

If yes how can we do this?


Thanks in Advance,
Ashok.D



-
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: File size limit on uploads?

2003-06-20 Thread Jimmy Emmanual
are you using the struts file upload code? if so there is also a controller
maxFileSixe=2M/ in struts-config.xml file...

Jimmy


-Original Message-
From: Chris Cooper [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 5:39 AM
To: Struts Users Mailing List
Subject: Re: File size limit on uploads?


Any takers?

- Original Message - 
From: Chris Cooper [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 6:07 PM
Subject: File size limit on uploads?


 Chaps,

 I have been having a number of problems with multipart/form-data uploads
of
 files, what I thought had been a problem with the sequence of events (see
my
 previous posts) now seems to be a problem of the size of file being
 uploaded.  I was convinced that at some point I had managed to upload a
70Mb
 file, I think it must have been wishful thinking on my part... :)

 The problem is as follows:

 1. I GET a page that displays a form for uploading multiple files.
 2. The user selects a file and POSTs the form using the submit button.
 3. If the file seems to be = 2Mb(ish) the Action receives no form
 parameters or attributes excluding the usual suspects (instances of
 org.apache.struts.action.MESSAGE,
org.apache.struts.action.mapping.instance
 and org.apache.struts.action.MODULE)
 4. There appears to be no exception being thrown, certainly not on that is
 bubbling up into my code!
 5. I do not have a maxFileSize set in web.xml

 Does anyone have any ideas?

 Chris.

 -
 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: cannot find tag class: 'org.apache.struts.taglib.html.BaseTag'

2003-06-20 Thread Jimmy Emmanual
According to your web.xml file, the tld files should be in your WEB-INF
directory along with the web.xml and struts-config.xml files...

Jimmy

-Original Message-
From: Kandlhofer, Josef [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 7:21 AM
To: [EMAIL PROTECTED]
Subject: cannot find tag class: 'org.apache.struts.taglib.html.BaseTag'


Hi,

i am new in struts and i need your help please.

I have a welogic 6.0 Application Server.

There i have the following directories:

- DefaulWebApp
  - login.jsp
  - WEB-INF
- web.xml
- struts-config.xml
  - lib
  - here are files from the struts download: e.g. struts.jar ,
struts-html.tld 


The code of the login.jsp is

%@ page language=java %
%@ taglib  uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

html:html
head
title
bean:message key=logon.title/
/title
/head

body bgcolor=white

html:errors/

html:form action=/logon focus=username
table border=0 width=100%
tr
th align=right
bean:message key=prompt.username/
/th
td align=left
html:text  property=username size=16/
/td
/tr
tr
th align=right
bean:message key=prompt.password/
/th
td align=left
html:password property=password size=16/
/td
/tr
tr
td align=right
html:submit
bean:message key=button.submit/
/html:submit
/td
td align=right
html:reset
bean:message key=button.reset/
/html:reset
/td
/tr
/table

/html:form
/body
/html:html



the code of the web.xml is


?xml version=1.0 ?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet


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

  welcome-file-list
welcome-fileindex.html/welcome-file
  /welcome-file-list
  
 
  taglib
  taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
  taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib

taglib
  taglib-uri/WEB-INF/struts-html.tld/taglib-uri
  taglib-location/WEB-INF/struts-html.tld/taglib-location
/taglib

taglib
  taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
  taglib-location/WEB-INF/struts-logic.tld/taglib-location
/taglib

taglib
  taglib-uri/WEB-INF/struts-template.tld/taglib-uri
  taglib-location/WEB-INF/struts-template.tld/taglib-location
/taglib 



  
/web-app



the code of struts-config.xml is:

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

!--
 This is the Struts configuration file for the example application,
 using the proposed new syntax.
--


struts-config


  !-- == Data Source Configuration ===
--
!--
 data-sources
   data-source
 set-property property=autoCommit
  value=false/
 set-property property=description
  value=Example Data Source Configuration/
 set-property property=driverClass
  value=org.postgresql.Driver/
 set-property property=maxCount
  value=4/
 set-property property=minCount
  value=2/
 set-property property=password
  value=mypassword/
 set-property property=url
  value=jdbc:postgresql://localhost/mydatabase/
 set-property property=user
  value=myusername/
   /data-source
 /data-sources
--
  !-- == Form Bean Definitions ===
--
  form-beans

!-- Logon form bean --
form-bean   name=logonForm
 type=org.apache.struts.validator.DynaValidatorForm
  form-property name=username type=java.lang.String/
  form-property name=password type=java.lang.String/
/form-bean


!-- Registration form bean --
form-bean  name=registrationForm
 
type=org.apache.struts.webapp.example.RegistrationForm/

!-- Subscription form bean --
form-bean  name=subscriptionForm
 
type=org.apache.struts.webapp.example.SubscriptionForm/

  /form-beans


  !-- == Global Forward Definitions ==
--
  global-forwards
forward   name=logoff   path=/logoff.do/
forward   name=logonpath=/logon.jsp/
forward   name=registration path=/registration.jsp/
forward 

Action Errors

2003-06-06 Thread Jimmy Emmanual
Is there a way to save the ActionErrrors in Session Scope and still have it
recognized by html:errors / in the jsp.

I've got the Errors Object saved to session by:

HttpSession session = request.getSession(false);
session.setAttribute(org.apache.struts.Globals.ERROR_KEY,errors);

( where errors is my ActionErrrors Object )

However, the jsp page doesn't display the error values ( it does however
display the key, all the time ).

I need it in session scope b/c in the application the Action Class is
redirecting NOT forwarding and so the request and response objects are
lost...

Thanks,

Jimmy

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



RE: [OT] web.xml error-page configuration problem

2003-06-06 Thread Jimmy Emmanual
Is you /jsp/error.jsp page a error page?

If not it as the Error Page via.

%@ page isErrorPage=true %

Jimmy

-Original Message-
From: Hohlen, John C [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 1:59 PM
To: Struts-User (E-mail)
Subject: [OT] web.xml error-page configuration problem


I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page
configuration to work for exceptions occurring within a JSP.  If the
exception, occurs in Java code (i.e. non-JSP), the error page works fine.
But if it occurs in the JSP, I see a stack trace on the screen instead of
forwarding to the error JSP.  Here's the setting I have in web.xml file:

  error-page
exception-typejava.lang.Throwable/exception-type
location/jsp/error.jsp/location
  /error-page

This should handle every type of exception, right?  In my JSP, I'm
intentionally creating a null pointer exception.  I also tried adding the
following to my web.xml file and it still didn't work:

  error-page
exception-typejava.lang.NullPointerException/exception-type
location/jsp/error.jsp/location
  /error-page

Any help is greatly appreciated,

Thanks,

JOHN HOHLEN 

-
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: newbiew Q: how to do redirect instead of forward

2003-06-06 Thread Jimmy Emmanual
Try building the whole forward from scratch.

ActionForward forward = new ActionForward();

forward.setPath(/newrequest/index.jsp);   

forward.setRedirect(true);
forward.setContextRelative(true);

return forward;

Jimmy


-Original Message-
From: Zhu He [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 4:16 PM
To: [EMAIL PROTECTED]
Subject: newbiew Q: how to do redirect instead of forward


for forward we usually do
execute() {
...
return mapping.findForward(listing);
}

I tried to use redirect by
execute() {
  ActionForward af = mapping.findForward(listing);
  af.setRedirect(true);
  return af;
}

but get exception
javax.servlet.ServletException: Configuration is frozen
at
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.
java:541)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:482)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)

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



RE: newbiew Q: how to do redirect instead of forward

2003-06-06 Thread Jimmy Emmanual
When you redirect, the RequestDispatcher tells the browser to request
another URL. When this happens there is always a round trip to the client
side and the previous Request and Response objects are lost. Also, redirect
allows you to request a resource outside the current application.

In a forward, the request is done w/o the help of the client browser. Also,
the Request and Response objects are kept.

Jimmy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 4:37 PM
To: Struts Users Mailing List
Subject: Re: newbiew Q: how to do redirect instead of forward




This is probably a silly question, but what's the difference between
forward and redirect?


Thanx,
Ian

Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure  Operations
[EMAIL PROTECTED]
(614) 213-6100




Zhu He [EMAIL PROTECTED] on 06/05/2003 04:16:07 PM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  newbiew Q: how to do redirect instead of forward



for forward we usually do
execute() {
...
return mapping.findForward(listing);
}

I tried to use redirect by
execute() {
  ActionForward af = mapping.findForward(listing);
  af.setRedirect(true);
  return af;
}

but get exception
javax.servlet.ServletException: Configuration is frozen
 at
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.
java:541)

 at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:482)

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

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








This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you.


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



Context Path

2003-06-03 Thread Jimmy Emmanual
I have an application that is completely comprised of JSPs which i'm trying
to convert to struts, bit by bit. All the JSPs are grouped into multiple
folders. 

I've installed struts and added logic in one of the JSP file to call an
Action class which then forwards the request to the corresponding .jsp page.

Problem: within this forwarded jsp page, all included jsp pages are missing!
I get a 404 error. It's almost like after the forward from the Action Class,
Tomcat starts looking for other JSP files from the folder that file is
located in and NOT the application ROOT!

Has anyone encountered this? if so is it a struts or a tomcat issue?

I'm using Tomcat 4.0.2 with struts 1.1RC1

Thanks,
Jimmy

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



RE: javascript and Struts

2003-04-04 Thread Jimmy Emmanual
even though it might be a round about way, see if you can call a javascript
function from the onchange of the form. If you can, then just have the
function do the document.submit().


-Original Message-
From: Oliver Reflé [mailto:[EMAIL PROTECTED]
Sent: April 04, 2003 7:08 AM
To: Struts Users Mailing List
Subject: AW: javascript and Struts


yes this i also tried. and : forms[0].submit() and simply submit()

In my opinion also the last must work cause the select element is
ebedded in the form. But nothing works.

-Ursprüngliche Nachricht-
Von: Stephen Smithstone [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 4. April 2003 13:34
An: Struts Users Mailing List
Betreff: Re: javascript and Struts


have u tried document.forms[ 0 ].submit( ) ???

On Friday 04 April 2003 12:31 pm, Oliver Reflé wrote:
 Hi Guys,
 i have a strange problem. Maybe you can help me. I would like to submit a
 form when a select box value
 has changed.Here is the code like i try it:

 html:form action=/updateCampaign?target=update method=POST
 table
 trtdbDatenfeld/b/tdtdbWert/b/td/tr
 trtdKampagnenname:/tdtd
 html:select property=campaignName onchange=document.submit()
 html:option value=/
 html:options collection=campaignList property=label/
 /html:select
 /td/tr

 ...

 I also trid javascript:{document.forms[0].submit()} etc. but nothing
 worked. When i try this now on
 a normal HTML form it works. But with the struts form i get the message.
 Method not supported by object.

 But i cannot imagine why this happens, cause javascript is executed on
 client side and there the code
 is the same.

 So do you have any idea ??

 Thx in advance


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


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

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



RE: [log4j]

2003-04-01 Thread Jimmy Emmanual
yup. no problems...

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: April 01, 2003 11:37 AM
To: [EMAIL PROTECTED]
Subject: [log4j]


Has anyone tried using log4j-1.2.7.jar with Struts





_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
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: New York City Struts Group

2003-03-25 Thread Jimmy Emmanual
I would love to also...
Jimmy

Jimmy
x2723


-Original Message-
From: Elio Bonazzi [mailto:[EMAIL PROTECTED]
Sent: March 25, 2003 3:32 PM
To: Struts Users Mailing List
Subject: RE: New York City Struts Group


I would love to participate in it.
Elio

-Original Message-
From: Michelle Harris [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 3:25 PM
To: Struts Users Mailing List
Subject: RE: New York City Struts Group


I'd be in for it.
 
Thanks,
Michelle Harris

-Original Message- 
From: Daniel Jaffa [mailto:[EMAIL PROTECTED] 
Sent: Tue 3/25/2003 15:21 
To: Struts Users Mailing List 
Cc: 
Subject: New York City Struts Group



How many people would be intrested in the formation of a New York
City
Struts User group.
If Atlanta GA, New Jersey can have one so should we.

Daniel Jaffa



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




---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
 


-
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

2003-03-20 Thread Jimmy Emmanual
Dennis, Thank you very much! It works!! By setting the key as a Attribute
of the datasource tag, and NOT a property, i can reference it by its key.

Here is the change i made in the struts-config file:

!-- PRODUCTION/dataexport --
data-source key=prdDataexport 
set-property property=description value=sylDataexport
/
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/dataexport /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=PRD /
set-property property=password value=PRD /
/data-source

Now in the Action Class, i can:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute(prdDataexport);

OR you can cast it as a GenericDataSource to print out its properites:

ServletContext context = servlet.getServletContext();
org.apache.struts.util.GenericDataSource genSource = 
 
(org.apache.struts.util.GenericDataSource)context.getAttribute(prdDataexpor
t);

System.out.println(genSource.getDescription());
System.out.println(genSource.getDriverClass());
System.out.println(genSource.getUrl());

This works for Struts 1.0.2. Not sure if it will work with any other
version.

Thanks Dennis and David!!

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: March 19, 2003 10:01 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Sorry, it's a property of data-source, not data-sources

Best Regards,
Dennis Lee

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

You can check the DTD, the key is a property of data-sources, so you
should set it in data-sources like this.

data-source key=prdDataexport
set-property property=description value=sylDataexport
...
...
  /data-source

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:42 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


This is the definition in the struts-config.xml file.

  data-sources
  
!-- PRODUCTION/dataexport --
data-source
set-property property=key value=prdDataexport /
set-property property=description value=sylDataexport
/
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/dataexport /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=PRD /
set-property property=password value=PRD /
/data-source

!-- PRODUCTION/GPS --
data-source
set-property property=key value=prdGps /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/GPS /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=PRD /
set-property property=password value=PRD /
/data-source

!-- PRODUCTION/GPS4 --
data-source
set-property property=key value=prdGps4 /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/GPS4 /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=PRD /
set-property property=password value=PRD /
/data-source

!-- REPLICATION/GPS --
data-source
set-property property=key value=repGps /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:REPLICATION:4100/GPS /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=REP /
set-property property=password value=REP /
/data-source

!-- TEST/dataexport --
data-source
set-property property=key value=tstDataexport /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:TEST:4100/dataexport

RE: struts 1.1:Multiple DataSources

2003-03-20 Thread Jimmy Emmanual
John, read the posts on Connection Pool. I've got it working in 1.0.2 by
setting the key as an Attribute of the datasource tag not as a property.

struts-config file:

   data-source key=one 
 ...
 ... 
   /data-source 

   data-source

 set-property property=key value=two /
 ...
 ...

   /data-source 

Now in the Action Class:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute(one);

OR you can cast it as a GenericDataSource to print out its properites:

ServletContext context = servlet.getServletContext();
org.apache.struts.util.GenericDataSource genSource = 
 
(org.apache.struts.util.GenericDataSource)context.getAttribute(one);

System.out.println(genSource.getDescription());
System.out.println(genSource.getDriverClass());
System.out.println(genSource.getUrl());

This works for Struts 1.0.2. Not sure if it will work with any other
version.

Thanks to Dennis Lee and David Graham!!

-Original Message-
From: John Wilson [mailto:[EMAIL PROTECTED]
Sent: March 20, 2003 3:54 AM
To: '[EMAIL PROTECTED]'
Subject: struts 1.1:Multiple DataSources 


Using struts 1.1 with SQL2000 Database.

Defined two data sources in my strust-conf.xml:



 data-sources

   data-source

 set-property property=key value=one /
 ...
 ... 
   /data-source 

   data-source

 set-property property=key value=two /
 ...
 ...

   /data-source 

/data-sources




From with in my action classes 

  dataSource = getDataSource(request,one); 
   or/
  dataSource = getDataSource(request,two); 

both of these throw a null pointer exception.

However  both work fine with getDataSource(request) when I define only one
datasource and don't pass in the key.

Does anyone have a solution or a reference web site?


thanks in Advance

John


 









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



Connection Pool

2003-03-19 Thread Jimmy Emmanual
How do you access a DataSource from an action class via its key? I have
multiple DataSources defined in the struts-config.xml file each have the
key property set. I need to access these based on this key.

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



RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
David,

When i try to access it via the defined key, the DataSource object is null.
The only way it works is if i use the Action.DATA_SOURCE_KEY i.e.

ServletContext context = servlet.getServletContext();
DataSource dataSource =
(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);

If i try something like:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute(Datasource1);

where Datasource1 is the key in the struts-config.xml file, it doesn't
work...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Connection Pool


Struts stores the DataSources in the ServletContext under the key you 
defined.

David



From: Jimmy Emmanual [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Connection Pool
Date: Wed, 19 Mar 2003 19:18:11 -0500

How do you access a DataSource from an action class via its key? I have
multiple DataSources defined in the struts-config.xml file each have the
key property set. I need to access these based on this key.

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


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
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: Connection Pool

2003-03-19 Thread Jimmy Emmanual
I don't think i'm using modules. not sure... actually, don't know.

I printed out all the Attributes of the servlet context and there is a
org.apache.sturts.action.DATA_SOURCE object which returns a DataSource.
However, i don't see where ( if any ) there is a list of all the DataSources
i've defined.

I've searched other lists and archives, and nobody seems to be able to get
it to work...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



From: Jimmy Emmanual [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Connection Pool
Date: Wed, 19 Mar 2003 19:23:40 -0500

David,

When i try to access it via the defined key, the DataSource object is null.
The only way it works is if i use the Action.DATA_SOURCE_KEY i.e.

ServletContext context = servlet.getServletContext();
DataSource dataSource =
(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);

If i try something like:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute(Datasource1);

where Datasource1 is the key in the struts-config.xml file, it doesn't
work...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Connection Pool


Struts stores the DataSources in the ServletContext under the key you
defined.

David



 From: Jimmy Emmanual [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Connection Pool
 Date: Wed, 19 Mar 2003 19:18:11 -0500
 
 How do you access a DataSource from an action class via its key? I have
 multiple DataSources defined in the struts-config.xml file each have the
 key property set. I need to access these based on this key.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


_
The new MSN 8: advanced junk mail protection and 2 months FREE*
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]


_
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: Connection Pool

2003-03-19 Thread Jimmy Emmanual
Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



From: Jimmy Emmanual [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Connection Pool
Date: Wed, 19 Mar 2003 19:23:40 -0500

David,

When i try to access it via the defined key, the DataSource object is null.
The only way it works is if i use the Action.DATA_SOURCE_KEY i.e.

ServletContext context = servlet.getServletContext();
DataSource dataSource =
(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);

If i try something like:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute(Datasource1);

where Datasource1 is the key in the struts-config.xml file, it doesn't
work...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Connection Pool


Struts stores the DataSources in the ServletContext under the key you
defined.

David



 From: Jimmy Emmanual [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Connection Pool
 Date: Wed, 19 Mar 2003 19:18:11 -0500
 
 How do you access a DataSource from an action class via its key? I have
 multiple DataSources defined in the struts-config.xml file each have the
 key property set. I need to access these based on this key.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


_
The new MSN 8: advanced junk mail protection and 2 months FREE*
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]


_
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: Connection Pool

2003-03-19 Thread Jimmy Emmanual
Dennis,

Thank you very much. However, what do you declare desconfig as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info(Initializing configuration plug in : Datasource
and Name service);
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}

Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.

It works for me.

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



From: Jimmy Emmanual [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Connection Pool
Date: Wed, 19 Mar 2003 19:23:40 -0500

David,

When i try to access it via the defined key, the DataSource object is null.
The only way it works is if i use the Action.DATA_SOURCE_KEY i.e.

ServletContext context = servlet.getServletContext();
DataSource dataSource =
(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);

If i try something like:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute(Datasource1);

where Datasource1 is the key in the struts-config.xml file, it doesn't
work...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Connection Pool


Struts stores the DataSources in the ServletContext under the key you
defined.

David



 From: Jimmy Emmanual [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Connection Pool
 Date: Wed, 19 Mar 2003 19:18:11 -0500
 
 How do you access a DataSource from an action class via its key? I have
 multiple DataSources defined in the struts-config.xml file each have the
 key property set. I need to access these based on this key.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


_
The new MSN 8: advanced junk mail protection and 2 months FREE*
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]


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


**
This message and any files transmitted with it are confidential and
may be privileged and/or subject to the provision of privacy legislation.
They are intended solely for the use of the individual or entity to whom
they are addressed. If the reader of this message is not the intended
recipient, please notify the sender immediately and then delete this
message. You are notifed that reliance on, disclosure of, distribution or
copying of this message is prohibited.
Bank of Bermuda
**


-
To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
This is the definition in the struts-config.xml file.

  data-sources
  
!-- PRODUCTION/dataexport --
data-source
set-property property=key value=prdDataexport /
set-property property=description value=sylDataexport
/
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/dataexport /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=PRD /
set-property property=password value=PRD /
/data-source

!-- PRODUCTION/GPS --
data-source
set-property property=key value=prdGps /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/GPS /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=PRD /
set-property property=password value=PRD /
/data-source

!-- PRODUCTION/GPS4 --
data-source
set-property property=key value=prdGps4 /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/GPS4 /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=PRD /
set-property property=password value=PRD /
/data-source

!-- REPLICATION/GPS --
data-source
set-property property=key value=repGps /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:REPLICATION:4100/GPS /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=REP /
set-property property=password value=REP /
/data-source

!-- TEST/dataexport --
data-source
set-property property=key value=tstDataexport /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:TEST:4100/dataexport /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=TST /
set-property property=password value=TST /
/data-source  

!-- TEST/GPS_QA --
data-source
set-property property=key value=tstGps_qa /
set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
set-property property=url
value=jdbc:sybase:Tds:TEST:4100/GPS_QA /
set-property property=maxCount value=10 /
set-property property=minCount value=1 /
set-property property=user value=TST /
set-property property=password value=TST /
/data-source

  /data-sources

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:36 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

I declared different datasource for different environment (Development, UAT,
Production).  
desconfig is an object of my Configuration class, it has an attribute
datasource of the type String.  

I am using Struts 1.1b2.

Maybe you should post your datasource setting in struts-config.xml as well.

Best Regards,
Dennis Lee


-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Dennis,

Thank you very much. However, what do you declare desconfig as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info(Initializing configuration plug in : Datasource
and Name service);
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY

RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
Thanks, i'll look at the DTD for more info...

I thought that was what i was doing with set-property property=key
value=prdDataexport /. Almost every document i've read says i should be
able to get the datasource via the key prdDataexport, but the only way i
get it is when i use the default Action.DATA_SOURCE_KEY...

Also, i'm using struts 1.0.2.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:49 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


The set-property element calls a setter on the DataSource java bean.  Use 
the key attribute of the data-source element to assign keys.  See the 
struts-config.xml DTD for details.

David




From: Jimmy Emmanual [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Connection Pool
Date: Wed, 19 Mar 2003 21:41:32 -0500

This is the definition in the struts-config.xml file.

   data-sources

   !-- PRODUCTION/dataexport --
   data-source
   set-property property=key value=prdDataexport /
   set-property property=description value=sylDataexport
/
   set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
   set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/dataexport /
   set-property property=maxCount value=10 /
   set-property property=minCount value=1 /
   set-property property=user value=PRD /
   set-property property=password value=PRD /
   /data-source

   !-- PRODUCTION/GPS --
   data-source
   set-property property=key value=prdGps /
   set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
   set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/GPS /
   set-property property=maxCount value=10 /
   set-property property=minCount value=1 /
   set-property property=user value=PRD /
   set-property property=password value=PRD /
   /data-source

   !-- PRODUCTION/GPS4 --
   data-source
   set-property property=key value=prdGps4 /
   set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
   set-property property=url
value=jdbc:sybase:Tds:PRODUCTION:4100/GPS4 /
   set-property property=maxCount value=10 /
   set-property property=minCount value=1 /
   set-property property=user value=PRD /
   set-property property=password value=PRD /
   /data-source

   !-- REPLICATION/GPS --
   data-source
   set-property property=key value=repGps /
   set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
   set-property property=url
value=jdbc:sybase:Tds:REPLICATION:4100/GPS /
   set-property property=maxCount value=10 /
   set-property property=minCount value=1 /
   set-property property=user value=REP /
   set-property property=password value=REP /
   /data-source

   !-- TEST/dataexport --
   data-source
   set-property property=key value=tstDataexport /
   set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
   set-property property=url
value=jdbc:sybase:Tds:TEST:4100/dataexport /
   set-property property=maxCount value=10 /
   set-property property=minCount value=1 /
   set-property property=user value=TST /
   set-property property=password value=TST /
   /data-source

   !-- TEST/GPS_QA --
   data-source
   set-property property=key value=tstGps_qa /
   set-property property=driverClass
value=com.sybase.jdbc2.jdbc.SybDriver /
   set-property property=url
value=jdbc:sybase:Tds:TEST:4100/GPS_QA /
   set-property property=maxCount value=10 /
   set-property property=minCount value=1 /
   set-property property=user value=TST /
   set-property property=password value=TST /
   /data-source

   /data-sources

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:36 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

I declared different datasource for different environment (Development, 
UAT,
Production).
desconfig is an object of my Configuration class, it has an attribute
datasource of the type String.

I am using Struts 1.1b2.

Maybe you should post your datasource setting in struts-config.xml as well.

Best Regards,
Dennis Lee


-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Dennis,

Thank you very much. However, what do you declare