This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JSPs and Servlets in WAS, without a web application

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Is it possible to deploy JSPs and Servlets in WAS, without them being a part of any web application(even default web app). If yes, what is the document root, and how do we specify the URI and such properties for a servlet?
-Bala Krishna
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Guess this question has been asked by you earlier and answered.
Any way, you could go to the WebSphere server console, create a virtual host and deploy your JSPs there.
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Suneel you don't deploy your servlets/JSP's in a virtual host. You deploy them in either a servlet container.
Bala,
If you put your servlets in the <WAS_home>/appserver/servlets your servlets will work with http://localhost/servlet/HelloWorldServlet
Where HelloWorldServlet.class is available in the servlets Folder.
If you want to play around with your jsp's then you can put them in
<ibm http server root>/htdocs
 
Bala Krishna
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your answer. I have tried out what you told me about placing JSPs in htdocs. The url I am trying is : http://localhost/htdocs/test.jsp. When this didn't work, I've tried http://localhost/test.jsp. That didn't work either.
What should be the URL for accessing JSPs stored in this directory? We are using IHS 1.3.12 and WAS 3.5.2. What am I doing wrong here? Could you please help me?
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To deploy JSPs, you need to put the JSP files into the "Document Root" of an "Web Application" which is in turn in a "Servlet Engine" of an "Application Server". The /htdocs directory of IHS just serve the static html pages and has nothing to do with WAS.
You MUST setup an "Web Application" to serve JSPs & Servlets.
Try it again! Good luck!
You can find more info about Administer applications here
------------------
Tony Chen
SCJP, ICS & ICSD (WebSphere)
 
Bala Krishna
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony,
Thanks for answering. That's exactly what I wanted to know - whether or not we can server JSPs without a web application. Looks like this is a short coming in Websphere(to not be able to server JSPs without defining a web app). I already have created web apps and been able to serve JSPs thru that, but wanted to know if I always have to go thru the pain of having a web app. Thanks once again.
-Bala.
 
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic