• 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

Correct name in action for Servlet-2

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did not notice this anywhere in the forum - sorry if I'm reposting. Hope this is helps someone else.

For Servlet-2 be sure to notice that the html snippet for creating the form needs to have the action statement changed from ...

action='/servlet/ReverseServlet'

to ...

action='/servlet/Reverse'

Going with the convention from earlier assignments, the assignment title implies that the java class be called Reverse.class (not ReverseServlet.class).
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not seeing that. Where did you find that (in context)?

I see:

You will need to create a web page that contains the following HTML fragment:
<form method='post' action='/servlet/ReverseServlet'>
Text: <input type='text' name='text' size='50'>


<input type='submit' value='submit'>
</form>

Instructor's solution:
reverse.html: 15 lines
ReverseServlet: 35 lines

Maybe I'm not understanding what you're saying.
 
Daniel Loranz
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just see the discrepancy now.

On http://www.javaranch.com/java-college.jsp
Assignment 2 is listed as Servlets-2 (ReverseServlet) in which case, the action attribute in the form tag is correct.

While on http://www.javaranch.com/drive/servlet/index.jsp
Assignment 2 is listed as Servlets-2 (Reverse), in which case the action attribute needs to be changed.

Thanks.
- Dan
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Dan.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic