ViewFileAction Help

2003-04-02 Thread White, Joshua A (CASD, IT)
Hello all,

I am having a little trouble reading a file off the server and displaying it
to the user for viewing.  I am receiving the following error from explorer:

Internet explorer cannot download ...viewFile.do?fileId=8 from localhost.
Internet explorer was not able to open this internet site.  The requested
site is either unavailable or cannot be done.  Please try again later.

This is some of the code that I am using in my action class:
...
try {

response.setContentType(myFile.getContentType());
response.setContentLength(myFile.getLength());

BufferedOutputStream bos = new
BufferedOutputStream(response.getOutputStream());
FileInputStream fis = new FileInputStream(myFileFile);
byte[] buffer = new byte[1024];
int bytes_read;
while((bytes_read = fis.read(buffer)) != -1) {
bos.write(buffer, 0, bytes_read);
}
fis.close();
bos.close();
}
catch (Exception e) {
getServlet().log("ViewFileAction.executeAction " +
"Exception: " + e.getMessage());
System.out.println(">ERROR " + e.getMessage());
e.printStackTrace();
throw new SystemException(e);
}
return null;

The contentType and contentLength are being set correctly.  Because there is
nothing to do after writing the file to the browser, I return a null
ActionForward.

Any suggestions here?  Is an action the wrong place to put this code?  I am
hoping to generate a popup with the file displayed in it.

Regards, 

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



Cannot retrieve definition for form bean null - Whats the deal?

2003-03-27 Thread White, Joshua A (CASD, IT)
I have the following code in my struts config:
...

...

...



...

...

...


...

When the action viewJumpCenter is called, I receive the following error:
[ServletException in:/WEB-INF/jsp/jumpCenter.jsp] Cannot retrieve definition
for form bean null'

What is happening here?  I have several other forms setup like this that do
not require me to specify the type of form bean in the html:form tag.  What
else could be causing this error?  I put debug statements in the form and
action constructors, they are being created fine.  Any Ideas?

Regards,

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



Where to place lookup val logic when not using an Action Form?

2003-03-24 Thread White, Joshua A (CASD, IT)
Hello all,

I have a page which list users.  The page is displayed by requesting the
listUsers action.  This action queries the database  and places a Collection
of user objects into the request for the listUsers.jsp page to display
(Using the iterate tag).

For conversation sake, say this user object has a "roleId".  Where would the
logic be placed to translate this roleId into its corresponding roleName?
Because this page is for display, there is no action form.  I don't want to
put any data access code in the jsp.  Could someone provide a suggestion?

Regards,

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



RE: Beginner question

2003-03-19 Thread White, Joshua A (CASD, IT)
This suggestion brings up another question.  To properly set my boolean
values (radio buttons), my reset method sets my booleans to false.

If I leave my form in session, doesn't the controller call the reset method
after every after every request?  If my booleans equal "true", by the time I
get to my "viewIt" action, won't they be reset to false?








-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 8:07 AM
To: [EMAIL PROTECTED]
Subject: RE: Beginner question


Have you tried putting itemId into session context instead of request
context?

 
  _  

Thank You
 
Mick Knutson
 
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
  _  



-----Original Message-----
From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:00 PM
To: Struts Users Mailing List
Subject: Beginner question


I have two struts actions:

"insertIt" - adds an item to the database.  When successful, this
action forwards to the "viewIt" action putting the newly inserted items
itemId into the request.
"viewIt" - views an item by itemId (retrieves itemId from request)

When "insertIt" successfully completes, It forwards to "viewIt" without a
redirect.  As many of you know, if the user then refreshes the page, the
insert action is performed again.

To solve this problem, I changed the redirect attribute to "true".  The
refresh problem disappears.  However, the request variable "itemId" gets
lost because of the redirect.  

I know this is something every struts developer has worked through.  Could
someone suggest a pattern for this type of transaction?  

Regards,

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


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


Visit our website at http://www.ubswarburg.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]



Beginner question

2003-03-19 Thread White, Joshua A (CASD, IT)
I have two struts actions:

"insertIt" - adds an item to the database.  When successful, this
action forwards to the "viewIt" action putting the newly inserted items
itemId into the request.
"viewIt" - views an item by itemId (retrieves itemId from request)

When "insertIt" successfully completes, It forwards to "viewIt" without a
redirect.  As many of you know, if the user then refreshes the page, the
insert action is performed again.

To solve this problem, I changed the redirect attribute to "true".  The
refresh problem disappears.  However, the request variable "itemId" gets
lost because of the redirect.  

