• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am moving this to the WebLogic forum.
 
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
venu patlori
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank's a lot to all of you.
i did run the servlets and jsp files sucessfully in weblogic server.
thank's to all.
 
Maybe he went home and went to bed. And took this tiny ad with him:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic