Thomas Greene

Ranch Hand
+ Follow
since Aug 09, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Thomas Greene

I have created a form in bootstrap 3. I need to style the form such as there is a border around each form field and label. Something like the attached image -

I am not able to make out how to go about doing this. Here is my attempt to achieve this -

https://jsfiddle.net/yy7ddtby/15/

I have tried to style the fields in first row using a border CSS. However, it doesn't look the way I want it to.

How can I go about achieving the expected UI with borders?
I have to write a Servlet which will get a zip file from the client. Servlet is expected to write the file to the filesystem.  

I am using Postman to simulate the request (attached)


Below is my Servlet code



This gives me the below error



What would be the correct way to receive file from the client and save it on the server?

Thank you
8 years ago
I have a servlet which returns a PDF document to the requesting user. When it is called from a browser, the PDF document is automatically downloaded.
Now I need to call this servlet from Java (standalone code, not server side). Once this Java code gets the PDF document, it needs to convert it to images using Apache PDF Box API.

This is how my Java code looks like. It writes bytes to the screen.

     

and this is how the code to convert it to Images looks like



Now I need to combine these two so that the PDF file that is downloaded (in memory, would prefer not to write it to Filesystem) is converted to JPG. So, instead of passing a hardcoded filename, I somehow need to convert the BufferedReader object to File object and pass it as an input to PDDocument.

I am not able to make out how this conversion would happen.

Thank you.
8 years ago
I would like to covert list inside the list. I am using json-simple but now also considering gson library

8 years ago
I have an ArrayList of custom Objects. Each of these objects have an arraylist of another custom object. Then these second level of custom objects have an arraylist of another custom object.

This is how the class hierarchy looks like







I have an arraylist of Undle objects



I would like to convert Undle ArrayList to a JSON. How can I flatten this hierarcical structure of beans and put it in a JSON?

I tried doing something like



and



But it seems that they work only if a String ArrayList is passed.
8 years ago
I have an Arraylist which contains Strings.



Then there is a Java Bean defined as


There is an ArrayList of this bean which data such as


I want to iterate over items in the bean and replace them with index of items from the nodes array. For instance, values in the above bean needs to be changed to



Can someone please suggest how I should go about doing this? Thank you
9 years ago
I am looking for some free libraries that will allow me to create and read barcodes.

I know iText can be used to create barcodes but it doesn't look like that it allows reading of barcodes as well. Is this correct? I’m not able to find examples of how to read a barcode image using iText.

Are there any other Java libraries/apis which would allow me to Create as well as Read Barcodes?
10 years ago
I have files/directories in the following structure

dfxs
- APP-INF (directory)
- META-INF (directory)
- services-dfxs.war (file)

I need to create an ear file from this and deploy it into Jboss. To do this I zipped these 2 directories and file to a single zip file, and changed the extension to .ear.

When I copied the resultant ear file to the deploy directory of Jboss 5.1.0 (and restarted the server), I got the following error -

00:00:35,886 INFO [LogNotificationListener] Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@1ca1a68[ defaultDomain='jboss' ]
00:00:46,150 ERROR [ProfileDeployAction] Failed to add deployment: dfxs.ear
org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment(dfxs.ear)

Can someone please let me know the right procedure to deply

00:00:35,886 INFO [LogNotificationListener] Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@1ca1a68[ defaultDomain='jboss' ]
00:00:46,150 ERROR [ProfileDeployAction] Failed to add deployment: dfxs.ear
org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment(dfxs.ear)
12 years ago
We have around 50 users connected to the application which is deployed on tomcat 6 (windows 2008).

In catalina.log, I can see the following -

org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (200) are currently busy, waiting. Increase maxThreads (200) or check the servlet status


Can someone please let me know the following -

1. How could it be creating 200 threads when there are just 50 users. Could this be something related to code?

2. where can we increase the number maxthreads?
12 years ago
I'll be moving to London next week for a month or so on a project. I was looking for accomodation (paying guest) and found one at

birchdale road
post code is E7 8AR
london


Can someone please let me know if this is a reasonably safe to stay in.
13 years ago
Can someone please let me know what would be weather like in Singapore in January? I'll be travelling there this weekend. Are warm clothes required?
15 years ago
I have created a properties file in eclipse in eclipse 3.3.2, in which I need to write some Japanese characters.
I have created a Java project for the same and in Project --> Properties --> Info --> Text File Encoding, I have selected "Other" radio button and "UTF-8" as the value (by default,radio button "Inherited from container Cp1252 was selected ).

Still when I try to save the properties file with Japanese characters in it, it gives me the following error
"Save could not be completed.
Reason: some characters cannot be mapped using "ISO-8859-1" character encoding. Either change the encoding or remove the characters which are not supported by the "ISO-8859-1" character encoding.

I have also tried (eclipse) Window--> Preferences --> WorkSpace, also I have selected "UTF-8", still the problem persists.

Can someone please let me know how to resolve this problem.

thank you
[ September 08, 2008: Message edited by: Thomas Greene ]
Thanks a lot everyone for this valuable information
[ July 03, 2008: Message edited by: Thomas Greene ]
16 years ago
Thanks a ton for all the information.

One last bit of information.

I am looking for accomodation over the net. My office is in Aldersgate Street.

Can someone please let me know areas which are not far off from this area or areas from where I can easily commute using public transport.
16 years ago
I have heard that London is a very expensive place to stay in. Will it be a good idea to stay in London or should I look for a place somewhere in the outskirts of London? What could be the possible options?

Also, is there some site from where I can book a place to stay, so that I don't have to run around when I land in London.
16 years ago