Which Java library contains the javax.faces.webapp.FacesServlet class? - java

I'm working on a NetBeans project and can't seem to get my website to run properly because my internal Apache Tomcat server keeps returning an error that it cannot load the FacesServlet class. Which available library contains this? Currently I have the Java EE Web 7 API and Java DB libraries loaded on.

You use service like findjar to find jars that contain some class:
http://www.findjar.com/class/javax/faces/webapp/FacesServlet.html

Oh, just now found out it was under the JSF 2.2 library! Sometimes it just pays to ask to think more about it! :)

Related

Codename One javafx.util.pair

Hello dear Codename One Community,
I've written a class in which is use the package javafx.util.Pair.
When I want to build the application I get no Errors.
But sending an Android build to the server fails. In the Error Log file i found following line:
"Warning: com.mycompany.myapp.Main: can't find referenced class
javafx.util.Pair"
Does this straight up mean that the javafx.util.Pair class is not available for the use in Codename One ?
Thanks in advance & kind regards
Codename One doesn't support the full Java API and doesn't support JavaFX. I'm guessing you changed the classpath of the project, that won't work and would trigger errors when you try to actually build the project.
You need to adapt your project to work with the Codename One API's and JDK subset. The logic for this is explained in this article.

build lucene web application with tomcat

I had developed a lucene search engine (with Lucene 5.2.1) and now I want to embed it into a very simple web application (it has demonstrative purpose, it will run in localhost).
This web application should let the user insert some keywords and navigate through search results (in other words it should let the user read the index that I had created, with appropriate html formatting). I had already made some simple html GUI with Bootstrap.
I'm very new to web applications, but I had been told that a good idea would be embedding Lucene in a TomCat server. I had visited this link, but it's quite old and not very detailed. I have tried to look for "lucene tomcat" but I get results about SolR or very specific posts.
Can anyone please suggest me a good resource or a general approach to my issue?
Many thanks
My solution:
I wrapped my search engine library into a JAR file.
I downloaded zipped version of TomCat 8 and installed it into my Eclipse environment as a new Runtime Enviroment.
I made a Dynamic Web Project in Eclipse (see this video lesson) using TomCat 8 server.
I put the JAR into my webapp (should be something like WebContent\WEB-INF\lib\searchEngine.jar)
I created a Servlet to handle user input.
I did the rest using very simple JSP pages, embedding Java code that uses my JAR (I know, that is not so good but it works!)
Cheers!

How to create Web Service using WSDL file (WSDL file is using SOAP) in Core Java using Eclipse?

i am very new to Web services please help for my problem,i dont know how to start and where to start to do for my problem so please help me.please provide in detail explanation how to do.
Actually "i have WSDL file with that i need to create a web service server in core java with Eclipse IDE"
Basic hello world tutorial on webservics. You can go through this link. It might be good starting point .
Use wsimport in the jdk to generate Java classes you can use to invoke the web service.
There is a plugin in eclipse with which you can convert the wsdl file into java files

Which JAR contains the weblogic.servlet.security.ServletAuthentication class?

I trying to create a servlet to logout from multiple JSF applications running on Oracle Glassfish. I tried the following code,
weblogic.servlet.security.ServletAuthentication.logout(request);
weblogic.servlet.security.ServletAuthentication.invalidateAll(request);
weblogic.servlet.security.ServletAuthentication.killCookie(request);
but I am not able to find the JAR file containing the required class in order to get the code to compile. I downloaded Oracle WebLogic and tried various of its JARs, but no one of them made the code to compile.
Which JAR does contain the required class and where can I find it?
The class you are looking for is in a jar named wls-api.jar.
However, you're probably searching for the wrong thing because if you are developing applications to run on Glassfish you should stick with the standard techniques (e.g. JSR-196 described here or here).
Because it isn't obvious what you are trying to implement I can't give any further detailed advice but there is plenty of documentation available about Java EE Security.
I think u need this jar file:
<JDeveloper Home>\Middleware\wlserver_10.3\server\lib\weblogic.jar
The file is located at <WLS_HOME>\middleware\wlserver\server\lib\wls-api.jar

How do I get my simple Java web service to work?

In a textbook exercise, we make 3 Java classes and an XML file.
My questions are:
Where should I save these .java files? I'm using NetBeans 6.5 so the default is My Documents.
What should I name the XML file?
I am using XAMPP so the file WSDL.xml I put in xampp/httdocs but when I open 127.0.0.1:9876[/]ts?wsdl it says page not found.
Note: I do not need to know how to create a Java class. I need to know where to put the file in which the class is defined.
Subjective opinion:
If you don't know such basic things such as placing java files into right directories, perhaps, you should first try a few much simpler examples, than creating a web
service.
In Netbeans, you can create a Java project, than add Java classes by doing
File -> New... -> Java -> Java Class
To learn how to use Netbeans, visit:
http://netbeans.org/kb/
Especially "NetBeans IDE Java Quick Start Tutorial" might be helpful to start.
Furthermore, you don't run Java webapps with some kind of XAMP,
but with Java web servers such as Glassfish or Apache Tomcat.
Both these servers are bundled with Netbeans when you use
Netbeans Java profile (see table at Netbeans download page)
I think you should follow ivan_ivanovich_ivanoff's adive and start with the basics.
When you have done that, you might want to come back here and read my answer to the question Stack Overflow: Simple Java web services. It assumes you know how to compile a Java class and how to package it into a JAR, but since these are pretty basic tasks you have to learn anyhow, it might help you getting your web service up and running.
Look at the example code provided with the book.

Categories