This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Improving jsp Skills Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Improving jsp Skills" Watch "Improving jsp Skills" New topic
Author

Improving jsp Skills

praveen shinde
Ranch Hand

Joined: Jun 03, 2009
Posts: 63
Hello ,
I want to improve upon my Jsp skills.
I have written a jsp to accept username & password. Then I have displayed the username and password on another jsp. Now I want to go forward. Can you give any suggestions what jsps to write?
Thanks & regards,
Praveen
Komal Renu
Ranch Hand

Joined: Jul 21, 2011
Posts: 51
Hi Praveen,

You could try extending to displaying various input types like dropdowns, multiboxes, radio buttons, checkboxes.
Then start with displaying list of data in tables (display tags).
Go ahead then to explore logic tag library and so on.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
praveen shinde
Ranch Hand

Joined: Jun 03, 2009
Posts: 63
Thanks ,

I will do the activities you have mentioned.
Praveen
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

There is still lot more to it like JSTL, EL, custom tag libraries, XML syntax,etc

But no matter what you do, make sure to stay away from scriptlets.


SCJP, SCWCD.
|Asking Good Questions|
praveen shinde
Ranch Hand

Joined: Jun 03, 2009
Posts: 63
Thanks Amit,
I will do these one by one. I have used scriptlets.
They are to be avoided in jsp , I gather.
Regards,
Praveen
Harshavardhan Joshi
Greenhorn

Joined: Sep 27, 2011
Posts: 7

Amit Ghorpade wrote:There is still lot more to it like JSTL, EL, custom tag libraries, XML syntax,etc

But no matter what you do, make sure to stay away from scriptlets.


But how can we display dynamic data on the page without scriptlets?

eg.We need to populate a HTML combo at run time using Collection.

Please explain because I also need to improve upon my Jsp skills.

Thanks.
Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Harshavardhan Joshi wrote:
But how can we display dynamic data on the page without scriptlets?

eg.We need to populate a HTML combo at run time using Collection.

Thanks.


So you should see JSTL and custom tag libraries, as Amit Ghorpade mentioned above.


Advanced java topics
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60745
    
  65

Harshavardhan Joshi wrote:But how can we display dynamic data on the page without scriptlets?

The JSTL and EL were introduced over 10 years ago to replace scriptlets. Do you not think it's time to catch up?

eg.We need to populate a HTML combo at run time using Collection.

There is no such thing as an "HTML combo". Please read this: HtmlHasNoComboBox

Please explain because I also need to improve upon my Jsp skills.

It's good that you realize that because your JSP skills are badly out of date.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Harshavardhan Joshi
Greenhorn

Joined: Sep 27, 2011
Posts: 7

I know that maintaining jsp's with the scriplets is hard. And they look ugly.
But I just wanted to know that does scriplets in the jsp's cause performance issues.

And we need to use <SELECT> and <OPTION> tags of HTML to create the drop down list.
Sorry for mentioning it HTML COMBO

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60745
    
  65

Harshavardhan Joshi wrote:But I just wanted to know that does scriplets in the jsp's cause performance issues.

As with any other code, you can write inefficient code that causes performance issues. Efficient code will be efficient -- inefficient code will be inefficient.
praveen shinde
Ranch Hand

Joined: Jun 03, 2009
Posts: 63
Hello,
i will post my updates shortly.
Praveen
Harshavardhan Joshi
Greenhorn

Joined: Sep 27, 2011
Posts: 7

That would be great Praveen!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Improving jsp Skills
 
Similar Threads
how to get the username from session?
Authnetication and getRemoteUser()
Reading password information from a text file.
what is the equivalent code on jsp?
Hide password in Mozilla's Http Header plugin