• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Restful service

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello I have a Rertful service CRUD for User and I am now facing a problem with the interface JSP Pages How can i invoke the service I am thinking about a servelet that contain the service
is that a soluthion ?
and what is a Proxy client
thank you
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should not be thinking JSP for this problem.

A RESTful service should be able to process requests and respond with a variety of content types, a JSP generated page might be OK for a single GET HTML content request but it will take a servlet to handle more logic.

Bill
 
njkhjk huihujjk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok so i should change to html ?
after I develloped the EJB i created a dynamic web project that contain the rest service and the HTML file finally i will create an EAR but i should program some controller but the problem i did not inderstant
is the controller is a servlet or a restful service ?
 
Ranch Hand
Posts: 171
Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As mentioned by William, the business or connectivity(in terms of calling any service) logic should be in Servlet only. Jsp pages will just request some resource and ideally your Servlet should recognize the request and pass to the appropriate service/component. If you use Spring 3 Rest service, you can map the URL pattern to invoke the service and no need of Servlet in place as controller. But it depends on your design how you have implemented.
 
Yeah, but is it art? What do you think tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic