How can i disable OpenSSO Web Services which are provided by default?
Currently my application's OpenSSO can be accessed by the following URL's:
http://host_machine.domain:8080/opensso/identityservices/IdentityServices
http://host_machine.domain:8080/opensso/identityservices?WSDL
This can only be done by tweaking web.xml
Have you tried to remove the following servlet-mappings?
IdentityServices
/identityservices/
IdentityServicesHandler
/identity/
Sidenote: If you're using newer agents they might not work anymore.
-Bernhard
Commented only this part in web.xml and it worked!!!
<servlet-mapping>
<servlet-name>IdentityServices</servlet-name>
<url-pattern>/identityservices/*</url-pattern>
</servlet-mapping>
Related
I changed the way an application was being built. It was being built by maven earlier, I changed it to ANT.
After the change, I started getting the following error:
java.lang.IllegalStateException: No Factories configured for this Application.
This happens if the faces-initialization does not work at all - make sure that you
properly include all configuration settings necessary for a basic faces application
and that all the necessary libs are included.
Also check the logging output of your web application and your container for
any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this:
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
javax.faces.FactoryFinder._getFactory(FactoryFinder.java:246)
javax.faces.FactoryFinder.getFactory(FactoryFinder.java:200)
javax.faces.webapp.FacesServlet.init(FacesServlet.java:112)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:662)
The web.xml does not have the following:
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
But since the application was working without it earlier, I am thinking this is some other issue. I looked up for this issue in google and most of them suggest it could be because of compatibility issue with Tomcat jar (servlet-api.jar, el-api.jar, jsp-api.jar). I couldn't remove el-api.jar as it is being used by the application.
This seems to be some dependency / libraries issue.
I am currently trying to learn java ee basics and there is a simple jsf example project to get learn intelliJ idea as well. Before IntelliJ I was able to develop jsf project with maven in Eclipse and they were working good but when i did the exact same things in the same order (project from webapp archetype, add dependencies to pom, run maven, add jsf servlet to web xml and deploy) I got 404 error in return. Don't know if it arrises from some config must be done in intellij or something independent from intellij.
So here is my code and when i type localhost:8080/faces/index.xhtml either the faces servlet does not get triggered or something else happens so that the xhtml page is not found
1-project structure:
2-web.xml:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
Most probably these two can explain the issue. Thanks for any help :)
I saw this post late, but I hope it helps someone else.
Under Project Structure makes sure you configured JSF:
You almost certainly failed to add a web facet and artifact to your project. See the IntelliJ documentation.
I upgraded a Tomcat 7.0.27 to Tomcat 7.0.57 and the Tomcat is in cluster environment. After upgraded, the Tomcat in cluster, we are getting ViewExpiredException, didn't get in previous version in cluster.
Added state saving method to client but still not working
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
Tried by using error-page tag
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/faces/login.xhtml</location>
</error-page>
It's also not working.
If, when we stopped any one of the server, it's working fine. when ever we bring up the another server getting this issue and the first time only getting this issue, if we reloaded the page, it's working fine.
Strange is, code working fine in Tomcat 7.0.27,
Any suggestions please.
Everyone. I Face A Problem In Solr Using, In Development Environment, Project Always Close And Start, Start And Close, When We Stop Tomcat, Some Solr Documents Are Remained Not Committed. How To Overcome This Headache, Can Anyone Show Some Ideas? Great Thanx.....
You can use a shutdown hook within your webapplication to handle the shutdowns and commit the data.
Use a class that implements ServletContextListener in your web.xml:
<web-app>
<!-- Usual stuff here -->
<listener>
<listener-class>solr.commitListerner</listener-class>
</listener>
</web-app>
Does anyone know the steps so that OUR OWN portlets' service builder entities and methods show up when hitting localhost:8080/my-portlet/jsonws? All my entities are remote-service annotated. #JSONWebService is on all my classes. I've added a chunk of XML to web.xml (per http://www.liferay.com/community/wiki/-/wiki/Main/JSON+Web+Services - a very fine wiki otherwise). But I don't see anything happening.
I can browse to http://localhost:8080/api/jsonws and see the portal's JSON methods.
Have I missed a setting? Is there some additional configuration needed?
Thanks.
It must be some miss-configuration:) Let me repeat the steps here.
After installing Liferay 6.1 CE GA1 try if JSONWS api is visible, by accessing following urls: http://localhost:8080/api/jsonws and (for example): http://localhost:8080/knowledge-base-portlet/api/jsonws
Now, create your portlet using latest Liferay SDK. Create at least one service method in *ServiceImpl. Run service builder
Add the following code in portlets web.xml:
<servlet>
<servlet-name>JSON Web Service Servlet</servlet-name>
<servlet-class>com.liferay.portal.kernel.servlet.PortalClassLoaderServlet</servlet-class>
<init-param>
<param-name>servlet-class</param-name>
<param-value>com.liferay.portal.jsonwebservice.JSONWebServiceServlet</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JSON Web Service Servlet</servlet-name>
<url-pattern>/api/jsonws/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>JSON Web Service Servlet</servlet-name>
<url-pattern>/api/secure/jsonws/*</url-pattern>
</servlet-mapping>
Build war and finally deploy portlet to Liferay. After few moments, portlet will be deployed and available. JSONWS will scan your classes and find all service methods. To test if everything went ok, visit: http://localhost:8080/*portlet-context*/api/jsonws
That's all:)