'WEB-INF'에 해당되는 글 916건

[Tomcat] 4. Batch

WAS/Tomcat 2016. 4. 22. 17:45
donaricano-btn

Batch


1. web application


 Which web application can run on the Tomcat?


- Web application has a WEB-INF folder 

- WEB-INF

- lib

- web.xml

- classes


2. by Manager


To use a Manager


2_1 . http://localhost:8080/

- If you get a error, You will change your port number(server.xml)


2_2. Access to Manager App

- Have to config a login id/pw

- /CONF/tomcat-users.xml

- add a 

<role rolename="manager-gui"/>

<user username="admin" password="admin" roles="manager-gui"/>


2_3. WAR file to deploy

- window : jar cvf sample.war ./sample


2_4. Click a sample file that was maded

2_5. Check a wepapps folder


3. webapps DIR

- Copy and Paste


4. context.xml

4_1. path

- CATALINA_HOME/conf/context.xml

- CATALINA_HOME/conf/[enfinename]/[hostname]/context.xml.default

CATALINA_HOME/conf/[enfinename]/[hostname]/[webapp].xml


4_2. example

a. webapplication

- WebApplication was located in  ROOT

C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.69-windows-x64


b. sample.xml

- C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.69-windows-x64\apache-tomcat-7.0.69\conf\Catalina\localhost

- sampe.xml

<?xml version="1.0" encoding="UTF-8"?>


<Context path="sample" docBase="C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.69-windows-x64\sample" debug="0" 

reloadable="true" crossContext="true" privileged="true"/>


- path = localhost:8080/sample

- docBase = location that was located in webapplication 




'WAS > Tomcat' 카테고리의 다른 글

[Tomcat] 6. Interwork DB  (0) 2016.04.24
[Tomcat] 5. Batch - Parallel deployment  (0) 2016.04.24
[Tomcat] 3. Config  (0) 2016.04.21
[Tomcat] 2. Set up a native lib  (0) 2016.04.21
[Tomcat] 1. Why do we use a tomcat?  (0) 2016.04.21
블로그 이미지

리딩리드

,

[Tomcat] 3. Config

WAS/Tomcat 2016. 4. 21. 17:40
donaricano-btn

Config


1. Listener


1_1) 8080 is normal port number

1_2) server.xml

- I can fix a my port number 

- <Connector connectionTimeout="20000" port="8088" protocol="HTTP/1.1" redirectPort="8443"/>


2. ClassLoader


2_1) ClassLoader is a task performer that get a Java class

2_2) ClassLoader get a classes to make a ClassPath

2_3) ClassPath

   - Before we start a Java or Tomcat, We can config a specific class 

a. :BOOTCLASSPATH:

-Xbootclasspath/p:HelloWorld

-Xbootclasspath/a:HelloWorld

b. EXTENSIONSCLASSPATH

c. CLASSPATH

- CLASSPATH=HelloWorld

- CLASSPATH=${CLASSPATH}:HelloWorld

- CLASSPATH=HelloWorld:${CLASSPATH}


3. setenv.sh(download zip version)


CATALINA.SH said

Do not set the variables in this script. Instead put them into a script

#   setenv.sh in CATALINA_BASE/bin to keep your customizations separate.


Where do we config that stuff?


- Global(all tomcat) option: config by using path 

- Specific(a tomcat) option: config by using script


3_1. To make a setenv.sh

- CATALINA.SH call a setenv.sh

3_2. If we config a 

[JAVA -OPTS ="-DMy_Tomcat -Xms512m -Xmx512m -verbosegc"]

, We will put above context in sentenv.sh

3_3. and sentenv.sh will be in Tomcat -> bin


4. web.xml(conf/web.xml not a application)


- Tomcat is a Java application

- web.xml handle a Servlet and jsp

- Interwork(Catalina, jasper, sessionTime, mime, etc..)


5. log

5_1. manager log (application)

- log about access

5_2. host manager (application)

5_3. localhost-access(access)

- Access info about localhost

- server.xml

5_4. localhost(host)

- application's info that deployed on localhost

5_5. catalina.out(system)

- info about console

- CATALINA.OUT

- catalina.sh

- setenv.sh

- Commonly use it

5_6. catalina.log(catalina engine)




'WAS > Tomcat' 카테고리의 다른 글

[Tomcat] 6. Interwork DB  (0) 2016.04.24
[Tomcat] 5. Batch - Parallel deployment  (0) 2016.04.24
[Tomcat] 4. Batch  (0) 2016.04.22
[Tomcat] 2. Set up a native lib  (0) 2016.04.21
[Tomcat] 1. Why do we use a tomcat?  (0) 2016.04.21
블로그 이미지

리딩리드

,
donaricano-btn

Set up a native lib


1. native lib

  The Apache Tomcat Native Library is an optional component for use with Apache Tomcat that allows Tomcat to use certain native resources for performance, compatibility, etc.


2. To down a service 

3. download a Native 1.2.5 Windows Binaries zip

  - 64 bit is in a 64x file

4. copy a tcnative-1.dll file and then  Use paste to put it in the C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin


5. To start a service

'WAS > Tomcat' 카테고리의 다른 글

[Tomcat] 6. Interwork DB  (0) 2016.04.24
[Tomcat] 5. Batch - Parallel deployment  (0) 2016.04.24
[Tomcat] 4. Batch  (0) 2016.04.22
[Tomcat] 3. Config  (0) 2016.04.21
[Tomcat] 1. Why do we use a tomcat?  (0) 2016.04.21
블로그 이미지

리딩리드

,
donaricano-btn

 Why do we use a tomcat?


1. Web application server

- tomcat, JBoss, TomEE, jetty....


2.  pros and cons

  1) pros

- Free

- Cross-platform

  2) cons

   - Tomcat only has a Java SE spec

   - Tomcat is not a completely WAS


3. How to consist of tomcat

1) Catalina : servlet container

  - It's Environment that host java's servlet


2) Coyote : HTTP component

  - To provide protocol through TCP


3) Jasper : Engine of JSP

  - Dealing with a request of JSP


4. Process

  1) Coyote get a http request

  2) Catalina search for a Doc Base and refer to web.xml 

  3) If this request is a JSP, Jasper will compile it

'WAS > Tomcat' 카테고리의 다른 글

[Tomcat] 6. Interwork DB  (0) 2016.04.24
[Tomcat] 5. Batch - Parallel deployment  (0) 2016.04.24
[Tomcat] 4. Batch  (0) 2016.04.22
[Tomcat] 3. Config  (0) 2016.04.21
[Tomcat] 2. Set up a native lib  (0) 2016.04.21
블로그 이미지

리딩리드

,