• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can JSP with JSTL be configured as a web service using Axis?

 
Sonal Gole
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have designed an web application "Hotel Reservation System" using JSTL sql tags and tomcat. I am accessing my SQL Server database through the JSTL sql tags. I am not using a single java class/bean in my application.
Now, I want to convert my work into a web service using axis and tomcat. My concern is will it be possible to somehow develop a web service without having any explicit java classes having the business logic..since I wrote my logic into JSP pages using JSTL tags!
I am in a fix as to is this possible or it completely defies the concept web services and RPC. I am look forward to use my work as till now (JSP+JSTL) further to get the web service designed.
It will be really helpful if anyone can show me the direction I will have to head to. Thank you.

--Sonal
[ December 06, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sonal",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sonal:
I wrote my logic into JSP pages using JSTL tags! ...
I am in a fix as to is this possible or it completely defies the concept web services and RPC.


It completely defines all accepted practices of just about everything.


It will be really helpful if anyone can show me the direction I will have to head to.


My only suggestion is to refactor your code according to accepted standards and remove all logic from your pages. Then you can take it from there.

Since this seems to be more of a web services question than one on JSP, I've moved this to the Web Services forum. Wishing you luck.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at how WS engines work you will find that at the core a web service is a Java class. While it is certainly possible to build a web service around JSP pages, it is a really bad design, and not supported by any of the WS engines I'm familiar with.

Go with Bears advice and refactor your code so that the business logic sits in Java classes, and JSP pages are only used for presentation. That will give you a foundation for building a WS.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic