This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running servlets in WTE

 
Fred Abbot
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me how to run servlets in the WTE
I have them in VAJ
where do i put my HTML files etc....
thank you
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\hosts\default_host\default_app\servlets\
should contain servlet classes

\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\hosts\default_host\default_app\web\
should contain JSP or HTML

I don't remember where exactly, but there is a step-by-step in the online help of VAJ to help you during testing process
 
Fred Abbot
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you ---
so now when i run http:\\localhost:8080 my first page comes up but then when i try to hit a servlet from there it cant find the servlet???

[This message has been edited by Fred Abbot (edited December 12, 2001).]
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Fred Abbot:
Thank you ---
so now when i run http:\\localhost:8080 my first page comes up but then when i try to hit a servlet from there it cant find the servlet???

[This message has been edited by Fred Abbot (edited December 12, 2001).]

In WTE, if you do not add any special mapping in a .xml file, you have to call the servlet using the package full name.
ie : http://localhost/mywebapp/com.mycomp.myproject.myservlet
Is it the syntax you use to call the servlet ?
 
Fred Abbot
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually that is not the way i call my servlet
it is called by my HTML page which is in the web folder of the WTE and i call by /package name/directory/directory/etc..
but it cant find the first directory
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Fred Abbot:
actually that is not the way i call my servlet
it is called by my HTML page which is in the web folder of the WTE and i call by /package name/directory/directory/etc..
but it cant find the first directory


I've made a mistake yesterday.
All apologizes.
You can call your servlet adding the /servlet/ in the url.
FORM method=POST ACTION="/servlet/com.mycompany.myServlet
Then your servlet has to be in the following folder :
"\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\hosts\default_host\default_app\servlets\com\mycompany\"
[This message has been edited by Bill Bailey (edited December 14, 2001).]
[This message has been edited by Bill Bailey (edited December 14, 2001).]
 
Vijay Bala
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try action="/servlet/com.myservletname" in your html page. servlet should be in /servlet directory of webapp.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic