Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Ant java web application
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


srikar
java web application
1 Answer(s)      6 years and 5 months ago
Posted in : Ant



Advertisement
View Answers

August 7, 2008 at 12:36 PM


Hi friend,

As per your problem following points to help in create a weblogic application.


1)Install the WebLogic Server and the Eclipse IDE.

2)Develop a servlet application to run the WebLogic Server.

3)Create a servlet file HelloWorld.java which print "Hello World".

package webservlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("Hello World");
}
}

4)Create a directory structure for a Web application.

a)Create a WEB-INF directory.

b)Create a classes directory in the WEB-INF directory.

c)Create a web.xml deployment descriptor in the WEB-INF directory for the Web application.

5)The Directory Structure of WEB-INF.

/WEB-INF
| |
web.xml classes
|
webservlet
|
HelloWorld.class


6)Create bulid.xml and web.xml in WEB-INF directory.

Web.xml
.....................................
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>webservlet.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/helloWorld</url-pattern>
</servlet-mapping>
</web-app>
......................


build.xml
.......................
<target name="compile" depends="init">
<javac debug="true" classpath=""
srcdir="${src}/WEB-INF/classes" destdir="${src}/WEB-INF/classes">
<include name="**/*.java" />
</javac>
<copy todir="${build}/WEB-INF">
<fileset dir="WEB-INF" >
<include name="web.xml" />
</fileset>
</copy>
<copy todir="${build}/WEB-INF/classes">
<fileset dir="${src}/WEB-INF/classes" >
<include name="**/HelloWorld.class" />
</fileset>
</copy>
</target>
<target name="weblogicapplication" depends="compile">
<war basedir="${build}" includes="**/*.class"
destfile="${dist}/helloworld.war" webxml="WEB-INF/web.xml"/>
<copy file="${dist}/helloworld.war" todir=""/>
</target>

........................

7)Develop an build.xml file having Targets.

8)Compile the HelloWorld.java and package and deploy the helloworld.war Web application in the Eclipse IDE with an Ant build.xml .

9)Right-click on the build.xml file and select Run then Ant Build.

10)The Web application .war file helloworld.war created and is deployed to the WebLogic 8.1 Application Server applications directory.

11)Start the WebLogic Server with the bin/run script.

12)The URL http://localhost:7001/webservlet/HelloWorld

13)The HelloWorld Servlet runs in the WebLogic Server

14)output display in the browser.

Thanks.












Related Tutorials/Questions & Answers:
Java web Application
Java web Application  Hi! I have developed a java web application project using netbean IDE with glassfish server. My question is how to create a runnable file from this. How can we make it to a single file? I think it is war
java web application - Ant
java web application  hai, iam new to J2EE. i've installed jdk... tell me the steps to build and deploy a small web application on MyEclipse?(like... a directory structure for a Web application. a)Create a WEB-INF directory
Advertisements
Web application? - Java Interview Questions
Web application?  What is webapplication?  Hi friend, Any application that uses Web Technologies including web browsers, web servers and Internet protocols is called Web Application. A web application can
Quartz web application - Java Beginners
Quartz web application  Quartz is not firing jobs as per cron expression in java web application. I set the cron expression as 0/20 * * * * ? and when i load the web application it runs fine but its not firing the job after
java web application printing - WebSevices
java web application printing  i have a web-page with a table displayed containing report card of a class of students(visual web JSF APPLICATION...!!! cud some1 plz help me and guide me in writing such a java code that wud let me
how to integrate authorize.net in java web application?
how to integrate authorize.net in java web application?  i want to integrate authorize.net in my web application.But they have given simple code in maven ,i want in simple java web application.Please help me
how to launch a web application using java web start in netbeans ide?
how to launch a web application using java web start in netbeans ide?  Hi RoseIndia, I need to launch my web application(web pages-jsp) using java... that java application(java classes) can be launched using java web start quit easily
web application
web application  what is lazy loading in web based application
How to implement openId java web based application?
How to implement openId java web based application?  In my web application i want to implement the OpenId just like stackoverflow.com have to login.... Please tell me how to implement it in java web application in details
Payroll and Leave management system in java web application
Payroll and Leave management system in java web application  Hi Can... code. I need to develop as a web application(not any technology specification) as per now to me. And also let me know which technology in java for best fit
web application
web application  Dear friend, could u plz tell me wats difference bt web server,application server,container with thanks praveen
Java- Save Image into project folder in web application
Java- Save Image into project folder in web application  I have a requirement of saving the image into project folder .. which is a web application. I am not able to figure out how to find the absolute path of my folder which I
java web application without running tomcat
java web application without running tomcat  I did a project by using jsp,html,javascript,css,tomcat,editplus and MSAccess as backend..i created set... is there any way to run the web application(only in single system)without running
Web application
Web application  in web applications which file will execute first either servlet or jsp
web application
web application  Develop a web application to print back the inputs from the user(name, date of birth, address). The solution should have a JSP file which accepts the userÔ??s name and sent to Servlets which puts the name
web application - WebSevices
web application  how to create a j2ee web application using java abstract class & interface
web based java application for Leava and Payroll management system
web based java application for Leava and Payroll management system  Hello Team Good Morning, Can any one please help me with the source code for web based java application for Leava and Payroll management system. Thank you
what is the difference betwen application server & web server - Java Interview Questions
what is the difference betwen application server & web server  what is the difference betwen application server & web server
web application to internet - JavaMail
web application to internet  how to connect my web application to internet
how to create a set up file of java web application
how to create a set up file of java web application  I have already developed a java web application using struts 2.x, jsp,tomcat server, oracle... and applications, so if any one knows how to do the java web application as a set up
how to create a set up file of java web application
how to create a set up file of java web application  I have already developed a java web application using struts 2.x, jsp, oracle as a back end data... if any one knows how to do the java web application as a set up file, please help
how to create a set up file of java web application
how to create a set up file of java web application  I have already developed a java web application using struts 2.x, jsp, oracle as a back end data... if any one knows how to do the java web application as a set up file, please help
connecting to timesten in web application
connecting to timesten in web application  Please give me the steps connecting to timesten in web application. Am using jsp
Need to decide technologies to create new social site web application in java
Need to decide technologies to create new social site web application in java  Hi, I want to create a social site in java, j2ee which should support thousands of user. I want to keep it very simple and light. So few of my
Web application security - Security
Web application security  Hi, Expert how to hide url in webpage or fix the url in every web page in java.Please give any suggestion or idea
Role of Java Applets in Web Application Development
In this article, we are discussing about the role of Java Applets in web application development. As we all know that an Applet is a simple Java program... Applet class provides the standard interface between an Applet application and Web
Directory structure of a web application
Directory structure of a web application   Explain the directory structure of a web application.    The directory structure of a web application consists of two parts. A private directory called WEB-INF. A public
Web application - Spring
Web application  I need one simple complete web application example using springs with database connection,i saw ur demo but it is not succfient.can u send to raghavendra@oneapps.com.I am a beginner
log4j in web application
log4j in web application  Hi all, I am new to log4j. I want to use log4j in my web application. I need to write the debug,info,warn into a file... and how to get the logger object in web application. Thanks suresh
Quartz in web-application
Quartz in web-application  As I am new to Quartz i don't know how to use it in web-application.I am able to run it in eclipse as a stand alone application i had tried out some example but am not able to succeed any help
Web application - business layer
Web application - business layer   Design your business layer to be stateless, which helps to reduce resource contention and increase... with a stateless Web application business layer. If you perform business
 

 

 

DMCA.com