Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!

Michael Peremsky

Greenhorn
+ Follow
since Nov 07, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Peremsky

We have a form that has the following definition (the important part is the enctype)



By using this format, FF and IE can upload files and pass encoded characters properly, but Chrome has sporadic issues.

Using the below works in FF and Chrome, but breaks encoded characters in IE.



We need to be able to receive encoded characters and upload files in FF, Chrome and IE. However, I am unable to find a form "signature" that works for all three. I thought I had read somewhere that there may be a configuration setting somewhere to set the encoding instead of having to do it on the form. I am not even sure why struts would mess with the encoding on the form to begin with. We do not have an option of upgrading to a more recent version of struts.

Thanks for any possible suggestions.
4 weeks ago
I found the problem. I had copied the code in the controller from another class. I did not realize I had a "new AnchorPane" in the code. Removing this worked

;
3 years ago
As a side note. If I take the fxml code from the window I am loading into the CENTER pane and copy it to the initial BorderPane it works as I expect it to. The anchorpane will fill the CENTER pane and resize with it. As it stands, loading the CENTER pane seperately 1) does not fill the pane and 2) does not resize with it.
3 years ago
I am creating an app that has a main BorderPane with a menubar in the TOP. I want to change the CENTER content when a specific menu option is selected. However, when I do this, the AnchorPane that I load into the CENTER pane is not resizing to fill the CENTER pane. It keeps it's preferred size. I have tried setting it to USE_COMPUTED_SIZE, but that does not resize it to fill the CENTER pane. I also tried to add an HBOX as a wrapper around the AnchorPane (I am fairly new to JavaFX UI design) which also did not work.



I load the pane to set in the CENTER using the following call from the main class:



And the actual controller for the AnchorPane being loaded to the CENTER pane.



I do not know a lot about JavaFX layouts. I am more of a backend guy, so I am at a bit of a loss here.
3 years ago
In the past I had asked how to create a label to be printed. From that I learned how to create an Image object with the text and graphics I need for printing. Since then I have run into issues of actually printing the object. I am missing some pieces of knowledge and am looking for help to fill them in, not necessarily looking for someone to give me an answer (although examples are good). The logic of the program is as follows:

1. A user selects one or more records to create a label for. These selected records are kept in a list object (e.g. List <MyRecord> recordsToPrint;)
2. I display a dialog for the user to select the printer to use
3. I display a dialog for the user to select which label on the sheet to start printing from (6 labels per sheet)
4. I create an Image for an item in the list to be printed
5. STUCK HERE

Issue 1:
This is where I get stuck. I can create an image for the label (1 object from the List) to be printed. The graphics object I use to create the image is a new Graphics object (from a BufferedImage object).
I return the BufferedImage to the method that the printing dialogs were shown from. But I do not know how to print a BufferedImage. I have seen code where the object is saved as an Image file (e.g. png file) and the file is sent to the printer. However, I do not know how to print the BufferedImage object I currently have.

Issue 2:
If I have X labels to create/print from the List<MyRecord> how do I print the labels in such a way that they will start printing with Label Y ob the label sheet and continue on to the next label, and start at label 1 on the new sheet when it hits the end of the page. I know that I can count where I am on the page and reference based on how many objects are in the list, but do I loop through the list creating a label for each object and calling print on that object or am I supposed to create one giant image with all the labels (this seems wrong and could be memory intensive) and print that way?





3 years ago
Thanks guys I will look into those 2 options. I really appreciate the quick response.
3 years ago
Hi everyone,

I am creating an application that needs to print out labels for file folders (like in a doctors office). The label need to have a barcode (may be optional), text (normal and rotated) and colored blocks. Similar to the image below.

The problem I am having is that I have no idea where to start to make this happen. I read some tutorials on the print services and was getting buried in technical details of selecting the printer. After selecting the printer, I need to create the print job. Now, this is where I am stuck. I have no idea how I am to make this "object" to be printed. Am I somehow supposed to make a BufferedImage and send that to the print job or do something else? I have never had to create an image or a print job in Java before and am stuck on this point. If creating an image is the best way to go, can anybody point me to a decent tutorial on how to create images?

I realize this is a bit open ended, but I need help getting pointed in the right direction. 3rd party software (that requires a license or paying for) is not an option. I did see the Barbeque code from apache to create barcodes, I saw that that can be sent to a PNG, GIF, etc. But, even if I could do that, it would not be part of the rest of the image/label that has text and other colored areas.

Any help getting pointed in the right direction would be greatly appreciated, I am on a bit of a time crunch.

3 years ago
I realize it was a bit open ended which is why I hesitated posting, but I did not know how to narrow it down. But you guys have given me something new to look in to.

Thank you
4 years ago
Hello all, I am new to JavaFX and have been through ~50 youtube tutorials on how to "build" JavaFX applications. However, every example I can find uses simple, one scene examples and/or a pop up screen. I want to create a desktop application that changes scenes depending on what menu choice is selected. If I am adding a client, I want the main scene to be an add page, if running a report, it needs to show the report page, etc.

I believe that the norm is to have a single controller for each FXML scene. But. how to I manage moving from one scene to the next? Is the Main class the location that handles all the scenes and switches between them? Any examples or links to sites with this type of information would be greatly appreciated.

4 years ago
I am trying to deplouy a client website on a hosted machine. When running locally I had Tomcat running on port 8080 and Apache is on port 80. Running locally everything had port 8080 added to the URL to run it. Now that the application is being deployed to the world I need to remove the 8080 from the URL but I am unsure of how to do that.

Currently when I bring up the login page (jsp) and hit submit, it fails to log the user in (as the jsp is on port 80 - the default). If I change the code to use port 8080 for the login servlet call the login succeeds.

I am lost on this any help would be greatly appreciated.
9 years ago
Make sure the jar file for the connector is in your classpath. e.g. tomcat/lib/odbc...jar
10 years ago
I am new to development on the Mac and am running into the following error message when I try to create a database connection from a datasource. I am not sure what is causing this problem. I have this up and running on a PC just fine, but I am not familiar with the Mac setup and am not sure what I am missing here. Any help would be greatly appreciated.


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at com.cfs.sm.db.DataSourceDbConnection.getConnection(DataSourceDbConnection.java:71)

MySql 5.5
Axis2

Tomcat
Server version: Apache Tomcat/6.0.26
Server built: March 9 2010 1805
Server number: 6.0.26.0
OS Name: Mac OS X
OS Version: 10.6.2
Architecture: x86_64
JVM Version: 1.6.0_17-b04-248-10M3025
JVM Vendor: Apple Inc.
10 years ago
Welcome, I look forward to reading your book, it certainly sound sinteresting.
First off: I am not an eclipse person.

That being said. I have just installed Eclipse on a machine and installed the weblogic plugin using the Software updates from (http://download.oracle.com/otn_software/oepe/ganymede). I create a new project and try to "Run on Server", but I get an error message that tells me to "Finish the wizard". I can select the weblogic server version from the list of BEA servers (10.0), but it does not allow me to select the Next button.

Previously I had used the WebStudio, which installed the WL server, webstudio and eclipse.

What am I missing here?

Any help would be appreciated.
10 years ago
I don't believe the ResourceBundle uses any specific pattern. It uses a HashMap internally to check for the resource, but that is about it.

What pattern are you looking for?
11 years ago