• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlets and jsp run

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
please tell me how to run servlets and jsp programs using javawebserver2.0. my operating system is windows NT.
please help me anyone.
thank you & have a nice day
jyothsna.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi jyothsna,

for u'r servlet: copy the servlet class file(for example hello.class) to servlets directory of JavaWebServer2.0
In the browser location bar, type
http://localhost:8080/servlet/hello.class
for JSP: copy u'r jsp page(for ex. hello.jsp) to public_html directory of JWS2.0
In the browser location bar, type
http://localhost:8080/hello.jsp
try this and get back..
good luck!!
regds,
Sandeep
 
jyothsna nandhamuri
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raukutam Sandeep,
thank you for your reply. I did all things means copy to servlets directoy and public_html. And i given url http://localhost:8080/servlet/hello.class.but result is page cann't be displayed. my doubt is can i use servletrunner.exe or httpd.exe. and another is in place of "localhost" can i give any
another name like ipaddress. please clear all these doubts.
and also send me path settings for servlets and jsp.
thank you
jyothsna.
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't need to give .class extension when invoking a servlet.
http://localhost:8080/servlet/Hello is enough

Ajan
 
Raukutam Sandeep
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi jyothsna,

yes, u can use either servletrunner.exe or httpd.exe for running the servlets.
With the latter, u actually start JavaWebServer.
Did u copy u'r .class file to servlets directory?
Pls, would u furnish u'r Servlet code, so that I can tell u where the error is?
U can mail me at rsandeep_1980@yahoo.com
In the place of localhost, u can give the ipaddress of u'r system(if it is standalone, u can give 127.0.0.1)
And localhost is the name of u'r machine. U have to give the name, which u have configured in the network(DNS) settings.
Send u'r servlet code, then I will tell where u got the problem.
regds,
Sandeep.
 
jyothsna nandhamuri
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raukutam Sandeep,
Thank you very much sandeep. i got both servlets
and jsp. main problem is my java web server expires thats why
i can't run my programes. but i installed again. now i can do
both. again thanks.
Thank you & have a great day
jyothsna.
reply
    Bookmark Topic Watch Topic
  • New Topic