• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with a web interface to a small java server app  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I have a problem that I'm hoping someone can advise me with.
I have coded a fairly simple server application that monitors an oracle database and alerts clients if there is a problem. The clients themselves are currently java applications as well.
What I would like to do is create some sort of web interface. From this interface I would like to be able to log in, check for any queued alerts and also perhaps have the page sit as a sort of homepage for the database administrator.
So my fairly broad question is - what possible avenues should I be looking into.
Perhaps more specifically I'm currenty thinking about what sort of technology would allow a webpage communicate with a java program sitting perhaps on another machine. Id need the server program to be able to update the users webpage should an interesting event occur.
The only thing that springs to mind would be to use a servlet of some sort. Am I right in thinking that servlets can be used for more than just outputting dynamic webpages? Could a servlet do the sort of thing that I am asking of it, ie accept communications from another application? Or am I really in the wrong ball park?
Any advice on any prospective technologies or techniques would be gratefully received. This is actually for my final year project at university and I'd really appreciate any leads you gurus could offer
Kind Regards

Simon Harvey
 
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was exactly the sort of thinking that was happening when HTML was first invented. The web page LOOKS very pretty but it can not DO much of anything.
Out of just such think was born JavaServerPages (JSP). See how brilliant that you are .
A typical solution to what you describe would be a JSP page that invokes servlets.
To the user the JSP page looks like HTML, but using the majic of modern technology, hidden in that HTML is just enough JSP code to invoke a servlet and point it at a servlet engine which has a JVM.
In a more sophisticated arrangement you would use Enterprise JavaBeans for the business logic, and a J2EE configuration from your JSP pages.
[ January 07, 2003: Message edited by: Cindy Glass ]
 
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet or JSP (which is just a servlet with lots of syntactic sugar) would certainly do the job. It can directly contact your application. If you need to keep a permanent communication channel with your application, or need to listen to a port that your application can contact, then you can kick off a dedicated permanently-running Thread doing this from an initialisation servlet.
The alternative would be for your monitoring application itself to support an embedded servlet engine. Jetty or GNU Paperclips come to mind.
Depending on what you want to do, you might be interested to learn about the Java Monitoring Extensions (JMX). There are also open-source JMX implementations such as JBossMX.
HTH
- Peter
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please beware that this topic is duplicated in Servlets. Simon, please don't do that.
- Peter
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!