This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Actions in Servlets

 
N. Ounce
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am pretty new in servlets and Java Development in general and I need to implement a simple login page where a user enters his username and login, he is connected to a Progress Database and transferred to a page that says that his login was successfull.
I am trying to implement this through actions and action factory (this is taken from a book example and slightly changed to work with Progress Database)

JavaTestServlet.java:


so, LoginAction class, method perform should receive USERNAME and PASSWORD parameters from calling class, but Eclipse continues showing error "Can't resolve Username and Password parameters". How can I achieve that they are sent to my procedure by JavaTestServlet?

[ October 18, 2006: Message edited by: Natalia Ounce ]
[ October 18, 2006: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javaranch tip:
Natalia Ounce,

Javaranch Tip:
If you are going to post more than a line or two of your code, wrap that
code in a set of UBB Code tags.
Doing so will help to preserve your code's indenting, making it easier to read.
If it is easier to read, more people will actaully read it and you will
stand a better chance of getting help with your question.
See UseCodeTags for more
help with UBB code tags.
 
N. Ounce
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
Javaranch tip:
Natalia Ounce,

Javaranch Tip:
If you are going to post more than a line or two of your code, wrap that
code in a set of UBB Code tags.
Doing so will help to preserve your code's indenting, making it easier to read.
If it is easier to read, more people will actaully read it and you will
stand a better chance of getting help with your question.
See UseCodeTags for more
help with UBB code tags.


Sure, thanks.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are the USERNAME and PASSWORD variables being set?
Can you post the HTML form you're using to post the request?
 
N. Ounce
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found out that Action has to be my own interface not swing.action, looking like this:


Then it works.

[ October 18, 2006: Message edited by: Natalia Ounce ]
[ October 18, 2006: Message edited by: Natalia Ounce ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic