• Post Reply Bookmark Topic Watch Topic
  • New Topic

Combination Question

 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Java, JSP, and Websphere... I am trying to create a form (HTML or JSP) and am trying to pass the input to a servlet on my test platform. How do you "path" the call to the servlet? I have tried the UseBean method as well as trying to call the servlet in the action parameter of the form, but nothing shows up. When I default a value in the servlet, it works fine.
HELP!!!
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using the action in the form should work.
can u post some code?
 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get my table headings, but no data. IF I hardcode the value in the servlet, I get data....
The servlet is:

The JSP is:

any suggestions?
[ May 23, 2002: Message edited by: Sam Smoot ]
[ May 23, 2002: Message edited by: Sam Smoot ]
 
Amir Kamran
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I think what the problem is on submit the servlet doGet() method is invoked because u not specify the method attribute of the <form>. and u recieve the parameter in doPost() which is never called therefore the client is always null.
 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
added method=post to form. Now get Null Pointer exception in servlet....
AAAAUUUGGHHHHH!
 
Amir Kamran
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
write the code of doGet in doPost after the line client = getParameter("client");
I think this will solve the problem
 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyou!

(it worked!... Now to make it really do somthing...)
[ May 23, 2002: Message edited by: Sam Smoot ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!