Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic