We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Local Servlets

u0369527
u0369527 asked
on
Medium Priority
285 Views
Last Modified: 2013-11-24
Hi,
I have to build an application to access a database. I have three options:
1) Make a GUI and the application will be installed in a local machine X.
2) Console mode, application installed in X.
3) Servlet application installed in X.

Now my preferred choice is 3. I want to be able to build a local webpage and that webpage accesses a java class that has the code. How is this possible? I thought of servlets, but maybe there is another way of doing this...

I understand that servlets may not be the best option as the local machine X does not have an HTTP server.

This is urgent. Help?
Thanks
Comment
Watch Question

Siva Prasanna KumarPrincipal Solutions Architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
>>build an application to access a database.

if its just to access a database the your choice 1) is the best i feel.

because you need a sever to run either for a servlet or jsp.
atleast you need a servelt engine like tomcat.

Thank you.

Author

Commented:
Yes, I agree.
My program will access a DB2 database in a server. However, I do not like GUI's at all. I was wondering If I could compile the java program and then run it with a webpage (webpage being the "GUI"). Is this possible?

Author

Commented:
Also, the only thing the webpage would have to do is to call the java file when user fills a form and presses submit.

Author

Commented:
So my idea was to have some sort of local servlet to do this.

(sorry about the amount of posts.. i'm kinda stressed out with this as it is part of a plan that isnt yet finished)..

Thanks.
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
With servlets, since you are tied to having a web-server/ servlet-container, and since you don't like GUIs :) you can use a simple console-based application.
Mayank SPrincipal Technologist
CERTIFIED EXPERT
Commented:
>> If I could compile the java program and then run it with a webpage (webpage being the "GUI").

I guess the best you could do in that case is make it an Applet (which might need to be signed for talking to a remote database) but it still means having GUI :)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Principal Solutions Architect
CERTIFIED EXPERT
Top Expert 2006
Commented:
ok the best you can do is to use a open source servlet engine like tomcat & simply write a JSP to access your database so that your work get simple and the required simple GUI is easy to construct in JSP(HTML).

Author

Commented:
Thanks.
Even though you guys answered the best options, my decision was to make it in console mode. The only reason for this is the fact that it will be quicker for me to write and easy to change in the future. The only problem with this option is the not so friendly user-comp interface.

Thanks
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.