Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

converting servlet code into jsp  RSS feed

 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have been provided some existing servlet code with lots of out.println statements that I have to convert to a more presentable interface.In a nutshell I want to write a jsp with better look and feel than existing servlet code. Is there some standard approach/tips or tricks for doing this?

Thanks in advance
 
Vijitha Kumara
Saloon Keeper
Posts: 3997
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
servlet code with lots of out.println statements that I have to convert to a more presentable interface


That's the main intention of introducing JSP. You must consider using JSTL, EL and JSP Standard Actions, together you can eliminate all those System.out statements used to do the presentation logic. You better start from Jsp FAQ if you are not familiar with JSP.
 
Sri Gnana
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

First do the Import then write the servlet as a function inside declaration and call that class from jsp.
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Guys

I will give this a try
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use some existing jsp structure from the internet and then use it to integrate with my application or should I start from scratch.

From where can I get such a jsp

Please advice
 
Vijitha Kumara
Saloon Keeper
Posts: 3997
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you got the JSP basics it's all about how you design the views to match your requirements. You may get started by a sample but it'll be more useful for you to do it your self . At the end you will be designing the view according to your requirement.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!