File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes a problem with running the servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "a problem with running the servlet" Watch "a problem with running the servlet" New topic
Author

a problem with running the servlet

zohreh talebi
Ranch Hand

Joined: Sep 01, 2006
Posts: 41
Dears,

I have two classes and one of them include main method and this class should run and give the result but i want to show the result by servlet so i cut the main method and paste it to doGet of my servlet but when i run it , it don't give me the result while the class itself run successfully .

Regards
Zohreh
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I think that you'll have to develop on what you mean by "it don't give me the result". Any exception thrown ? Have you checked the log files ?


[My Blog]
All roads lead to JavaRanch
zohreh talebi
Ranch Hand

Joined: Sep 01, 2006
Posts: 41
Thanks Satos.

the class that it have main method is responsible for showing my webcam picture in a frame and it's work successfully but when i cut the main method and take it in doGet . the servlet only show the frame without any exception and don't detect my webcam.

Zohreh
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

When you say "show a picture in a frame" do you mean a Swing JFrame?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
zohreh talebi
Ranch Hand

Joined: Sep 01, 2006
Posts: 41
yes.the class extends from JFram.
zohreh talebi
Ranch Hand

Joined: Sep 01, 2006
Posts: 41
any idea is great for me.please...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by zohreh talebi:
yes.the class extends from JFram.


I think you've got some fundamental misunderstandings about the way a servlet app works.

Servlets deliver web content (usually HTML and Javascript) to clients over HTTP. The client (usually a browser) may or may not even be Java enabled.
Often the servers don't have GUIs running.

If you want to run Swing components on the client's machine, you'll need to look into either applets or JWS.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: a problem with running the servlet