my dog learned polymorphism
The moose likes JSP and the fly likes Combination Question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Combination Question" Watch "Combination Question" New topic
Author

Combination Question

Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
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!!!


CNSS/NSA Infosec Professional,<br />Software Engineer
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
using the action in the form should work.
can u post some code?
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
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

Joined: Apr 21, 2002
Posts: 48
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

Joined: Apr 18, 2002
Posts: 238
added method=post to form. Now get Null Pointer exception in servlet....
AAAAUUUGGHHHHH!
Amir Kamran
Ranch Hand

Joined: Apr 21, 2002
Posts: 48
write the code of doGet in doPost after the line client = getParameter("client");
I think this will solve the problem
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
THankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyou
THankyouTHankyouTHankyouTHankyou!

(it worked!... Now to make it really do somthing...)
[ May 23, 2002: Message edited by: Sam Smoot ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Combination Question
 
Similar Threads
how to call Jsp in servlet
JSP can't pass Session to a servlet?
Notify JSP that ServletContext been changed?
Trying to access a servlet on button click
repopulate radio button