This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp calling a servlet  RSS feed

 
Prasad Kharkar
Ranch Hand
Posts: 446
1
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I am trying to call a servlet from a jsp but that is not working at all
I tried the following code


but when I try to go to another servlet other than ExamInitilizer
let us say,

if we write


I have not written any code in doGet and doPost method of both servlets other than simle println statements

second works fine but first does not work
all the spellings and paths are correct
what can be the problem
 
Paul Clapham
Sheriff
Posts: 22199
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prasad Kharkar wrote:all the spellings and paths are correct


I doubt that. If I had been designing the system that servlet would not have been called "ExamInitilizer" because that isn't correct spelling. I would have called it "ExamInitializer". Maybe -- as you say -- all the spellings are correct. In which case you too should use the correct spellings.

And by the way you are not trying to "call" a servlet with that code. That is vague and unhelpful terminology. You are trying to forward to a servlet. Please use the standard terminology, it makes it much easier if we don't have to guess at the meaning of vague and undefined words like "call".
 
Vijitha Kumara
Bartender
Posts: 3974
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked your mappings in web.xml for the offending servlet?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!