cis-linux2.temple.edu

tamerunSoftware and s/w Development

Aug 15, 2012 (5 years and 3 months ago)

286 views

1


Publishing a JSP web application to Temple’s cis
-
linux2 web server


Start with a Web Application that NetBeans has already run properly (either in the lab or on your PC at home)
.
In order
to publish a JSP web application to the web server, y
ou

must
become

familiar with the folder structure of the project
files


as they are displayed in the NetBeans UI as well as
how
they are stored in the file system.


To
see
where
NetBeans project files are stored (on disk), right click on the file
(from NetBeans Projec
t pane)
and select properties.
If
you created the web application in the computer lab, you’ll find your files stored here:




But from home, it will probably be under myDocuments as shown below.


Notice where the jsp pages are stored (from the NetBean
s UI, from the file system).






2




Next,
notice where the
java
source files

are stored


as shown in the NetBeans IDE as well as in the file system.


Netbeans





Windows Explorer




But
to publish, we will need

the

compiled java class files

and these
you can only
see
in the file system, not in
NetBeans
.




3


Now, we are ready to try to publish the web application
, so run secure ftp:





Menu option: File


Connect




Enter
the name of the temple web server,
enter your NetAccess Username, then click Connect.




Type in your NetAccess password.


4



On the left side of the sftp window (files on
your local PC), browse to

the
build
\
web
folder of your web application.


That’s where you’ll find a copy of

your JSP p
ages as well as the compiled

class files.

On the right side of the sftp window (shows files on your
account on the remote host), type
in:

/var/lib/tomcat6/webapps/SP11_2308_tua12345


Or just type in

/var
and browse down.





On the left side, welect th
e JSP pages (and any other files there) as well as the WEB
-
INF folder (which should have
your compiled java .class files in it). Drag these over to the web server (on the right).



If you see a file on the web server that does not have the proper permis
sions (shown under Attributes column),right
click on the file and change the attributes as shown below (everyone gets read privileges).





This
f
ile
has the
correct
permissions
:

-

r w
-

r
-

-

r
-

-

5


Although this is not needed for your web application to run properly, it is needed for me to check your java code,

so, also drag and drop the src folder (just under your project folder) over to the web server.






Test by entering your URL into a browser:



http://cis
-
linux2.temple.edu:8080/SP11_2308_tua12345