Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Status 404 ERROR

 
jay kamaru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my servlet:

this is my html:

this is my web.xml:

i have done all this, but the thing it is showing the http status error when i am trying to run servlet.like it is showing
type Status report

message /servlets/coreservlets.showparameters

description The requested resource (/servlets/coreservlets.showparameters) is not available.

i dont know why it isshowing servlets/coreservlets.showparameters

can you please tell where i should make some changes.

thank you
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jay,

Welcome to JavaRanch!

This forum in particular is about IDEs and the like, we have another forum dedicated to Servlets so I will move this thread over there where it may get a better response. In the future CarefullyChooseOneForum from our big list that best suites your question.

Also, I went and edited your original post to add [code][/code] tags to it. The code tags make it a lot easier to read. You can type them in (just as they appear here) manually or you can use the Code button on top of the message editor to add them for you.

Best of luck!
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not quite sure why it says that /servlets/coreservlets.showparameters is not available, but is your application deployed on the root context path?? If not, then you might want to use ${pageContext.request.contextPath} before /servlet/Parameters in the action of the form (you'll have to make it a JSP instead of HTML in that case). Also in your servlet you are using "first name" and "last name" to get the request parameter but there's no space between the words in your html page...
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not having worked in this space for a while, I am a bit rusty, but my first guess is a deployment problem. If you make changes to the web.xml you need to restart the application in order to see those changes. As Ankit said, it may also come from looking in improper context (i.e. it tries to look up something in the ROOT context when your classes are in a different one)
 
Rizwan Patel
Ranch Hand
Posts: 59
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jay,

Looking at your web.xml the request /servlet/Parameters should satisfy the requirement and display the page.
But, one problem is how come the request /servlets/coreservlets.showparameters get generated?? I dint understand by looking at the servlet as well as your html.
Will you please clarify from where these request generated and where in web.xml it is mentioned?

Regards,
Rizwan
 
jay kamaru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI thank you for your reply

Actually i itself cant understand from where servlets/coreservlets.showparameters has come while excuteing.i am trying to find out where it exists so that i can edit it...

if you help me to edit it then my problem is solved.
 
jay kamaru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI

Now am getting http400 error when am trying to open my servlet

The webpage cannot be found
HTTP 400
Most likely causes:
There might be a typing error in the address.
If you clicked on a link, it may be out of date.

What you can try:
Retype the address.


Go back to the previous page.

Go to and look for the information you want.

More information

this what i get when am trying to open my /servlet/Parameters

please suggest me.
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this what i get when am trying to open my /servlet/Parameters


Again this might be due to the context path of the application. If you application is deployed on the context path /myPath, then in your browser try this path /myPath/servlet/Parameters ...
 
jay kamaru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply .

the were helpful.

now am able to excute.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic