LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   apache tomcat webserver (https://www.linuxquestions.org/questions/linux-server-73/apache-tomcat-webserver-4175736126/)

murugesandins 05-09-2024 07:55 PM

Example from my downloaded zip file:
Code:

$ unzip -l  apache-tomcat-11.0.0-M19.zip | grep index.jsp | grep ROOT
    12458  09 04 24 12:06  apache-tomcat-11.0.0-M19/webapps/ROOT/index.jsp
$ pwd
/home/murugesandins/apache-tomcat-11.0.0-M19/webapps/ROOT
$ fl index.jsp | egrep -v "^$";echo $?
1
$# Initially https://127.0.0.1/ was reporting => HTTP Status 404 – Not Found
$ ls | grep -i index.jsp
-rwxrwx---+ 1 murugesan openssl 12458 May  5 04:13 index.jsp.Original
-rwxrwx---+ 1 murugesan openssl 12478 May  8 15:54 index.jsp.backup01
$ type cp
cp is aliased to `/usr/bin/cp -i '
$ cp index.jsp.backup01 index.jsp
$# after this https://127.0.0.1 reporting valid content of => Apache Tomcat/11.0.0-M19

Validate your index.jsp file locations/permissions/... at your tomcat webapps directory
including contents of index.jsp (if you have modified)

murugesandins 05-10-2024 04:10 AM

Quote:

HTTP Status 500 – Internal Server Error
Type Exception Report
Message org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
java.lang.ClassNotFoundException exception happens when related .class file not found by java or related CLASSPATH not having required jar file/related directory environment variable.
shutdown tomcat
if you have done make clean(development oriented) perform make again and execute related script(Example: . ~/.bashrc) to set required environment variables again.
After that start tomcat
We can have these steps at automated script(always) if required before starting tomcat.

sag2662 05-10-2024 04:10 AM

Not sure, sometimes it seems to work and sometimes not.

murugesandins 05-10-2024 04:16 AM

Quote:

Not sure, sometimes it seems to work and sometimes not.
Let me describe a sample action by the client using internet banking/metro/swiping/post office/mobile apps/...:
1. login => (Eg: access index.jsp)
2. create a session id at client coockies and always validate the cookie timeout periods.
3. Intermediately assume that client is donating 100.00 INR to prime minister to get a refund for last 10 months using that current session id.
4. Developer of that page invoking a page which is dependent on NRF.jar file which is not set at CLASSPATH environment variable.
Due to this 500 error reported at client side.
5. Developer handled to remove/reset the cookie at client and server side asking the client to re-login again.
I feel that the same condition applicable to your working/non-working exceptions at tomcat.
Hence I have informed to include related CLASSPATH and all tomcat environment variables at start_tomcat.sh (set all, and then call startup.sh if tomcat not at execution mode inside current host including that port number not in use by any other apps)

Following comment not related to this query.
However I am sharing some automated script at localhost whenever I login at 127.0.0.1:
a) Start bash.exe to check battery percentage and if it is greater than 98% open notepad.exe and provide alert to switch off battery
b) start putty.exe at 127.0.0.1 if not opened yet.
c) start firefox.exe if not opened yet.
d) clean /tmp and $TEMP directories and all cookies(I always used to clog after closing firefox manually)
d) exit from this automated script
e) execute above automated script using startup.cpp C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\STARTM~1\Programs\Startup\startup.exe
Hence I have informed perform automated script to invoke startup.sh after setting all requirements for tomcat/any servers.
you can understand => ALL requirements...using lsof /-d /-f /ps/.../sudo required commands using automation at any OS.

sag2662 05-10-2024 07:43 AM

Thanks for your time and help. I will close this case for now. Its not so easy to work with URL configurations in tomcat. you have given me valuable time. But I dont know in the environment none of the things are working.

murugesandins 05-10-2024 07:51 AM

Quote:

Originally Posted by sag2662 (Post 6500874)
Thanks for your time and help. I will close this case for now. Its not so easy to work with URL configurations in tomcat. you have given me valuable time. But I dont know in the environment none of the things are working.

Thank you for your comment.
Quote:

Its not so easy to work with URL configurations in tomcat
I am sharing only my comments.

If you try like me at localhost(vmplayer) Linux during weekends/public holidays and try learning at vm for your learning and future careers.
Like me you can achieve the same at your OS.
Due to your query, I have installed tomcat and I started using the following at windows:
%misint%
This environment variable using:
https://127.0.0.1:443/murugesan_open...einterest.html
my %USERPROFILE%\AppData\Roaming\Microsoft\Windows\STARTM~1\Programs\Startup\startup.exe
starting tomcat once I login.

Reason for above comment:
>> during weekends/public holidays
I was testing openssl.exe/openssl(vmplayer.exe) speed -multi 900000000 from 2004 to 2018 and that code was fixed during 2018.
Hence I feel easy to work with URL configurations using any web server at any OS.
HW => Hard work
Happy Weekend :)

Kindly do not execute:
openssl speed -multi 900000000
at any OS unless you have the binary having related bug fix.
reason: if not having bug fix it used to shutdown the system/hang when not having more RAM/swap space/OS/... exceptions.

sag2662 05-18-2024 05:33 AM

Hi , I have issues again when I access via DNS names, the url is toggling from webpage to another.


All times are GMT -5. The time now is 10:58 PM.