Bloo Barton

Ranch Hand
+ Follow
since May 09, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bloo Barton

You can write to the cookie if you are just using this to help customize the experience.
Ok, I thought I would try another method to accomplish what I need. FileZilla can be used from the command line so I could submit the files over FTP via FileZilla. For this I will need to be able to pass parameters to a command line program from Javascript. I have tried using the WshShell.AppActivate method and the WshShell.Exec method. I am able to run a command line program
with either of those, but am not able to pass in parameters so it is
essentially useless.

An example as simple as how to run something like "ping -t google.com"
would be great.
Does anyone know of a Javascript library that will allow me to send files over SFTP directly from within a Javascript.

This is for a client utility written in Javascript. I am not trying to do this from within a browser...
Thanks!
14 years ago
Is there a way to set an absolute width for buttons when using the html:submit tag from struts? I tried using size, the same as in HTML, but that does not work.
14 years ago
Rather than start a new topic, I decided to just dig this one back up since it is essentially the same problem I'm having.

I have two buttons that are supposed to submit to the same Action. One button is an actual "Submit" button that I want to require validation from my ActionForm. The other is a "Logout" button that should not be validated.

I have tried setting validation="false" in my struts-config for this action forward and then called the ActionForm's validate method directly from the Action class' submit method.

This partially works. It results in the Logout not requiring validation and logging out correctly.

Submit does validation and submits if validation passes and returns to the original JSP if validation fails.

The problem though is when returned to the original JSP I'm not able to display the ActionErrors because it is empty! How can I get this to stay populated using the method I have described?
14 years ago
There is some limited interactivity between Javascript and Java, but it is inconsistent from browser to browser. Basically though it boils down to this. Javascript can call public methods in Java applets and access public variable, and Java applets can invoke Javascript methods. Javascript can not directly access Java objects though.

Despite the misnomer Javascript and Java are not remotely the same. Javascript is not actually based on Java, but it is actually based on Ecmascript.
Originally I thought that my methods were not being called when the anchor tags were being clicked. Later I realized the methods were being called and my variables were correctly updated, however this was not reflected on the page because it is not being refreshed. Is there a javascript object/method that will allow me to redisplay the page without resetting it?
I would like to do an onclick event on links rather than buttons. Links really just look better with the overall design of my site.

The same methods work fine against form buttons! Is there a way I can do this?

Thanks!
I am getting a ResultSet back that has multiple rows in my DAO. I put each row into a DTO and add this to an ArrayList.

My Action class gets the ArrayList back from the DAO. All of this works correctly, but I do not know how to get this data back to the view so I can display the rows in a table.

I have an ActionForm that corresponds with my Action class, but I do not understand how I can put an ArrayList into the ActionForm and then get it back in the JSP since only Strings and booleans are supported in ActionForms.

Any help on this is greatly appreciated.
14 years ago
The dates are inputted as strings the stored procedure is like this.



The begin and end are definately there. That is the Oracle PL/SQL way of building a callable statement. I am using that instead of the SQL92 escape syntax because I was having some minor issues with the SQL92 syntax working with Oracle 9.
I'm trying to call a Stored Procedure from JDBC. The registration appears to initialize correctly, but then when I execute the CallableStatement I receive an error message


java.sql.SQLException: [Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GET_DOCUMENTS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored



I have gone over it several times, but don't see anything wrong. I have now manually entered values into my registrations to try and eliminate any possibilities of errors occuring due to there sometimes being null data. However, the problem still is occurring! Here is the code I'm using.

It fails on the call to getConnection. The code looks like this.



This is the proper way to create the connection when running in JRun. DEVSERVER is a managed datasource that is actually configured in JRun. Then JRun automatically handles pooling and other nifty features...

Since it is handled by JRun it does not exist outside the container and so regular unit tests fail...
14 years ago
Eric,

That method looks like it is pushing the value from the function out to the tag. I'm looking for something more re-usable. I want to be able to call the function from the tag, not push the data into the tag when the page loads.
I want to be able to get my string for the src attribute from a Javascript function. I know there is a way to do this, but it has been a few years since I last did this and I can't seem to get the syntax right or something...

Currently I have a function like this...

<script language="javascript">
function getUrl(){
/* build URL here ... */
return URL;
}
</script>

Then I try to use the function like this...

<iframe src=javascript:getUrl(); width="100%" height="100%"></iframe>

This does not work though...