I know this is something every struts developer has worked through.  Could
someone suggest a pattern for this type of transaction?  

Regards,

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



Caching Drop Down List Box Strategies?

2003-03-13 Thread White, Joshua A (CASD, IT)
Hello All,

I thought I would be slick an attempt to cache the Collections used to
populate my forms drop down list boxes instead of hitting the database every
time (The values may change daily).

The problem is that the inherited "servlet" variable and the "getServlet"
method only return a reference to the ActionServlet when calling the "reset"
and "validate" methods.  (The same holds true for the action classes.  A
valid ActionServlet instance is only returned when performing the action).
All other times, these references are null.  Is there another way of getting
a ServletContext reference in the ActionForm class?

Could anyone suggest some strategies for caching the collections used for
generating drop down list boxes?  

Regards,

Joshua



This is what I found...

Creating TestForm.
servlet member variable is NULL
getServlet() is NULL
>>>CALLING RESET!!
servlet member variable is OK
getServlet() is OK
>>>CALLING VALIDATE!!
servlet member variable is OK
getServlet() is OK
Creating TestAction
servlet member variable is NULL
getServlet() is NULL
Performing TestAction...
servlet member variable is OK
getServlet() is OK


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



When does the servlet reference in the ActionForm get set?

2003-03-13 Thread White, Joshua A (CASD, IT)
I have been trying unsuccessfully to get a reference to the ServletContext
from my BaseForm class which extends ActionForm.  I have attempted to get a
reference to the ActionServlet by calling the inherited "getServlet" method
as well as referencing the inherited "servlet" field.  Both are returning
null.  

When does this reference get set?  Should I not be receiving null?

Joshua 








-Original Message-
From: White, Joshua A (CASD, IT) 
Sent: Wednesday, March 12, 2003 6:41 PM
To: 'Sri Sankaran'; Struts Users Mailing List
Subject: RE: servlet reference in form bean in null?


I was actually talking about the "servlet" member variable of the ActionForm
class.  Is there any difference if I reference the "servlet" variable or the
getServlet method?  The servlet member variable is null.  I have not dug up
the source yet, but I would imagine the getServlet method returns the local
copy of the servlet field.  Both are "protected".  Both are null when I use
them.

Any ideas?

Joshua



-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 4:28 PM
To: Struts Users Mailing List
Subject: RE: servlet reference in form bean in null?


I think he means the getServlet() method of ActionForm.

Sri

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 4:26 PM
To: 'Struts Users Mailing List'
Subject: RE: servlet reference in form bean in null?


Might have if you posted the code to which you are referring.

Mark

-Original Message-
From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 4:16 PM
To: [EMAIL PROTECTED]
Subject: servlet reference in form bean in null?


Hello all,

I am having trouble determining why the "servlet" reference in my formbean
is null.  I have created a class "BaseForm" which extends ActionForm.  Any
ideas?  

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


-
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: servlet reference in form bean in null?

2003-03-12 Thread White, Joshua A (CASD, IT)
I was actually talking about the "servlet" member variable of the ActionForm
class.  Is there any difference if I reference the "servlet" variable or the
getServlet method?  The servlet member variable is null.  I have not dug up
the source yet, but I would imagine the getServlet method returns the local
copy of the servlet field.  Both are "protected".  Both are null when I use
them.

Any ideas?

Joshua



-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 4:28 PM
To: Struts Users Mailing List
Subject: RE: servlet reference in form bean in null?


I think he means the getServlet() method of ActionForm.

Sri

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 4:26 PM
To: 'Struts Users Mailing List'
Subject: RE: servlet reference in form bean in null?


Might have if you posted the code to which you are referring.

Mark

-Original Message-
From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 4:16 PM
To: [EMAIL PROTECTED]
Subject: servlet reference in form bean in null?


Hello all,

I am having trouble determining why the "servlet" reference in my formbean
is null.  I have created a class "BaseForm" which extends ActionForm.  Any
ideas?  

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


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



servlet reference in form bean in null?

2003-03-12 Thread White, Joshua A (CASD, IT)
Hello all,

I am having trouble determining why the "servlet" reference in my formbean
is null.  I have created a class "BaseForm" which extends ActionForm.  Any
ideas?  

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



Struts bean:define tag questions

2003-03-10 Thread White, Joshua A (CASD, IT)
Ok,

Imagine I have an object "User" (package test.UserVO) which contains another
object "Address" (package test.AddressVO)which has a String property "city".
"User" and "Address" are both java beans.  "User" has been placed in session
scope as "UserVO".

How would I access the property "city"?  I noticed that the bean:define tag
has a copy feature which will copy a bean to a different scope.  Could this
feature be used here?  Could you copy the nested "Address" bean into the
page scope?

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



RE: Extra bytes at the end of the class file

2003-03-05 Thread White, Joshua A (CASD, IT)
Becky,

I am using Tomcat jakarta-tomcat-4.1.18 with jdk 1.3.1_07 on win xp.  

If I drop the war into the webapps directory all is fine as well.  The
problem only seems to happen after using the custom Tomcat install/deploy
tasks.  Anyone have similar problems?  After deploying using the
install/deploy ant tasks, the application runs fine with the exception of
this one class file.

Joshua






-Original Message-
From: Becky Norum [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 8:54 AM
To: Struts Users Mailing List
Subject: Re: Extra bytes at the end of the class file


Joshua,

Try recompiling the class - I've heard that this can happen when the JVM
and compiler are different, especially if the compiler is old.

-- 
Becky Norum
Database Administrator
Center for Subsurface Sensing and Imaging Systems (CenSSIS)
Northeastern University
http://www.censsis.neu.edu


On Wed, 2003-03-05 at 08:03, White, Joshua A (CASD, IT) wrote:
> I received a javax.servlet.ServletException: "Extra bytes at the end of
the
> class file" when trying to get an instance of a singleton class
> (someclass.getInstance()).  What does this mean?
> 
> Joshua
> 
> 
> 
> This communication, including attachments, is for the exclusive use of 
> addressee and may contain proprietary, confidential or privileged 
> information. If you are not the intended recipient, any use, copying, 
> disclosure, dissemination or distribution is strictly prohibited. If 
> you are not the intended recipient, please notify the sender 
> immediately by return email and delete this communication and destroy all
copies.
> 
> 
> -
> 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]



Extra bytes at the end of the class file

2003-03-05 Thread White, Joshua A (CASD, IT)
I received a javax.servlet.ServletException: "Extra bytes at the end of the
class file" when trying to get an instance of a singleton class
(someclass.getInstance()).  What does this mean?

Joshua



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



REPOST - Using tiles mappings in global forwards

2003-03-05 Thread White, Joshua A (CASD, IT)
If the "forward" attribute of the action element can take both an actual
path or a tiles definition to forward to, shouldn't the global forwards
element have similar functionality?

In Chuck Cavaness's book (Programming Jakarta Struts), he attempts to do
this on page 347.  I just can't get it to work.  Is this perhaps
functionality which is now broken?

Joshua





I have successfully set up tiles using a tiles-def.xml file.  In this file,
I have set up a definition for "my.default".

I have been successfully able to view this layout by inserting the following
code into a jsp:
<%@ taglib uri="struts-html" prefix="html"%>
<%@ taglib uri="struts-bean" prefix="bean"%>
<%@ taglib uri="struts-tiles" prefix="tiles"%>


Again, this works fine.  I have been attempting to declare a global forward
mapping for the same layout:




I have inserted the following code into a jsp file to test the forwards:
<%@ taglib uri="struts-logic" prefix="logic"%>


When I hit the page containing this code, Tomcat gives me a 404 ("The
requested resource (/myapp/my.default) is not available.").  Whats happening
here?  

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



RE: Beginner Tiles Problem

2003-03-04 Thread White, Joshua A (CASD, IT)
Hmm,

I got the idea from Chuck Cavaness's book (Programming Jakarta Struts).  On
page 347, he does this.  Perhaps the book is wrong.  Does Chuck frequent
this list?

Joshua



-Original Message-
From: Kuzminski, Nicolas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 3:33 PM
To: Struts Users Mailing List
Subject: RE: Beginner Tiles Problem


Besides, any one knows if it's posible to have an url association with tiles
definitions, as we have with actions and, for example, /*.do urls? 
It would be great to have, let's say, /*.def requests

Saludos, Nicolas.

-Original Message-
From: Kuzminski, Nicolas 
Sent: Martes, 04 de Marzo de 2003 17:30
To: Struts Users Mailing List
Subject: RE: Beginner Tiles Problem


The problem is, you can't use a definition as a plain forward. It does not
work as a url. Try this instead:

 
  
  


(those two forwards are required, don't know why)

And redefine the forward:



So now you have a real url that points to a definition: /go.do?def=anydef.

Saludos, Nicolas.


-Original Message-----
From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED]
Sent: Martes, 04 de Marzo de 2003 17:28
To: [EMAIL PROTECTED]
Subject: Beginner Tiles Problem


I have successfully set up tiles using a tiles-def.xml file.  In this file,
I have set up a definition for "my.default".

I have been successfully able to view this layout by inserting the following
code into a jsp:
<%@ taglib uri="struts-html" prefix="html"%>
<%@ taglib uri="struts-bean" prefix="bean"%>
<%@ taglib uri="struts-tiles" prefix="tiles"%>


Again, this works fine.  I have been attempting to declare a global forward
mapping for the same layout:




I have inserted the following code into a jsp file to test the forwards:
<%@ taglib uri="struts-logic" prefix="logic"%>


When I hit the page containing this code, Tomcat gives me a 404 ("The
requested resource (/myapp/my.default) is not available.").  Whats happening
here?  

Joshua



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


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



Beginner Tiles Problem

2003-03-04 Thread White, Joshua A (CASD, IT)
I have successfully set up tiles using a tiles-def.xml file.  In this file,
I have set up a definition for "my.default".

I have been successfully able to view this layout by inserting the following
code into a jsp:
<%@ taglib uri="struts-html" prefix="html"%>
<%@ taglib uri="struts-bean" prefix="bean"%>
<%@ taglib uri="struts-tiles" prefix="tiles"%>


Again, this works fine.  I have been attempting to declare a global forward
mapping for the same layout:




I have inserted the following code into a jsp file to test the forwards:
<%@ taglib uri="struts-logic" prefix="logic"%>


When I hit the page containing this code, Tomcat gives me a 404 ("The
requested resource (/myapp/my.default) is not available.").  Whats happening
here?  

Joshua



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



RE: [Microsoft][ODBC SQL Server Driver]Communication link failure

2003-02-25 Thread White, Joshua A (CASD, IT)
I have gotten this driver to work with mssql 2k and DBCP.  Check it out!

Joshua 

-Original Message-
From: David Bolsover [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 6:18 AM
To: Struts Users Mailing List
Subject: RE: [Microsoft][ODBC SQL Server Driver]Communication link
failure


I would certainly suggest you check out alternative drivers; the
JdbcOdbcDriver is not recommended
for production use.

Ideally, you should look for a type 4 driver that supports at least JDBC API
V 2.0 - try the M$
driver it's free!



db

> -Original Message-
> From: Murray, Mark [mailto:[EMAIL PROTECTED]
> Sent: 24 February 2003 09:04
> To: '[EMAIL PROTECTED]'
> Subject: [Microsoft][ODBC SQL Server Driver]Communication link failure
>
>
> Hi all,
>
> I'm having a problem reconnecting to a database after a number of hours of
> inactivity or of the database times out for any length of time.
>
> java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Communication
link
> failure
>
> My datasource definition reads as follows:
>
> 
>autoCommit="false"
>   description="database1"
>   key="db1"
>   minCount="2"
>   maxCount="4"
>   driverClass="sun.jdbc.odbc.JdbcOdbcDriver"
>   url="jdbc:odbc:database1"
>   user="auser"
>   password="apassword" />
>autoCommit="false"
>   description="database2"
>   key="db2"
>   minCount="2"
>   maxCount="4"
>   driverClass="sun.jdbc.odbc.JdbcOdbcDriver"
>   url="jdbc:odbc:database2"
>   user="anotheruser"
>   password="anotherpassword"/>
> 
>
> I've tried adding autoReconnect to the datasource definition, either as a
> property or as part of the url, but this has no effect, other than to
cause
> errors when the config is being parsed.  The Java application server we're
> using is SAP's J2EE engine (formerly known as In-Q-My)
>
> Is there another way to force a reconnect? A different driver set perhaps?
>
> any help would be appreciated
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



Proper place/tier for retrieving DDLB Values

2003-02-18 Thread White, Joshua A (CASD, IT)
This is what I have done thus far:

1 Developed domain objects.
2 Developed persistence tier

Problem:

Where should the code which takes a key from a domain object (for example
orderTypeId) and looks it up in a database to get the corresponding values?
This type of logic doesn't really fit in the domain object tier.  Is this
done by DAO only?  Assuming that all I need is a name/value pair, what type
of object/collection should this DAO return?  How/where should I then
convert these values into an object/collection of objects the struts
html:select tags can use?

-Joshua



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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




Example of using a nested exception

2003-02-11 Thread White, Joshua A (CASD, IT)
Hello,
I am looking for an example of using a nested exception.  I have started
reading through Chuck Cavaness' Programming Jakarta Struts book.  He creates
a BaseException class which supports nested exceptions.  So far, I have not
found where he uses it.
Does anyone use nested exceptions which their business/domain objects when
executing business rules?  Could someone post an example?
Regards,
Joshua




This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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