Presentation is loading. Please wait.

Presentation is loading. Please wait.

Julien Thibault / Phil Brewster / Kristina Doing-Harris

Similar presentations


Presentation on theme: "Julien Thibault / Phil Brewster / Kristina Doing-Harris"— Presentation transcript:

1 Julien Thibault / Phil Brewster / Kristina Doing-Harris Julien.thibault@utah.edu

2  Web development includes  web design, web content development, client liaison, client-side/server-side scripting, web server and network security configuration, e-commerce…  Limitations of “static” HTML  HTML only structures data (text, pictures, media) for rendering in the browser  The hosting web server just send the HTML file as is to the user  Does not natively offers ways to interface with data sources (e.g. Databases)  Dynamic web through server-side code  A web server dynamically generates a web page based on the user request  The user’s request is processed on the server-side, and HTML is generated accordingly to represent the response, then finally sent back to the user.  Many technologies and languages available  Microsoft.NET, Java Server Pages  CGI, PHP, ColdFusion

3  Java Servlets  Java Classes used to process HTTP requests  Hosted by the web server (typically Apache Tomcat)  Good technology choice if you want to reuse existing Java libraries  Java Server Pages (JSP)  Java technology used to embed server-side code directly into the web page  When the JSP pages are deployed, the server compiles them and creates the corresponding Servlets.  JSP example:  Server-side code is surrounded by the tags Hello world test Hello World!

4  Open Eclipse JEE and create a new Dynamic Web Project (e.g. helloproject)  The project should include the following folders:  Java Resources/src/: where you put your Java classes (including servlets)  WebContent/: where you put your web pages (html/jsp), and other web content (pictures, CSS)  WebContent/WEB-INF/lib: where you put your Java libraries (jar files)  To create a new JSP page:  Right-click on WebContent/ -> New -> JSP file (e.g. create hello.jsp from previous slide)  To create a new Servlet  Right-click on JavaResources/src/ folder -> New -> Servlet  To deploy your web application  Right-click on the project folder -> Export -> WAR file  Destination: the webapps/ folder of your Apache Tomcat install (e.g. C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\)  The project will be packaged into a WAR file (Web application ARchive) and deployed onto the server  Now you should be able to access you web app at http://localhost:8080/helloproject/hello.jsphttp://localhost:8080/helloproject/hello.jsp

5 Connecting to CHPC  Host: sanddunearch.chpc.utah.edu  Login: uNID  Password: uNID password Hosting your JSP pages 1. Create a public_jsp folder in your home directory 2. Copy your web page to that folder (scp command or WinSCP) 3. Now you can access your webpage at: http://webapps.chpc.utah.edu/~[uNID]/[page_name] Ex: http://webapps.chpc.utah.edu/~u0668260/index.jsphttp://webapps.chpc.utah.edu/~u0668260/index.jsp Note: if you just copy the WAR file to that folder, it might take a few minutes to actually deploy.

6


Download ppt "Julien Thibault / Phil Brewster / Kristina Doing-Harris"

Similar presentations


Ads by Google