• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Http status 500

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have edited my question as per rules.

Please Help me.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 282
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic