wood burning stoves 2.0*
The moose likes JSP and the fly likes Http status 500 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Http status 500" Watch "Http status 500" New topic
Author

Http status 500

shashank pratap
Greenhorn

Joined: Aug 11, 2009
Posts: 13
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Aug 11, 2009
Posts: 13

I have edited my question as per rules.

Please Help me.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jun 17, 2009
Posts: 273

In the page directive, you have to put quotes around the value of the import attribute.


SCJP 6 || SCWCD 5
shashank pratap
Greenhorn

Joined: Aug 11, 2009
Posts: 13

@ 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Http status 500