Skip to main content

Posts

Showing posts from March, 2018

Access tomcat server remotely:

Access tomcat server remotely: When you try to access Tomcat server from Remote machine , it throwing internet can not be displayed error . Step 1: To enable remote access need to do the modify the values .under             /opt/apache/webapps/manager/META-INF Step2 : Go inside  Step 3: When you see it , it is showing that can expose the pages with localhost address. Step 4: Now we need to change from local host to any host , for this we need to comment lines like below.             From: <Context antiResourceLocking="false" privileged="true" >   <Valve className="org.apache.catalina.valves.RemoteAddrValve"          allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />   <Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1 )?|java\.util\.(?:Linked)?HashMap"/> </

Adding user to access tomcat application's

Adding users to access the Applications. Step 1: Go to Conf Folder /opt/apache-tomcat-8.5.23/conf Step 2: Open tomcat-users.xml file and add below lines to add user "admin" with password "admin" Step 3: vi tomcat-users.xml file <role rolename="manager-gui"/> <user username="hint" password="Password@123" roles="manager-gui"/> Step4: When you   try to access the   server status or Manager App ,required authentication. Step5 : Enter username and password which define in the step 3.

Adding users to access Applications.

Adding users to access  Applications. Step 1: Go to Conf Folder /opt/apache-tomcat-8.5.23/conf Step 2: Open tomcat-users.xml file and add below lines to add user "admin" with password "admin" Step 3: vi tomcat-users.xml file <role rolename="manager-gui"/> <user username="admin" password="admin" roles="manager-gui"/>

Tomcat installation on Linux

Tomcat Installation on Linux: Step 1: install JDK ( Down load the JDK and Extract in the server location) Step 2: Add JAVA_HOME to your .bash_profile, Add below two entries . export JAVA_HOME=/opt/jdk1.8.0_141 PATH=$PATH:$JAVA_HOME ·        Once you add to bash profile , when you run any java file it automatically picks JAVA_HOME and run . ·        Otherwise you can manually also can set the JAVA_HOME by export command export JAVA_HOME=/opt/jdk1.8.0_141 PATH=$PATH:$JAVA_HOME Stpe 3: Now Download the Tomcat file and extract it. ·        I am downloading from the wget command ·        Sudo wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.1/bin/apache-tomcat-9.0.1.tar.gz ·        tar -zxf apache-tomcat-9.0.1.tar ·        cd apache-tomcat-9.0.1 Step 4: Tomcat has been successfully installed Step 5: Go to the bin folder and start the server by executing the script – startup.sh Step 6: Launch the url : http://hint102.com:8080

Tomcat installation on Windows

Tomcat Installation on Windows: Step 1: Install JDK Step2 : Go to system Environment variables and Add JAVA_HOME and assign the same to the PATH. Step3: Download file and extract into it. Step 4:  Step 5: Go to under bin location and startup.bat file it will start the server. Step 6 : Access the applciation with url : http://localhost:8080

Tomcat Installation and Folder structure

Tomcat Installation: 1.        Basically all operating systems are understand only binary language , As we discussed earlier post that Tomcat have J2ee , servlet   container. 2.        This is Java based Web Application server . 3.        For this reason we need to install JDK before running Tomcat file 4.        Download the support JDK based on Tomcat version. Download JDK: Find the JDK for Linux 64bit here   j dk-8u161-linux-x64.tar.gz                              Find the JDK for Windows 64bit here jdk-8u161-windows-x64.exe Download Tomcat: Find the Tomcat here   and download the required version. If you can able to ping Google from your Linux , You can download with wget command. Step 1: Sudo wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.1/bin/apache-tomcat-9.0.1.tar.gz Step2: tar -zxf apache-tomcat-9.0.1.tar Step3: cd apache-tomcat-9.0.1 Important files and folders:                                                           a

Tomcat introduction

Ø   Apache Tomcat , formerly Jakarta Tomcat, which most people just call "tomcat", is an HTTP server for running Java applications. Apache tomcat is an open source web container . Ø   Apache tomcat is a webserver and can easy to deploy our web application on server. Specially java applications. Ø   In the Java world, they decided to create small pieces of code to serve application requests, without having to worry about how HTTP requests/responses work. Ø   The biggest advantage in a Java-centric environment: It’s open source , lots of people know how to work with it, and you can change something that you find doesn't work for whatever reason. Other advantages: It's smaller than some other Java-based solutions. If you’re deploying Servlets, going lightweight and small is a good thing. Ø   Tomcat uses several Java EE specifications such as Java Servlet, (JSP), EL, and WebSocket, and provides a “pure Java” HTTP web server environment for Java concept to run