how to enable cas 5.3.X listen on http port?
I am following this documentation for CAS, but it doesn't work for me.
Enable HTTP connections for the embedded Tomcat container, in addition to the configuration linked to the server.port setting.
# cas.server.http.port=8080
# cas.server.http.protocol=org.apache.coyote.http11.Http11NioProtocol
# cas.server.http.enabled=true
# cas.server.http.attributes.attributeName=attributeValue
See also questions close to this topic
-
Returning values from @Bean methods
What happens to the object I return from an @Bean method? Is there anyway to retrieve this object from another class?
-
Having Problem With Click Listener in Java
I'm making a chess-like game in java and I'm having an issue with the click events. The
mouseClicked
function isn't responding to my clicks on the window and for no apparent reason.I have already tried a few things such as changing class names and using different functions but nothing has worked.
package main.game.com; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; public class ClickEvent extends MouseAdapter { public void mouseClicked(MouseEvent e) { System.out.println("hello"); } }
package main.game.com; import java.awt.Canvas; public class Main extends Canvas { private static final long serialVersionUID = 1673528055664762143L; private static final int WIDTH = 416, HEIGHT = 439; public Main() { Window window = new Window(WIDTH, HEIGHT, "DARRAGH", this); this.addMouseListener(new ClickEvent()); }
package main.game.com; import java.awt.Canvas; import java.awt.Dimension; import javax.swing.JFrame; public class Window extends Canvas { private static final long serialVersionUID = 6733885629776844621L; public Window(int width, int height, String title, Main main) { JFrame frame = new JFrame(title); frame.setPreferredSize(new Dimension(width, height)); frame.setMaximumSize(new Dimension(width, height)); frame.setMinimumSize(new Dimension(width, height)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); frame.add(main); frame.setVisible(true); main.start(); } }
The first set of code is my
mouseAdapter
library and the second is the first part of my main class containing theclickListener
. -
JDBC choose NIC to use based on local ip address?
I'm using the PostgreSQL JDBC Driver on a machine that has multiple network cards. Only one of them has a stable connection. Is there anyway to tell JDBC to use that NIC by giving it the IP address of the NIC?
-
Firebase vs Node.js server
I need to build quickly a client app for web, IOS & Android. The app should handle authentication (login, signup & forgot password) and show the user his saved data, some sort of editable data table, thats all.I read about Firebase and I've been wondering... Do I need to create a node.js server side or can I count on Google's Firebase cause there isn't much complexity (never used firebase)?
thnx
-
Graphhopper - Override Weighting class and Integrate it in Ruby on Rails
I am working on a Ruby on Rails backend that uses GraphHopper for direction APIs. I want to override the weighting class of GraphHopper for customized weighting which is explained in the following link.
https://github.com/graphhopper/graphhopper/blob/master/docs/core/weighting.md
Now the problem is, How can I integrate that overriden code in my Ruby on Rails backend.
-
how to upload file in a specific address using django admin panel?
I'm Developing a django admin panel that has image upload capability ,image upload works successfully , but i cant access to images from entering urls in browser .
When I want to try to access to a picture like this :
http://127.0.0.1:8000/media/485508.jpg
I get this error :
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/media/485508.jpg
Here Is My Codes :
Models.py :
picurl = models.ImageField()
Settings.py :
STATIC_URL = '/static/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = 'http://127.0.0.1:8000/media/' if not os.path.exists(MEDIA_ROOT): os.makedirs(MEDIA_ROOT)
and i can see the file in the specified folder successfully uploaded .
How can i access to pictures in the url ? and How Can I upload files to Wamp WWW Folder ? any suggestions will be helpfull . thanks .
-
Bind authentication with Oracle in CAS
I'm setting up CAS 5.3 to do Bind authentication agains an Oracle database. But I don't know how to setup a OracleDataSource while using WAR Overlay method. Any guidance would be appreciated, thanks.
Just setting up Driver and URL doesn't appear to work. It seems the HikariDataSource is used by default, and it doesn't implement the required getConnection(String username, String password).
@SneakyThrows public static DataSource newDataSource(final AbstractJpaProperties jpaProperties) { final String dataSourceName = jpaProperties.getDataSourceName(); final boolean proxyDataSource = jpaProperties.isDataSourceProxy(); if (StringUtils.isNotBlank(dataSourceName)) { try { final JndiDataSourceLookup dsLookup = new JndiDataSourceLookup(); dsLookup.setResourceRef(false); final DataSource containerDataSource = dsLookup.getDataSource(dataSourceName); if (!proxyDataSource) { return containerDataSource; } return new DataSourceProxy(containerDataSource); } catch (final DataSourceLookupFailureException e) { LOGGER.warn("Lookup of datasource [{}] failed due to {} falling back to configuration via JPA properties.", dataSourceName, e.getMessage()); } } final HikariDataSource bean = new HikariDataSource(); if (StringUtils.isNotBlank(jpaProperties.getDriverClass())) { bean.setDriverClassName(jpaProperties.getDriverClass()); } bean.setJdbcUrl(jpaProperties.getUrl()); bean.setUsername(jpaProperties.getUser()); bean.setPassword(jpaProperties.getPassword()); bean.setLoginTimeout((int) Beans.newDuration(jpaProperties.getPool().getMaxWait()).getSeconds()); bean.setMaximumPoolSize(jpaProperties.getPool().getMaxSize()); bean.setMinimumIdle(jpaProperties.getPool().getMinSize()); bean.setIdleTimeout((int) Beans.newDuration(jpaProperties.getIdleTimeout()).toMillis()); bean.setLeakDetectionThreshold(jpaProperties.getLeakThreshold()); bean.setInitializationFailTimeout(jpaProperties.getFailFastTimeout()); bean.setIsolateInternalQueries(jpaProperties.isIsolateInternalQueries()); bean.setConnectionTestQuery(jpaProperties.getHealthQuery()); bean.setAllowPoolSuspension(jpaProperties.getPool().isSuspension()); bean.setAutoCommit(jpaProperties.isAutocommit()); bean.setValidationTimeout(jpaProperties.getPool().getTimeoutMillis()); return bean; }
I would require that the bean created above, would be a OracleDataSource instance.
-
CAS with JPA ticket registry high availability mode
When we enable CAS with JPA Ticket Registry, we are getting this error. On a single node with JPA, everything seems to work. Once we have 2 nodes, we run nto this issue. The error provides no information.Tomcat throws this error
INFO http-nio-8180-exec-3 :303 - Response is success 2019-02-08 13:04:48,633 ERROR http-nio-8180-exec-3 JSONWrapperUtility:106 - Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@4e65631f; line: 1, column: 2] org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@4e65631f; line: 1, column: 2]
Edit: We have configured JPA ticket registry in Postgres as per https://apereo.github.io/cas/5.0.x/installation/JPA-Ticket-Registry.html
We have 2 CAS Nodes and another node with client application. When the client application accesses CAS, we get this error. The error does not come with one node
-
CAS Maven Overlay And Spring Boot do not work together
I create a spring boot application from spring.io, then add CAS dependecy to pom file of project as below.
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <dependency> <groupId>org.apereo.cas</groupId> <artifactId>cas-server-webapp</artifactId> <version>${cas.version}</version> <type>war</type> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>${h2.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <overlays> <overlay> <groupId>org.apereo.cas</groupId> <artifactId>cas-server-webapp</artifactId> </overlay> </overlays> </configuration> </plugin> </plugins> </build>
after that start spring boot application, but CAS does not start in spring boot application. what is the main problem in this usage of CAS? Is the method of using the CAS at this way wrong?