• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

Local Servlets

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
0
u0369527
Asked:
u0369527
  • 4
  • 2
  • 2
2 Solutions
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
>>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.
0
 
u0369527Author 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?
0
 
u0369527Author 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.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
u0369527Author 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.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> 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 :)
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
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).

0
 
u0369527Author 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
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now