CAS Redirect Loop - java

I am trying to get the CAS setup up and running and I am pretty new to this.
I am following through the standard steps similar to this video.
I have created keystore file
Created a certificate
Imported it successfully and add to cacerts file
I have made the necessary changes in the server.xml of tomcat
After all these steps, I started the tomcat, placed the war in the webapp and to test, I tried to access http://localhost:8080/cas/login and https://localhost:8443/cas/login and it is throwing and Redirect loop error.
I have no clue what I am doing wrong. Any help is appreciated!.

It was nothing to do with my configuration.
I watched several videos and understood that my configuration do not have any problems. The problem is with the 4.0.0 release. I do not know if any one else faced the same problem.
My Solution: I took latest source (4.0.2) and built the war using maven and deployed. It worked perfectly.

Related

Tomcat does not compile jsp in work directory

I am migrating a Spring-Boot application to a new server (Amazon-Linux). I could not deploy the application using Tomcat manager. Uploading the ROOT.war using the manager fails.
So, I deployed the application by manually uploading the ROOT.war. At first, it seemed that the deployment went well, the first page of the application (login) was loading. But after submitting the credentials, the application is not redirecting me to the home page. After investigation, it turned out that in the work directory (work/Catalina/............../WEB_002dINF/jsp/) there are only two files (my_login_jsp.class, my_login_jsp.java). So, does that mean compilation for other jsp files are being failed?
Please advise how this can be fixed?
Found the solution. There is something wrong with the Tomcat package that comes with amazon-linux-extras.
After removing the aws package, now I am using Tomcat downloaded from the official website. The is working perfectly.

tomcat unable to publish due to deleted java.orig file

I used a merge tool to merge my code with the upstream branch which created a .orig file for one of my java classes. After verifying that everything was working fine I saw not need to keep the .java.orig file around so I deleted it.
Now whenever I try to deploy to tomcat from eclipse I get the following error:
'Publishing to Tomcat v8.0 Server at localhost..' has encountered a problem.
Resource '.../MyClass.java.orig' does not exist.
I've tried removing all applications off the server and removing the server from eclipse and then recreating it but to no avail.
I'm running out of things to try and I'm not sure what dependency tomcat thinks my project has on the .orig file. Any help is appreciated.
Ok so rebooting my machine seemed to have fixed the issue I was able to start tomcat normally after that using the same eclipse workspace. I'm not sure what the underlying issue actually was but the restart seemed to fix it.

problems when setting up Shopizer

I was tring to set up the Shopizer on localhost.
I followed this to deploy it. Following is what I did.
I think I successfully configured the mysql database. When I run shopizer-build-mysql.bat in the shopizer_root/schema/, there is something wrong with importing the shopizer_data.sql. But I imported it manually.
I imported the 4 directory media, sm-core, sm-central and sm-shop into MyEclipse as existing project.
right click the build.xml file in each directory, run as Ant. Console said build successfully.
copy mysql-connector.jar to Tomcat's lib directory. and copy 3 war files to webapps directory. start Tomcat. Doploying seems right.
Then when I tried to visit localhost:8080/central, I see a logon page. I entered "admin" as login name, and "password" as password. It didnt work, didnt lead me to anywhere.
The console only showed "[DEBUG] (AuthFilter.java:57) [doFilter] - Requested URL /central/profile/logon.action" when I visit localhost:8080/central. When I click "logon", nothing happened.
I dont know what to do now. I want to learn hibernate, spring , struts in a real project. Could anybody help me?
Open profile/logon.jsp
change
window.location.href = "/central/profile/dashboard.action";
to
location.href = "/central/profile/dashboard.action";
Some workaround solution for shopizer-1.1.5-src
In chrome:
-fulfill "Logon" form - admin/password
-turn on "Developers tool" - F12
-put in Console: $("#logon-button").click();
-hit Enter
As Shopizer with 2.0 version has switched to maven you can check the documentation page to correctly set up the app.
I want to learn hibernate, spring , struts in a real project.
...You can contribute to this project and be a part of the project development, there is no better way to learn than practicing in a real project and developing a useful stuff.

Webapp shows 404 page after project renaming

I have been working on this web application using Eclipse and m2e (maven plugin for Eclipse).
After a while I decide to change the project name in eclipse doing: Right click on project >> refactor >> rename
Following this I see a few errors coming up, mostly to do with classpath configuration & java versions mismatch. I fix them, adding the maven dependencies to the build path, and updating the java versions to be used during compilation & run time.
I rebuild my web app & restart my server (Tomcat in this case). Open my browser to go to my app's root url. And I get a 404 page (everything looks fine in the console btw).
I've been going through my buildpath and classpath config to double check if anything was coming from there but everything seems fine. I'm confused and unsure where to look at.
Thanks in advance
This really depends on your Setup. If you are using the default path, it is (as Kal said) myserver/newappname.
If you are using a url that you have configured in webserver for easier readability like (myapp.myserver.com) you would have to change the redirection in your server from your old appname to the new one.
Actually,
404 HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested.
1. Check your path with newapplication name.
2. See inside your server, Is there a resource with (newNameApp.war)?
3. As you are using maven, try to build the project and see the log, by which name war is generated, and where the war got placed.
I faced the same situation and simply restarted Eclipse and no more 404 afterward

Simple webservice example tomEE not working

I'm trying to deploy the simple WS example from tomEE:
http://openejb.apache.org/examples-trunk/simple-webservice/
As there is nothing special about it, I will post in detail what I did. Maybe someone sees what I'm doing wrong:
Machine: Win7, Eclipse, Server: tomEE+
-created new Dynamic Web Project with runtime target = the tomcat tomEE server
-created new package in /src, and added 3 classes there: Calculator, CalculatorWS, CalculatorTest.
-rightclick project > run as > run on server > choose tomEE.
Server starts up, launches http://127.0.0.1:8080/testproject
Which results in 404, as I have not set up any jsf page.
Anyhow, going to http://localhost:8080/testproject/Calculator?wsdl or http://localhost:8080/testproject/webservices/Calculator?wsdl as the example suggests, I too get 404 not found. Obvious the Webservices are not deployed?
What could be wrong with this basic and simple example?
I am using eclipse indigo and tomee 1.5.2. I have a class x.y.z.MyWS. It's annotated with #WebService and #Stateless.
The apache tomee log, during startup, says
INFO: Webservice(wsdl=http://localhost:8080/MyWebApp/webservices/MyWS, qname={http://z.y.x/}MyWSService) --> Ejb(id=MyWS)
So the WSDL is
http://localhost:8080/MyWebApp/webservices/MyWS?wsdl
Please check your logs.
I ran this example the other day, and ran into similar issues. The solution is really to look into the Apache Logs folder for the catalina log for the date, and also for the stderr file for today's date. They will tell you if the deployment worked or failed.
In my case, I was using JDEV, so I had removed the #Stateless annotation, and tried just dropping the .jar into the webapps folder. That did not work. However, putting it back in, and dropping the .jar worked fine.
As a web application (.war), the .class files were moved into WEB-INF\classes within the .war file and I dropped that into webapps. I looked at the Catalina Log and it said where the endpoint was (for the wsdl). I typed:
http://localhost:8080/SimpleWebService/Calculator?wsdl, and the WSDL file appeared.
After that, I ran some simple Soap Requests with soap ui. It worked fine. this was with version 1.7.1.

Categories

Resources