aspose file tools*
The moose likes Web Services and the fly likes Can JSP with JSTL be configured as a web service using Axis? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can JSP with JSTL be configured as a web service using Axis?" Watch "Can JSP with JSTL be configured as a web service using Axis?" New topic
Author

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

Sonal Gole
Greenhorn

Joined: Nov 27, 2005
Posts: 1
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

Joined: Jan 10, 2002
Posts: 61239
    
  66

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61239
    
  66

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
Marshal

Joined: Mar 22, 2005
Posts: 41906
    
  63
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.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can JSP with JSTL be configured as a web service using Axis?