Amir Keibi

Ranch Hand
+ Follow
since Apr 23, 2012
Amir likes ...
Eclipse IDE Java Linux
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
4
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 Amir Keibi

Yes. The "TimeServer" is your interface, right?
7 years ago
Well, the page in the original message talks about using Jersey as an archetype. I guess including an explicit dependency (even with "Provided" scope) in the project's POM may not be ideal. He may want to keep the POM clean and only include direct dependencies. Hence, I suggested the manual installation.
7 years ago
How many questions are posted throughout this website just because remotely are related to Java?
As for Mono not being used in production, that's just not a valid statement:

http://www.mono-project.com/Companies_Using_Mono

I'm not an advocate of any technology. I just think that a right tool should be used for the job.
Or as Ulf pointed out, you can add a dependency tag for that particular component to your POM file and build your application with maven. Maven will then download and install the component in your local repository.

That's what you were saying Ulf, right?
7 years ago
This is a Maven question. It would've gotten better visibility if posted to their mailing list.

However,

Create Jersey's folder structure (org/glassfish/jersey/) in your maven's local repository (~/.m2/repository/) and download everything (or pieces that you need) from central repository to that folder. So if you need version "2.0-m13" of "jax-rs-ri" you'll need to download "jax-rs-ri-2.0-m13.jar" from "http://repo1.maven.org/maven2/org/glassfish/jersey/jax-rs-ri/2.0-m13/" to "~/.m2/repository/org/glassfish/jersey/jax-rs-ri/2.0-m13/". As it can be seen, your local repository's root maps to the central repository's root.
7 years ago
Although this is a Java forum, I'm not going to assume that you aren't open to other options. Especially because there isn't anything in your question about using only Java.

When it comes to Microsoft Office, I'd recommend using Microsoft technology. VSTO provides native support for reading Excel documents. You could use VSTO with C# to read the Excel file and Oracle native driver for .NET (ODP.NET) to update the database.
SQL problem then.

You have two options:

1- Not very good option is to write 40 different UPDATE commands:

Sudo sample:


2- Create a dynamic UPDATE command (could have performance implication):

Sudo sample:
7 years ago
I'm sorry. I should've been specific. Do you have access to the Administrative console and is the service function simple enough to invoke it from the console? If so, please do that and post the full stack trace.
That's better.
First thing first, it seems that the key-value pairs aren't in the URL but in the content of the HTTP response (you're parsing the content).
Like I mentioned, in order to update the database, the bare minimum you need to do is to use JDBC and execute an "Update" SQL command for each pair which updates the values.

Are you facing any specific problem or you just don't know how to connect to DB from within your code?
7 years ago
Servlet doesn't restrict you from connecting to database if that's what you mean. Even if you write the entire code including connecting to database and executing commands in your Servlet (bad practice obviously), it still works. If you're getting a blank page it means your code is broken somewhere. Please debug and find out where it is going wrong.
7 years ago
Indeed. Please format your posts to make easily readable.

As for your question, what I understand is that you have a Servlet in which you received and process 40 query string items and you'd like to store the values in a database where the same keys exist. So far you've parsed the key-value pairs into an Array. If this is correct, in the simplest form, you'll ought to create a middle tier class in which you use JDBC to connect to your database and execute an UPDATE command. I recommend using database stored procedures instead of writing the SQL command in your database.
7 years ago