New to JSP world

B

bill

Hi all,

I'm new to jsp and xml. I don't expect anyone to code my solution for
me but I have NO IDEA which way to go to learn what I need to know in
order to get this done. I bought a few books which have helped but I'm
basically stuck. I have some background in programming (ASP, VB) but
I'm having a rough go at getting started with jsp. In the last week
I've managed to install the J2SE, Tomcat and Tomcat connector on a Win
2000 server running IIS 5. Now the task I have at hand is this. I have
a simple form. Call it form #1 which contains a textfield for an e-mail
address and a submit button. I use form #1 to connect to a db2 database
via a supplied java based API that was written by my company. This API
then returns some XML about the person attached to that e-mail address.
If the e-mail address is not found I need to redirect to an eror page.
If the e-mail address IS found in the database, I need to strip out
just the e-mail address, put it into some kind of variable and redirect
the user to another form (Form #2) populating the e-mail field in Form
#2 with that same e-mail address. What techniques should I be looking
into to learn what I need to know? If it were php and mySql I could
have had the project finished in the length of time ot took me to write
this post lol. Thanks All!
 
I

isamura

: Hi all,
:
[snip]
: I have
: a simple form. Call it form #1 which contains a textfield for an e-mail
: address and a submit button. I use form #1 to connect to a db2 database
: via a supplied java based API that was written by my company. This API
: then returns some XML about the person attached to that e-mail address.
: If the e-mail address is not found I need to redirect to an eror page.
: If the e-mail address IS found in the database, I need to strip out
: just the e-mail address, put it into some kind of variable and redirect
: the user to another form (Form #2) populating the e-mail field in Form
: #2 with that same e-mail address. What techniques should I be looking
: into to learn what I need to know? If it were php and mySql I could
: have had the project finished in the length of time ot took me to write
: this post lol. Thanks All!
:
I assume you need to write the form-action handler to process the submit button action. In that
case, you have two options:

1. Servlet
2. Scriptlet

I personally prefer Servlet over Scriptlet because I want to keep java code separate from the jsp.

..K
 
B

bill

I assume you need to write the form-action handler to process the submit button action. In that
case, you have two options:

1. Servlet

That was my thinking. The form #1 is housed here on our server and the
API is housed on another server which I have no access to. All I get
back is some XML relating to the person in a string. How do I pull the
e-mail out of XML and back into my JSP. Or simply, let JSP know that
this persons e-mail exsists in the db?
 
I

isamura

: > I assume you need to write the form-action handler to process the submit button action. In that
: > case, you have two options:
: >
: > 1. Servlet
:
: That was my thinking. The form #1 is housed here on our server and the
: API is housed on another server which I have no access to. All I get
: back is some XML relating to the person in a string. How do I pull the
: e-mail out of XML and back into my JSP. Or simply, let JSP know that
: this persons e-mail exsists in the db?
:
If you know the tag element of the email address, you can parse/filter the xml stream to pull it
out.

..K
 
R

Roedy Green

basically stuck. I have some background in programming (ASP, VB) but
I'm having a rough go at getting started with jsp.

I suspect you have no JSP text books in your collection. JSP and
servlets are not that complicated. The hardest part is not barfing at
the ugly syntax.

See http://mindprod.com/jgloss/jsp.html

Marty Hall is one of the best Java writers around. He has three books
out on the topic.
 
J

Jack

Marty Hall is one of the best Java writers around. He has three books
out on the topic.

bravo. I always liked the way that he explained the "why"of things,
rather than just relaying or describing knowledge. And though nothing
suffices in stead of a book for learning at the beginning, he does
have tutorials on the web also.
 
R

Roedy Green

bravo. I always liked the way that he explained the "why"of things,
rather than just relaying or describing knowledge. And though nothing
suffices in stead of a book for learning at the beginning, he does
have tutorials on the web also.

I always imagined Marty Hall as a white haired professor with a slight
English accent. I had communicated with him many times over the years
in email. I saw a picture of him a month or so ago. He is quite young
and looks like a football player.

Similarly I imagined Dimitry Leskov at Jet/Excelsior to be tall thin,
Mr. Burns clone, bald about 65, looking like Professor Leimanis, my
advanced algebra prof at UBC. He too is a young "sprout".
 
J

Jack

ah well, I'm 6'3", not too heavy/mesomorph but can deadlift over 300
lbs. And I'm no spring chicken, either. I've had two observations
about being, or trying to be, a super programmer:

1) I think it could make your neck thin :) no offense meant to
anybody, but I do tend to live too cerebrally, when concentrating so
much on these things
2) you generally start to lose command of language. Programmers
(generally) are not good at spelling or grammar. I think I'm pretty
good at language. But if I have an intensive job where I code all day,
no chitchat, nothing other than problem solving, I start to lose that.
E.g., my fingers will type out "their" when I damn know well it's
"they're".
 
L

Luke Webber

Jack said:
ah well, I'm 6'3", not too heavy/mesomorph but can deadlift over 300
lbs. And I'm no spring chicken, either. I've had two observations
about being, or trying to be, a super programmer:

1) I think it could make your neck thin :) no offense meant to
anybody, but I do tend to live too cerebrally, when concentrating so
much on these things

It's not necessarily the case said:
2) you generally start to lose command of language. Programmers
(generally) are not good at spelling or grammar. I think I'm pretty
good at language. But if I have an intensive job where I code all day,
no chitchat, nothing other than problem solving, I start to lose that.
E.g., my fingers will type out "their" when I damn know well it's
"they're".

Not so me. I might get a bit that way when I'm tired, drunk or just
plain hurried, but in general, I'm damned proud of my communication skills.

Luke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top