tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Problem in writing my own web application??????
Date Tue, 30 Apr 2002 21:15:58 GMT
Hello Suresh,

Your class would have to exist in the root of the "myownservlet"
directory in order to be loaded as an applet. This doesn't have
anything to do with Tomcat.  It has to do with Web server mapping.  If
you are pulling up the home page in the path:
http://localhost:8080/testbasicservlet/

Then the path that the web browser will attempt to load the Applet
class is at the root of your webapp such as:
http://localhost:8080/testbasicservlet/AppletThread.class

Make sure you put your class there.  the WEB-INF/classes directory is
not the place to put Applets, only servlets.  BTW, make sure that
WEB-INF is in all caps.  Case matters.  I see you've written it as
"web-inf" a lot, so I thought I'd add that comment.

Jake

Tuesday, April 30, 2002, 3:36:45 PM, you wrote:

SA> I am very new to tomcat. I am trying to write a web application and deploy 
SA> it on tomcat. I am failing to do so in various forms:
SA> My web application is an applet GUI which has two textfields and 
SA> button..once u enter data onto 1st textfiled and press the button the 
SA> request goes to servlet and the servlet sends back the data along with some 
SA> appened value and displays it onto the second textfield of the 
SA> html(applet)page.This is something like applet to servlet communication.
SA> i want to deploy this servlet as web component onto tomcat. I modified the 
SA> server.xml(configuration file ) and added the following code

SA>         <Context path="/testbasicservlet" docBase="myownservlet"
SA>                            debug="0"  reloadable="true">
SA>           </Context>
SA> Also i changed $tomcat_home/webapps/myownservlet/web-inf/web.xml(deployment 
SA> descriptor file) to

SA> <web-app>
SA>     <welcome-file-list>
SA>        <welcome-file>/servlets/helloservletone.html</welcome-file>
SA>     </welcome-file-list>
SA> </web-app>

SA> i have servlets and web-inf directory under 
SA> $tomcat_home/webapps/myownservlet


SA> So when i run http://localhost:8080/testbasicservlet i am able to see 
SA> helloservletone.html page but this html page is not able to load the java 
SA> applet which has GUI in it.the source code for this html file is

SA> <html>
SA> <body>
SA> <h1>Applet to to Servlet Communication</h1><br>
SA> <applet code = "AppletThread.class" width = 400 height = 400 name = a3 align 
= left>>
SA> <param name = abc value = a4>
SA> </applet>
SA> </body>
SA> </html>

SA> ths helloservletone.html brings up empty gui applet(it ddoesn't load 
SA> appletThread.class which has GUI) I donno where to place applet class file 
SA> and servlet class file in tomcat server.since my gui doesn't come up i am 
SA> not able to test the servlet functionality. It is sort of difficult to put 
SA> in word my problem. if it is clear can anyone please let me know how to do 
SA> this
SA> Thanks Much in advance



SA> _________________________________________________________________
SA> MSN Photos is the easiest way to share and print your photos: 
SA> http://photos.msn.com/support/worldwide.aspx


SA> --
SA> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
SA> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
SA> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message