Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Http status 500

 
shashank pratap
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Help,

I am using eclipse and tomcat 5.5.

my directory structure is



i have kept my servlet in directory classes.com.example.TestServlet.java
and my attribute class is in directory in classes.com.attrib.Person.java

In the index.html file there is only one simple form which takes name
of the user and there is submit button.



In TestServlet i get the parameter and set the attribute in person object

my code is this..

i have imported import classes.com.attrib.*;




in Hello.jsp i have used scripting..

here also i have imported import classes.com.attrib.*;
and my code is this...


i am not able to figure out what is going wrong, after i hit submit button it shows me 500 error.
Please help me as i am new to servlet and jsp..

I am just doing this to see the communication between servlet , jsp and html.

please any one..

shashank pratap.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.

Also note that the directory structure is impossible to understand without formatting. Also, please TellTheDetails: without knowing under what circumstances the error happens, it's much more difficult to help. Also, if there is a stack trace, please include it.
 
shashank pratap
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have edited my question as per rules.

Please Help me.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see your web.xml file, so we have no way of known if the servlet is configured correctly. Is there a stack trace? Where are the servlet classes being deployed to? There's no indication of where your class files located in your directory hierarchy.
 
Michael Angstadt
Ranch Hand
Posts: 277
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the page directive, you have to put quotes around the value of the import attribute.
 
shashank pratap
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

@ Michael Angstadt,

It just worked , i did a silly mistake . although i reviewed my code many time but i could not figure out.

Thanks a lot..


shashank pratap
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic