Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Servlets

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
User avatar
elisman
Posts: 4
Joined: 2005-10-26 18:26
Contact:

Servlets

#1 Post by elisman »

Hello,

I am trying to design a nice card game, similar to those in Yahoo! Games or other online card games. It's a Romanian one, and i want to play it online with my friends.

Question to you here:

What Technology should i use? I've heard something about Servlets, and starting to look after what "Servlet" means. Somehow there is a Servlet Engine that runs with my Web Server and will be the host of my game. Short Question about the clients: Will the Clients be Applets or can i write simple HTML or PHP pages? Anyway i have to get smarter than that.

I tried to write my first "Hello World" Servlet. For this i have to install a Servlet Engine. Or?

Since i have an Apache Web Server installed i tried Tomcat 5.0.

In Debian there is a package named libservlet2.4-java. I installed this one. Is this package enough for the Servlets to work? Or do i need to install Tomcat from the Apache Website? I think it's only not configured correctly.

Thanks,

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#2 Post by lacek »

Servlets generate HTML output, thus, you can view them with a web browser. However, you can't write PHP pages with the servlet technology. PHP and Java servlets are two separate technologies, you can use one or the other, but not both (at least not in the same page, at least not in the same container :->)

For the servlet container, I used only tomcat so far, but I used the standalone version, which doesn't have the apache webserver in front of it, so I can't say you anything about setting it up with apache.

User avatar
elisman
Posts: 4
Joined: 2005-10-26 18:26
Contact:

#3 Post by elisman »

I tought so, that i will generate HTML with Servlets.

What about Applets? Can i use Applets that interacts with a Servlet? Or are Servlets only for generating HTML Code?

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#4 Post by lacek »

Theorically you can use applets to communicate with servlets, however, applets run on the client and serverts run on the server, so you need to find a way to communicate with it, possibly over a HTML channel doing HTTP POSTs.
Servets are java programs, so they can do anything in addition to generating HTML output, but still they don't have any really special method to communicate with a java applet, to my knowledge.

Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 483
Joined: 2004-04-06 18:19
Location: Utrecht, NL
Contact:

#5 Post by Jeroen »

Basicly, you'll need to program some protocol that will make some server-side database communicate with the client side applet. I don't think this forum will be the best suited to help you with this (general) programming job, as programming isn't Debian-specific. I suggest taking some programming tutorial/course, especially w.r.t. network protocols, databases, stuff like that.

Post Reply