my dog learned polymorphism*
The moose likes BEA/Weblogic and the fly likes can any one tell me how to run servlets in weblogic server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "can any one tell me how to run servlets in weblogic server?" Watch "can any one tell me how to run servlets in weblogic server?" New topic
Author

can any one tell me how to run servlets in weblogic server?

venu patlori
Greenhorn

Joined: Jan 27, 2001
Posts: 12
hi! i have written a servlet program compiled it and copyer it to to the JWS and executed it successfully.but when i run the same program from weblogic ,to my surprise the program dos'nt execute and when i view the source code from the browser ,i see
in the form action as http://localhost:8080/ althouth i changed the form action in html to http://localhost:7001/(alias name of the servlet).i saved the html file several times and i have run but i coudn't execute it.
i have set the classpath and copied the servlet to ,weblogic/myserver/servletclasses dir and html to public_html dir respectively. can anybody guide me where i was wrong ,and what could be the reason for the error.
and i also gave a alias name to the servlet in the
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I am moving this to the WebLogic forum.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
Dear Venu,
You need to register your servlet in weblogic.properties file under the heading
USER-WRITTEN AND DEMO SERVLET REGISTRATIONS
weblogic.httpd.register.alias_name_of_servlet=examples.servlets.servlet_class_name
regards
Ravindra

SCJP, SCJD, SCWCD, SCBCD, SCEA
venu patlori
Greenhorn

Joined: Jan 27, 2001
Posts: 12
hi ravindra,Thank's for your advice .i have redgistered my servlet in weblogic properties as below,
weblogic.httpd.register.proj1(alias name of serlvet)=enter(servlet ).
i copied my servlet class file to weblogic\myserver\servletclasses dir in weblogic.
or is it necesary to copy to weblogic\myserver\servletclasses \examples\servlets dir
venu patlori
Greenhorn

Joined: Jan 27, 2001
Posts: 12
hi ravindra,i tried all the ways but ,i could only execute the servlet when i changed the servlet names and html file names,and then again copied to the weblogic server.why is that when i made the changes earlier with the same file names have'nt reflected in the weblogic/myserver/....... directories.eventhough i deleted the files several times and copied again and again.
why is my weblogic server not accepting the modifications made to the files once copied in weblogic directories,although i get the notification that the file has been overritten.
can any one please help me out.
the version of the weblogic server i'm using is 5.1.
my thank's in advance.
naga bush
Greenhorn

Joined: Jan 29, 2001
Posts: 7
hi venu.,
Whenever u r using package concept that time only u have to create package directories under myserver/servletclasses and . If u r not using package concept u simply copy the servlet class files into myserver/servletclasses.
for example we have one servlet source code in package1
then we can registered the servlet in weblogic properties file.
weblogic.httpd.register.sample1=package1.sample.
Here sample1 alias for package1.sample servlet class.
If u don't used pakage concept in ur code
weblogic.httpd.register.sample(alias name)=sample(servlet name)
and If u have changed the content of the class file and place it under servlet classes the new changed content output will come. There is no problem.
Shripad Bokil
Greenhorn

Joined: Jan 30, 2001
Posts: 13
Hi Venu
Try this.............
Put your .class file of servlet in weblogic/myserver/servletclasses &
remove the comment of the property file line........
weblogic.httpd.register.servlets=weblogic.servlet.ServletServlet
& save the property file
after this start your weblogic server and access your servlet with.....
http://localhost:7001/servlets/yourservletname
I hope this should solve your problem
Regards,
Shripad
venu patlori
Greenhorn

Joined: Jan 27, 2001
Posts: 12
thank's a lot to all of you.
i did run the servlets and jsp files sucessfully in weblogic server.
thank's to all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can any one tell me how to run servlets in weblogic server?