Running jsp files using Apache tomcat on windows

I installed Apache Tomcat on my Windows machine and it seems to have been installed successfully. I can see the properties window, and I can start the server, but I do not know what to do next.

Where can I save jsp files in ... create a directory or make apache tomcat own directories?

what is my only problem .. how can i make and edit files now that its installed

+5
source share
5 answers

Folder structure:

 Apache-home/webapps/project_name/WEB-INF/classes

all jsp filse should be under the project_name folder. and java classes belong to the class. You also need to put a special file called web.xml in the WEB-INF folder.

0

JSP, .

" " " " . .

" " . JSP - , "filename.jsp" - " ."

C:\apache-tomcat-7.0.28\webapps\ROOT.

url " http://localhost: 8080//filename.jsp"

+3

, Apache Tomcat Server.

, :

Apache Tomcat Server (Jakarta Tomcat): - , Apache Software Foundation (ASF). Java Servlet JavaServer Pages (JSP) Java- - Java Java-.

JavaServerPages (JSP): , -.

Step1

Java.

Step2

Apache Tomcat

JRE.

( java)

Step3

Go-To:

APACHE TOMCAT

Step4

,

:

Step5

START TOMCAT, :

Step6

Mozilla Firefox ( )

Step7


      [http://localhost:8080/][1] enter.

:

Step8

tomcat, .

( , ,

Step9

:

:

Apache Software Foundation

-

( , APACHE TOMCAT)

Step10

- " " " ", JSP.

: amit2012PROJECT

:

Tomcat

Web-inf root

"web-inf" , .. amit2012PROJECT

Step11

first.jsp, :

<html>
<head>
 <title>blog post:ApacheTomcatServer</title>
 </head>
 <body>

 <%-- START --%>
  <%
   out.println("UserName = amit2012, ");
   out.println("Running first program in JSP.");
 %>
 <%-- END --%>

 </body>
 </html>

HTML JSP, Java, , . Step12

[Eg. amit2012PROJECT, ]

[http://localhost:8080/][2]foldername.extension in any WebBrowser i.e:

[http://localhost:8080/amit2012PROJECT/first.jsp][3]

JSP ApacheTomcatServer.

+2

. -.

0

, bin, tomcat start.bat , tomcat

u , webapps tomcat : tomcatfolder → webapps → , "" → , jsp jsp , , , url localhost: 8080/test/file name of jsp , , tools.jar , jdk kit jdk, lib copy tools.jar tomcat, , lib, , URL-             $ locallhost: 8080/test/ jsp ( $) ..........

0
source

All Articles