Tomcat in first request does not load page contents - apache

So i have renamed tomcat lib folder by accident and than it have 404 error looking like this:
Link to picture of error
Than i restarted tomcat using ./catalina.sh stopand ./catalina.sh start once i restarted i do not see anymore similar messages but it gives sometimes page not found message which basically means 404 and it fails to load page content from first time i need manually press F5 and than it loads the page contents like design and etc but if i again press F5 it again gives same thing and i need to reload page again to see contents.
I have tried to run tomcat 8 by ./startup.sh
Also have tried to change ports from 8080 to 80
Tried to run tomcat as non root user but i found out that i'm not root user on that user which i'm using anyways.
What I'm doing wrong?
I'm using Centos and tomcat 8.

To solve the problem you need clean tomcat cache: delete work folder in tomcat folder.

Related

Why can't I log in to the status page tomcat or manager app page in tomcat from a clean install?

Why can't I log in to the status page tomcat or manager app page in tomcat from a clean install?
So I go to get a tomcat version like here :http://mirror.olnevhost.net/pub/apache/tomcat/tomcat-7/v7.0.92/bin/apache-tomcat-7.0.92-windows-x86.zip
This is windows 32 bit, I unzip the thing and place it into my custom app's tomcat folder (renaming it from apache-tomcat-7.0.92 to just tomcat)
Then I install the tomcat7 service to windows services.msc using "service.bat install" command and then start it in the services.msc
I go to localhost:8080 and getr the main page that states tomcat is installed ... then when I try to click on the status page to login it won't allow...
I configured the tomcat-users xml file and triple checked all settings, even restarted server and restarted service etc
but it won't let me login no matter what?!?!?!
1) anyone can duplicate this, since I'm doing this from clean install
2) only thing is I'm putting it under a different root directory but I cannot imagine that would make a difference, I haven't changed anything upon clean install
Surely this cannot be broken like this and must be simple something that I somehow missed but I can't see how

Apache (wamp) server redirecting to old url

I had a server running WAMP, that served many phpBB forums. The HD went dead in 2010, but recently i was able to recover the whole data.
I put the old installation dir /wamp/ on same path it was before, run wampmanager.exe, server goes up and the website and the forums work fine as they were like in 2010. However, one of them was successful, and that one specifically don't work normally.
The directory structure is:
/AllSites/Foo/
/AllSites/Bar/
/AllSites/GoodSite/
/AllSites/ is an auto-generated apache index, that shows the forum folders (Foo, Bar, GoodSite).
When i navigate to to localhost/AllSites/GoodSite/, i see the browser requesting from http://old.no-ip.url/AllSites/GoodSite, and not from localhost, until it obviously timeouts.
Naturally, i went to GoodSite's phpBB configuration to check if the old.no-ip.url was being set somewhere. Not there, and not via MySQL search for old.no-ip.url string (phpBB actually only asks for /path/, not domain). So i tried to navigate manually to http://localhost/AllSites/GoodSite/index.php and my surprise, entering like that the site works fine and always stay at localhost.
That made me abandon phpBB as the cause of the issue and focus on Apache (i can even remove index.php from /GoodSite/ and it redirects).
Next thing, i went to .htaccess in /AllSites/ and saw Redirect permanent /AllSites/GoodSite http://old.no-ip.url/AllSites/GoodSite. I removed the line, restarted server, refreshed browser cache, but nothing. It always try to go to the old url when navigating to the GoodSite folder.
So i searched for old.no-ip.url in the whole xamp directory (maybe an alias set somewhere) and subdirectories files', for no result (using Notepad++ "Find in Files" option).
So what can be causing this? The only thing that could be redirecting at server level would be apache or maybe php. But there's no such setting, as the Notepad++ search confirmed. Maybe there is something cached? I ran out of solutions. I even tried deleting the .htaccess files.

The http://localhost:8080/axis2 link does not work

Hello fellow programmers,
I have to get axis2 (version 1.7.2) working in Tomcat (version 8.0.33) but here I encounter a annoying problem. I have followed the steps in the tutorial (from the axis.apache website) until the point of checking the link mentioned in the topic title.
I have downloaded the Axis2.war file and placed it in the webapps folder in the tomcat home directory (/opt/tomcat).
When I start tomcat using the startup.sh file and visit the homepage it all seems to work. visiting the link http://localhost:8080/ will show me the text:
It works !
If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! etc etc
But then when I visit http://localhost:8080/axis2 I get:
HTTP Status 404 - /axis2
type Status report
message /axis2
description The requested resource is not available.
Apache Tomcat/8.0.28 (Ubuntu)
When I run the .startup file and at the same time look at my webapps folder I see that the .war folder is extracted and makes the axis2 folder appear, thus it works until there at least.
Does someone has an idea of what could be wrong here?
PS: I am using Ubuntu.
if your deploy axis2.war, port must be the same at the Apache Tomcat and Axis2 8080, check file tomcat_dir\conf\server.xml

cannot see apache tomcat homepage

I installed apache tomcat and started the service by double clicking on apache-tomcat-8.0.9\bin\startup.bat file, the survice started successfully in 547ms, later I tried opening the homepage of tomacat by entering
localhost:8080 in my cleint
,all I could see is
HTTP Status 500 - java.lang.IllegalStateException: No output folder
with a message java.lang.IllegalStateException: No output folder.
If i don't mention the output folder, am I not supposed to see the homepage of tomcat ?
also I did stop the service by double clicking on
apache-tomcat-8.0.9\bin\startup.ba file, then I started the service using eclipse then tried opening in my client, then I got a 404 error.
I have no clue where am I going wrong, please give me some suggestions so that i can solve this, also what is the root folder of tomcat in order to put my project folder ?
You need to give appropriate rights to the subfolders of the Tomcat directory. In your case 'temp' and 'work', so the servercan store temporary files and precompiled Jsp.

How make Tomcat run as WebServer in WindowsServer2008 Godaddy Virtual Private Server?

I have just bought Godaddy VPS, WindownServer 2008 with Plesk Parallels Panel. I did setup ns1.myDomain.com, ns2.myDomain.com
At the beginning When typing the IPaddress (the one Godaddy assigned to my VPS) into browser then I can see IIS Informaion Server Page so it mean the current WebServer is IIS Window. But I don't want Window webserver, I want Tomcat Webserver as a default WebServer.
Ok, then I did something, and now then typing my IPAdress, I saw a "Welcome to Parallels!" page, this is also not what I want.
I can run Tomcat Server ok in my VPS. I also installed Tomcat7 webservice using service.bat install, after installed it generated ttomcat7.exe & tomcat7w.exe in tomcat7\bin folder.
I want that when I type my IPAddress or typing myDomain.com into webBrowser, i can see the Apache "Tomcat/7.0.53" configuration Page (the page that we see when startup TomCat7.
Did i miss something? How to fix it?
Extra Info: OK, now I double-click on tomcat7w.exe in bin folder & "Apache Tomcat 7 Properties" GUI popuped as the below picture. I clicked Start button but it doesn't seem working As Service Status: still Stopped.
Extra: OK, now I can see tomcat Page by typing myDomain.com:8080/, but then How to make it run as default ie it should not show :8080