• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it possible to use SOAP with JSP?  RSS feed

 
phillip nash
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all.

I'm working on a project (my first job since leaving university/college) where I need a html page to communicate with a JSP for processing login information.
Now, I'm looking into processing this using the SOAP protocol, due to its interoperability functionality. I need this JSP page to send SOAP requests to a web service for processing and storing.
Is it possible for to use SOAP and JSP for this at all? I haven't found much information about this neither. If somebody could point me in the right direction, that would be fantastic.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP is intended to render a view, not perform operations. Why aren't you simply sending the web service request from a controller? It'd be a lot more appropriate and a lot less hassle.
 
phillip nash
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:A JSP is intended to render a view, not perform operations. Why aren't you simply sending the web service request from a controller? It'd be a lot more appropriate and a lot less hassle.


Thanks for your reply!

I only have a bit of experience with JSP. When you say controller, do you mean having a dedicated java servlet to process and forward the requests to the other parts of the system?

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, all java code and operations should be in Java classes, not in JSP.

If you are a newcomer to JSP be aware that putting Java code in a JSP is an obsolete practice from over 12 years ago that somehow will not die a deserved death. Any resource you are using that advocates putting Java code in a JSP should be ditched for a more modern reference that emphasizes the use of the EL (Expression Language) and JSTL (JSP Standard Tag Library).

The sort of thing you are talking about most certainly does not belong in a JSP, which should only be used for creating the view.

I'd also recommend the following articles:
  • The Secret Life of JSPs
  • The Front Man


  • The first explains what JSP is all about; the second, how to properly structure a modern Java web app.
     
    phillip nash
    Greenhorn
    Posts: 21
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Bear Bibeault wrote:Yes, all java code and operations should be in Java classes, not in JSP.

    If you are a newcomer to JSP be aware that putting Java code in a JSP is an obsolete practice from over 12 years ago that somehow will not die a deserved death. Any resource you are using that advocates putting Java code in a JSP should be ditched for a more modern reference that emphasizes the use of the EL (Expression Language) and JSTL (JSP Standard Tag Library).

    The sort of thing you are talking about most certainly does not belong in a JSP, which should only be used for creating the view.

    I'd also recommend the following articles:
  • The Secret Life of JSPs
  • The Front Man


  • The first explains what JSP is all about; the second, how to properly structure a modern Java web app.


    Fantastic!!!

    Thanks for your help
     
    phillip nash
    Greenhorn
    Posts: 21
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Bear Bibeault wrote:Yes, all java code and operations should be in Java classes, not in JSP.

    If you are a newcomer to JSP be aware that putting Java code in a JSP is an obsolete practice from over 12 years ago that somehow will not die a deserved death. Any resource you are using that advocates putting Java code in a JSP should be ditched for a more modern reference that emphasizes the use of the EL (Expression Language) and JSTL (JSP Standard Tag Library).

    The sort of thing you are talking about most certainly does not belong in a JSP, which should only be used for creating the view.

    I'd also recommend the following articles:
  • The Secret Life of JSPs
  • The Front Man


  • The first explains what JSP is all about; the second, how to properly structure a modern Java web app.


    BTW that second link is a godsend!
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Posts: 65824
    134
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Glad that you are finding it helpful.
     
    William Brogden
    Author and all-around good cowpoke
    Rancher
    Posts: 13078
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Unless you absolutely have to use SOAP, consider the alternative of using a RESTful style web service. Simpler and easier to program.

    This web services FAQ here at the ranch will help you decide.

    Bill
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!