*
The moose likes Servlets and the fly likes Actions in Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Actions in Servlets" Watch "Actions in Servlets" New topic
Author

Actions in Servlets

N. Ounce
Greenhorn

Joined: Oct 17, 2006
Posts: 6
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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
N. Ounce
Greenhorn

Joined: Oct 17, 2006
Posts: 6
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

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Oct 17, 2006
Posts: 6
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Actions in Servlets
 
Similar Threads
GET method working but POST method not working
Post-Request-Get technique
is there a any validation API in java
Session swapping problem under load
Retrieving information from previous page's form