Meaningless Drivel is fun!*
The moose likes JSF and the fly likes Calling Servlet from a form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Calling Servlet from a form" Watch "Calling Servlet from a form" New topic
Author

Calling Servlet from a form

Tom Franck
Greenhorn

Joined: May 19, 2012
Posts: 7
I'm trying to call a serlet that contacts a SOAP service. But I keep on getting a PropertyNotFoundException


The form where I call it from looks like this:



My web.xml file:




The servlet itself:

Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Tom Franck wrote:I'm trying to call a serlet that contacts a SOAP service. But I keep on getting a PropertyNotFoundException




You wrapped the servlet name inside a EL expression, so the compiler tries to translate it and it couldn't find any given property. You should change from:

action="#{SOAPServlet.doGet}"

to:

action="/SOAPServlet"

Good luck!


PM Me If You Want to get Urgent Help on Java Programming
Tom Franck
Greenhorn

Joined: May 19, 2012
Posts: 7
That's how I tried to do it at the start though. But nothing happens when I click the button.
Well at the bottom of the page I get this: Unable to find matching navigation case with from-view-id '/contactUs.xhtml' for action '/SOAPServlet' with outcome '/SOAPServlet'
Nischit Shetty
Greenhorn

Joined: Feb 21, 2007
Posts: 25
What you are trying to attempt will not work. The moment you start using JSF tags / components, any reference to a bean or object, JSF tries to look within its context, facesconfig. It does not go outside its perimeter.
If your intention is to all call a servlet by clicking a link within a page rendered by JSF, use regualr HTML tags or call a managed bean and then forward to a servlet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling Servlet from a form
 
Similar Threads
user authentication and dao
web service integration using Netbeans IDE
not able to insert values in ms access database
Hello world ejb3 problem
Servlet Displays Old DB Entries