Win a copy of Head First Android this week in the Android forum!

Steve Dyke

Ranch Hand
+ Follow
since Nov 16, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Dyke

I have this code in one of my web app containers:

In another container I would like to populate this text box and fire the keyup event.
This is my code. The text box gets populated but the keyup event does not fire.

I am attempting to run my web app on an android tablet.
Everything works as expected except when trying to view an HTTP .pdf link.
We are using the native browser and it does not present a download link or display a second tab showing the page.
If I use the Chrome browser then I get the download icon which opens the document as expected.
The reason I am told we are using the native browser is so we can only present the application icon to the user on the desktop that will link directly to the app.
That is all the end user sees.

Note: I use to display the HTTP link.

Bear Bibeault wrote:Most likely scenario is using instance members in the servlet.

I realize this is a very old post but I still have a question about it.

Does the following snippet form my servlet violate what you quoted?

3 months ago
I have a select list wrapped in a container. The options are various lengths.

In IE the select list will adjust the width to display the longest option with out any styling on the container or select tag.

However, using MS Edge the select list width seems to be set and cuts off some of the option text.
I have two monitors attached to my Windows computer.
When I start my web application I would like to automatically display a page on the second monitor based on data derived from a function in the application.

I found the following code that shows how many displays are available and it runs in my development environment(local host) but fails when ran on the server even with Headless setting set to true.

Server setting(Generic JVM Argument): -Djava.awt.headless=true


This code looks like it would be for Server(application scope) and not at session scope.
4 months ago
I am using Java 1.7
I have added mysql-connector-java-5.1.24-bin.jar to my project.

This is my connection string:

I get this message:

java.sql.SQLException: Access denied for user ''@'' (using password: YES)

However, these credentials exist in the database.

Bear Bibeault wrote:And, what is it you are expecting this line to do?

Set focus to the input element, which has the value to act upon, before simulating the Enter key press.

Bear Bibeault wrote:

Your code does not show how you are establishing the keypress handler; how are you doing that?

And... why the timeout?

This is code I found on internet. I am not sure about establishing the keypress handler.

This is from jQuery Docs:
The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional.

I have found that some of my javascript functions will not fire without a timeout wrapper.
I have read several posts in my searches this is an issue for others also.
This is jqGrid callback function.
The focus part works but the keyup function never fires.

Tim Moores wrote:What is the issue you're having?

I realize now that JSTL will treat methods just like properties.

However, I think I have a bigger issue. In my class I posted earlier I am using the getUserObject method to define a User object
and use properties of the user object in the rest of my app.

But if I then use logOn.getObject().userid for example in other places in my code it will create another User object.

Do I set the public User getUserObject() to final?
9 months ago
I have bee trying to rewrite some of my classes to match patterns suggested on this forum.
Now I have an issue with legacy JSTL code I have previously.

This is my class:

This is my legacy JSTL. Used over 1000 times in my JSP

9 months ago

Stephan van Hulst wrote:

Steve Dyke wrote:When I try to use this code I get a compile error ...Attribute Value is undefined...

Sorry, that is my mistake. It should read:

I have created this class but how do I use the @Resouce in conjunction with it.
Also, how do I call/insatiate this class and its method?

9 months ago

Stephan van Hulst wrote:Your DataConnection class adds nothing useful to the DataSource interface. Throw it away and write your DAOs like this:

Note that this is just an example of how you can inject data sources into repositories. As I noted earlier, for user info, use your web application framework's authentication mechanism instead.

Do I set this up in a global fashion or will this be coded in each DAO instance.

And what about the myApplicationName = (String) ctx.lookup("java:app/AppName"); line of code if I ditch the DataConnection class.
9 months ago

Stephan van Hulst wrote:Once again, what application framework are you using? Spring? Java EE? Bare servlets? How do you write your web page controllers?

I am using RationalApplication Developer(Eclipse).
I do not think there is an official framework involved.
I started with the Web perspective and just add new Servlets, java classes, JSP, javascript.
9 months ago

Tim Holloway wrote:

Stephan van Hulst wrote:As I noted earlier, for user info, use your web application framework's authentication mechanism instead.

We use an iSeries(AS400) backend database.
The Web Application Server connection pooling uses a Rus As with a particular userid/password has has access to the database files.

My application security only deals with access to the interfaces of the app itself.
9 months ago