•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 426,187 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,810 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 5436 | Replies: 26
![]() |
•
•
Join Date: Nov 2004
Location: tiny island in indian ocean
Posts: 138
Reputation:
Rep Power: 4
Solved Threads: 1
hi to all
well i know html, css javascrpit php apache and mysql. but now i am learning jsp and I DONT HAVE ANY JAVA PROGRAMMING EXPERIENCE!!!
uptill now i just cant figure out whats java and jsp all about well i know its a serverside scripting for web development in java but to start validating forms creating shopping carts and ecommerce online transactions wowow that gonna be very veyr tough please help
thanks
well i know html, css javascrpit php apache and mysql. but now i am learning jsp and I DONT HAVE ANY JAVA PROGRAMMING EXPERIENCE!!!
uptill now i just cant figure out whats java and jsp all about well i know its a serverside scripting for web development in java but to start validating forms creating shopping carts and ecommerce online transactions wowow that gonna be very veyr tough please help
thanks
:lol: I am not one of those who wait for things to happen, :p but one of those who make things happen ;)
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
•
•
•
•
but to start validating forms creating shopping carts and ecommerce online transactions wowow that gonna be very veyr tough please help
And that's why you should start small...
Baby steps, not giant leaps.
And do NOT use that linked tutorial. It's about 7 years out of date, and teaches you exactly how you should NOT work.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
•
•
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 202
Reputation:
Rep Power: 3
Solved Threads: 6
hi jwenting, I am also new to jsp. what do you suggest.
I am looking at reducing my learning time tremendously. I am ready to work. Already a programmer 12 yrs. Looking at java and jsp but have little know-how. I was already looking at the tutorial before i saw your advice.
Will be glad to hear from you.
I hope this does not qualify as a private message asking for help
I am looking at reducing my learning time tremendously. I am ready to work. Already a programmer 12 yrs. Looking at java and jsp but have little know-how. I was already looking at the tutorial before i saw your advice.
Will be glad to hear from you.
I hope this does not qualify as a private message asking for help
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
Get yourself some good books.
Head First Servlets and JSP for starters, and O'Reilly's JSP book (be sure to get the 3rd edition or later, the others are outdated).
Install Tomcat, read those books, and start experimenting.
Head First Servlets and JSP for starters, and O'Reilly's JSP book (be sure to get the 3rd edition or later, the others are outdated).
Install Tomcat, read those books, and start experimenting.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Mar 2007
Posts: 83
Reputation:
Rep Power: 0
Solved Threads: 2
Now I have not seen the site in the link above and jwenting and I have had words over "opinion" about what is right and what is not... Unfortunately, I find his posts to be very little help to most people, he seems to want to post to everything but usually says little more than, "good luck", or "go find out for yourself" type of things... which is just what he has done here... How can he be a moderator when he doesn't wish to help people, and his posts are so negative, I have no idea...
There is nothing wrong with learning to code however it works for you... You can learn using scriptlets, then when you feel comfortable you can move the scriptlets into a custom tag library, a change which takes very little effort. Then you can, if you choose, build robust servlet MVC applications...
He loves to say that things are 7 years out of date and since that site has been registered for 7 years he would have you believe the content was outdated the moment it was published...
Do what works for you, but don't stop learning just because you found 1 way, always search for newer, better ways, and don't get a closed mind like some people we know...
When you actually know what you're doing help people on tech lists rather than just shine them on, and remember the ancient Japanese proverb... "Junin Toiro" roughly translated... "10 people, 10 colors" which sounds more pleasant than the equivalent English phrase, "Different Strokes for Different Folks"... "Different Strokes" now that was a good TV show ;-)
Peace,
There is nothing wrong with learning to code however it works for you... You can learn using scriptlets, then when you feel comfortable you can move the scriptlets into a custom tag library, a change which takes very little effort. Then you can, if you choose, build robust servlet MVC applications...
He loves to say that things are 7 years out of date and since that site has been registered for 7 years he would have you believe the content was outdated the moment it was published...
Do what works for you, but don't stop learning just because you found 1 way, always search for newer, better ways, and don't get a closed mind like some people we know...
When you actually know what you're doing help people on tech lists rather than just shine them on, and remember the ancient Japanese proverb... "Junin Toiro" roughly translated... "10 people, 10 colors" which sounds more pleasant than the equivalent English phrase, "Different Strokes for Different Folks"... "Different Strokes" now that was a good TV show ;-)
Peace,
•
•
Join Date: Mar 2007
Posts: 83
Reputation:
Rep Power: 0
Solved Threads: 2
Now, for some programming advice...
using Java & JSP is not so hard...
You can put all the code into the JSP pages, you can separate some or all of your logic into servlets (small independant routines that run on the server) and leave you presentation logic in jsp files... you can use beans to store data between for passingbetween the logic and jsp, or jsp to jsp, and you can create custom tags to do specific logic that is unique to your site...
in the begining jsp did NOT have any way to loop through a code sequence repeatedly... this was a great weakness of JSP and so developers were forced to either
a) limit their output to fixed number of itterations... troublesome at best
b) create custom tags that would cause a loop.... common in professional applications where they wanted to hide the code...
c) use embedded Java (scriptlets) inthe code to control the loop...
This is just one example of why scriptlets were frequently needed.
Beans can also do more than just store information, you can program any logic into the bean code and trigger it either by the bean constructor or by a call into the bean from the jsp page... this use of beans removes the need, almost entirely, for servlets...
Then there is the MVC which stands for Model View Controller, a fancy way of saying separate logic, data storage "state", and presentation... in the MVC architecture model jsp "shows" the content to the user, and collects data via forms from the user... the forms are sent to the servlets on the server... the servlets handle the logic of processing the data and determine the results... the servlets place any output data, results, etc. into beans objects and save those into a scope that will persist, request, session or application... depending upon the need... the servlet then "forwards" the request to a jsp page, logic can choose between jsp pages if you like, to determine which one to show... this is a unique feature of Java over most other web coding languages... Java can pass the request off to another page, etc. to finish processing... most others cannot do that... that means that the servlet that processes your form, could pass the request to another servlet, and another and antoher, etc. prior to passing it off to the jsp page.... the jsp page, of course, shows the output....
This makes it easier to work in larger projects because it encapulates the code segments into logically related pieces and they are "pluggable" meaning they don't care what the other pieces do, or how, they just do what they do... you can modify the jsp page to chnage the display, without any effect on the servlet, or bean....
Oh, the bean, I forgot to mention... the data that was saved int he bean, because the bean was saved in a scope that persisted, canbe read from the jsp page so it know exactly what the results of the servlet processing were... at least the part it cares about...
jsp's key items are useBean, getProperty and setProperty... for accessing those beans...
Servlets are a bit more trickly but basically they are Java Classes that extend the HttpServlet class and implement the "action" methods of that parent class, but only the ones you need... so you can only worry about what you need... frequestly these are doPost and doGet...
Beans are just Java classes which usually store properties as private variables, and use methods to set or get the values of these properties... as I said, they can do much more too, but they don't have to...
it can be as simple as
private String name = "";
public void setName(String name){
this.name = name; // this.name keyword indicates the bean's name variable as opposed to the local name variable
}
public String getName(){
return this.name;
}
database access from a jsp, servlet or bean is a simple matter... I created a class file in which I place my connection code so I can obfuscate the passwords and usernames for db access, something that is hard to do in ASP, php, etc...
The rest of building you high end applications is the creative use of JSP, Java, Javascript, CSS, HTML, XML, databses and etc. most of which you already know...
using Java & JSP is not so hard...
You can put all the code into the JSP pages, you can separate some or all of your logic into servlets (small independant routines that run on the server) and leave you presentation logic in jsp files... you can use beans to store data between for passingbetween the logic and jsp, or jsp to jsp, and you can create custom tags to do specific logic that is unique to your site...
in the begining jsp did NOT have any way to loop through a code sequence repeatedly... this was a great weakness of JSP and so developers were forced to either
a) limit their output to fixed number of itterations... troublesome at best
b) create custom tags that would cause a loop.... common in professional applications where they wanted to hide the code...
c) use embedded Java (scriptlets) inthe code to control the loop...
This is just one example of why scriptlets were frequently needed.
Beans can also do more than just store information, you can program any logic into the bean code and trigger it either by the bean constructor or by a call into the bean from the jsp page... this use of beans removes the need, almost entirely, for servlets...
Then there is the MVC which stands for Model View Controller, a fancy way of saying separate logic, data storage "state", and presentation... in the MVC architecture model jsp "shows" the content to the user, and collects data via forms from the user... the forms are sent to the servlets on the server... the servlets handle the logic of processing the data and determine the results... the servlets place any output data, results, etc. into beans objects and save those into a scope that will persist, request, session or application... depending upon the need... the servlet then "forwards" the request to a jsp page, logic can choose between jsp pages if you like, to determine which one to show... this is a unique feature of Java over most other web coding languages... Java can pass the request off to another page, etc. to finish processing... most others cannot do that... that means that the servlet that processes your form, could pass the request to another servlet, and another and antoher, etc. prior to passing it off to the jsp page.... the jsp page, of course, shows the output....
This makes it easier to work in larger projects because it encapulates the code segments into logically related pieces and they are "pluggable" meaning they don't care what the other pieces do, or how, they just do what they do... you can modify the jsp page to chnage the display, without any effect on the servlet, or bean....
Oh, the bean, I forgot to mention... the data that was saved int he bean, because the bean was saved in a scope that persisted, canbe read from the jsp page so it know exactly what the results of the servlet processing were... at least the part it cares about...
jsp's key items are useBean, getProperty and setProperty... for accessing those beans...
Servlets are a bit more trickly but basically they are Java Classes that extend the HttpServlet class and implement the "action" methods of that parent class, but only the ones you need... so you can only worry about what you need... frequestly these are doPost and doGet...
Beans are just Java classes which usually store properties as private variables, and use methods to set or get the values of these properties... as I said, they can do much more too, but they don't have to...
it can be as simple as
private String name = "";
public void setName(String name){
this.name = name; // this.name keyword indicates the bean's name variable as opposed to the local name variable
}
public String getName(){
return this.name;
}
database access from a jsp, servlet or bean is a simple matter... I created a class file in which I place my connection code so I can obfuscate the passwords and usernames for db access, something that is hard to do in ASP, php, etc...
The rest of building you high end applications is the creative use of JSP, Java, Javascript, CSS, HTML, XML, databses and etc. most of which you already know...
•
•
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 202
Reputation:
Rep Power: 3
Solved Threads: 6
thanks rgtaylor for your reply. It is pretty much appreciated
I am very much involved with microsoft ASP.Net. Do you have any knowledge of this environment. If the answer is yes, can you highlight the asp.net counterpart or parallels of the features you just itemized in jsp. This would aid my "birdseye view" understanding of the subject matter. Thanks alot man!(I presume)
I am very much involved with microsoft ASP.Net. Do you have any knowledge of this environment. If the answer is yes, can you highlight the asp.net counterpart or parallels of the features you just itemized in jsp. This would aid my "birdseye view" understanding of the subject matter. Thanks alot man!(I presume)
•
•
•
•
Now, for some programming advice...
using Java & JSP is not so hard...
You can put all the code into the JSP pages, you can separate some or all of your logic into servlets (small independant routines that run on the server) and leave you presentation logic in jsp files... you can use beans to store data between for passingbetween the logic and jsp, or jsp to jsp, and you can create custom tags to do specific logic that is unique to your site...
in the begining jsp did NOT have any way to loop through a code sequence repeatedly... this was a great weakness of JSP and so developers were forced to either
a) limit their output to fixed number of itterations... troublesome at best
b) create custom tags that would cause a loop.... common in professional applications where they wanted to hide the code...
c) use embedded Java (scriptlets) inthe code to control the loop...
This is just one example of why scriptlets were frequently needed.
Beans can also do more than just store information, you can program any logic into the bean code and trigger it either by the bean constructor or by a call into the bean from the jsp page... this use of beans removes the need, almost entirely, for servlets...
Then there is the MVC which stands for Model View Controller, a fancy way of saying separate logic, data storage "state", and presentation... in the MVC architecture model jsp "shows" the content to the user, and collects data via forms from the user... the forms are sent to the servlets on the server... the servlets handle the logic of processing the data and determine the results... the servlets place any output data, results, etc. into beans objects and save those into a scope that will persist, request, session or application... depending upon the need... the servlet then "forwards" the request to a jsp page, logic can choose between jsp pages if you like, to determine which one to show... this is a unique feature of Java over most other web coding languages... Java can pass the request off to another page, etc. to finish processing... most others cannot do that... that means that the servlet that processes your form, could pass the request to another servlet, and another and antoher, etc. prior to passing it off to the jsp page.... the jsp page, of course, shows the output....
This makes it easier to work in larger projects because it encapulates the code segments into logically related pieces and they are "pluggable" meaning they don't care what the other pieces do, or how, they just do what they do... you can modify the jsp page to chnage the display, without any effect on the servlet, or bean....
Oh, the bean, I forgot to mention... the data that was saved int he bean, because the bean was saved in a scope that persisted, canbe read from the jsp page so it know exactly what the results of the servlet processing were... at least the part it cares about...
jsp's key items are useBean, getProperty and setProperty... for accessing those beans...
Servlets are a bit more trickly but basically they are Java Classes that extend the HttpServlet class and implement the "action" methods of that parent class, but only the ones you need... so you can only worry about what you need... frequestly these are doPost and doGet...
Beans are just Java classes which usually store properties as private variables, and use methods to set or get the values of these properties... as I said, they can do much more too, but they don't have to...
it can be as simple as
private String name = "";
public void setName(String name){
this.name = name; // this.name keyword indicates the bean's name variable as opposed to the local name variable
}
public String getName(){
return this.name;
}
database access from a jsp, servlet or bean is a simple matter... I created a class file in which I place my connection code so I can obfuscate the passwords and usernames for db access, something that is hard to do in ASP, php, etc...
The rest of building you high end applications is the creative use of JSP, Java, Javascript, CSS, HTML, XML, databses and etc. most of which you already know...
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the JSP Forum
- Previous Thread: how to get day on particular date
- Next Thread: jsp



Linear Mode