completing the web project in netbeans

View: New views
15 Messages — Rating Filter:   Alert me  

completing the web project in netbeans

by imp117 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i'm really need an explaination on how to finishing my project so that my project can be execute as and existing source on other machine

Re: completing the web project in netbeans

by John Yeary-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am not sure I understand your question. If you create a web application doing a clean and build, you will produce a .war file in the dist directory of your project. This .war file can be deployed to your target server. This has some caveats which are not related to the application itself per se.

1. The target server should match the type of server you developed on. For example, developed on Glassfish to deploy on Glassfish. If you deploy it to another application server, it may have specific deployment requirements. Glassfish and Apache Tomcat are generally OK.

2. Any resources like databases need to be configured on the target server.

John

On Wed, Jun 4, 2008 at 10:47 PM, imp117 <mr_ibrahim117@...> wrote:

i'm really need an explaination on how to finishing my project so that my
project can be execute as and existing source on other machine
--
View this message in context: http://www.nabble.com/completing-the-web-project-in-netbeans-tp17660948p17660948.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.




--
John Yeary
--
http://javaevangelist.blogspot.com

"Far better it is to dare might things, to win glorious triumphs, even though checkered by failure,

than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the grey

twilight that knows not victory nor defeat." -- Theodore Roosevelt

Re: completing the web project in netbeans

by imp117 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


John Yeary-2 wrote:
I am not sure I understand your question. If you create a web application
doing a clean and build, you will produce a .war file in the dist directory
of your project. This .war file can be deployed to your target server. This
has some caveats which are not related to the application itself per se.

1. The target server should match the type of server you developed on. For
example, developed on Glassfish to deploy on Glassfish. If you deploy it to
another application server, it may have specific deployment requirements.
Glassfish and Apache Tomcat are generally OK.

2. Any resources like databases need to be configured on the target server.

John

On Wed, Jun 4, 2008 at 10:47 PM, imp117 <mr_ibrahim117@yahoo.com> wrote:

>
> i'm really need an explaination on how to finishing my project so that my
> project can be execute as and existing source on other machine
> --
> View this message in context:
> http://www.nabble.com/completing-the-web-project-in-netbeans-tp17660948p17660948.html
> Sent from the Netbeans - J2EE mailing list archive at Nabble.com.
>
>


--
John Yeary
--
http://javaevangelist.blogspot.com

"Far better it is to dare might things, to win glorious triumphs, even
though checkered by failure,

than to take rank with those poor spirits who neither enjoy much nor suffer
much, because they live in the grey

twilight that knows not victory nor defeat." -- Theodore Roosevelt

yeah!! that solved my problems, thanks bro.

JAR from WebApplication Project

by Júnior - iB :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How do i generate a .JAR for a Web Application?
By default it generates .WAR, but I need a .WAR and a .JAR to the same
project.

Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)

Thanks,
Júnior.


Re: JAR from WebApplication Project

by Sean Chen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The question is why do you want a jar, not a war. It doesn't make much sense.

On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <junior@...> wrote:

> How do i generate a .JAR for a Web Application?
> By default it generates .WAR, but I need a .WAR and a .JAR to the same
> project.
>
> Product Version: NetBeans IDE 6.1 (Build 200804211638)
> Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
> System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)
>
> Thanks,
> Júnior.
>
>

Re: JAR from WebApplication Project

by Júnior - iB :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a web application with the class Product.
And I want to use that class in other web application.


Sean Chen wrote:
The question is why do you want a jar, not a war. It doesn't make much sense.

On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB junior@... wrote:
  
How do i generate a .JAR for a Web Application?
By default it generates .WAR, but I need a .WAR and a .JAR to the same
project.

Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)

Thanks,
Júnior.


    


  

Re: JAR from WebApplication Project

by Victor Manuel Ramirez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You should create a library or a "shared library", look at the nb 6.1 features

2008/6/9 Júnior - iB <junior@...>:
I have a web application with the class Product.
And I want to use that class in other web application.



Sean Chen wrote:
The question is why do you want a jar, not a war. It doesn't make much sense.

On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB junior@... wrote:
  
How do i generate a .JAR for a Web Application?
By default it generates .WAR, but I need a .WAR and a .JAR to the same
project.

Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)

Thanks,
Júnior.


    
  



--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com

Re: JAR from WebApplication Project

by vince kraemer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It sounds like you should put Product into a Java Library Project that
is used by two different Web App projects...

vbk

Júnior - iB wrote:

> I have a web application with the class Product.
> And I want to use that class in other web application.
>
>
> Sean Chen wrote:
>> The question is why do you want a jar, not a war. It doesn't make much sense.
>>
>> On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <junior@...> wrote:
>>  
>>> How do i generate a .JAR for a Web Application?
>>> By default it generates .WAR, but I need a .WAR and a .JAR to the same
>>> project.
>>>
>>> Product Version: NetBeans IDE 6.1 (Build 200804211638)
>>> Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
>>> System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)
>>>
>>> Thanks,
>>> Júnior.
>>>
>>>
>>>    
>>
>>
>>  


RE: JAR from WebApplication Project

by Ho, Michelle M. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Júnior,
 
You can pull your class out of your web application and create a java library.  When you complie the library, you will get a .jar.  Then use this library (.jar) in your web application. 
 
Michelle


From: Júnior - iB [mailto:junior@...]
Sent: Monday, June 09, 2008 8:44 AM
To: nbj2ee@...
Subject: Re: [nbj2ee] JAR from WebApplication Project

I have a web application with the class Product.
And I want to use that class in other web application.


Sean Chen wrote:
The question is why do you want a jar, not a war. It doesn't make much sense.

On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB junior@... wrote:
  
How do i generate a .JAR for a Web Application?
By default it generates .WAR, but I need a .WAR and a .JAR to the same
project.

Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)

Thanks,
Júnior.


    


  

RE: JAR from WebApplication Project

by Kristian Grønli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Move the class Product to a Java Application or Java Class Library.

Then import the new project / jar file in both projects.

Best regards

Kristian

 

 

I have a web application with the class Product.
And I want to use that class in other web application.


Sean Chen wrote:

The question is why do you want a jar, not a war. It doesn't make much sense.
 
On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB junior@... wrote:
  
How do i generate a .JAR for a Web Application?
By default it generates .WAR, but I need a .WAR and a .JAR to the same
project.
 
Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)
 
Thanks,
Júnior.
 
 
    
 
 
  

Re: JAR from WebApplication Project

by Sean Chen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Júnior, other people have answered. Want to point out one more thing:
if "Product" is coupling with web concepts, then you should decouple,
refactor and then move into a class library.

Reply again if you have more questions.

On Mon, Jun 9, 2008 at 12:51 PM, Ho, Michelle M. <Michelle.Ho@...> wrote:

> Júnior,
>
> You can pull your class out of your web application and create a java
> library.  When you complie the library, you will get a .jar.  Then use this
> library (.jar) in your web application.
>
> Michelle
> ________________________________
> From: Júnior - iB [mailto:junior@...]
> Sent: Monday, June 09, 2008 8:44 AM
> To: nbj2ee@...
> Subject: Re: [nbj2ee] JAR from WebApplication Project
>
> I have a web application with the class Product.
> And I want to use that class in other web application.
>
>
> Sean Chen wrote:
>
> The question is why do you want a jar, not a war. It doesn't make much
> sense.
>
> On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <junior@...>
> wrote:
>
>
> How do i generate a .JAR for a Web Application?
> By default it generates .WAR, but I need a .WAR and a .JAR to the same
> project.
>
> Product Version: NetBeans IDE 6.1 (Build 200804211638)
> Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
> System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)
>
> Thanks,
> Júnior.
>
>
>
>
>

Re: JAR from WebApplication Project

by Júnior - iB :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michelle, Vince, Victor...

Actually I am using my classes out of my web application.
And I´m having to create two Project: a "Java Class Library" for each "Web Application".
I would like to create just one (but, of course, I would like to include this one in others).
Take a look in 'contas' at attachments.

Thanks.


Ho, Michelle M. wrote:
Júnior,
 
You can pull your class out of your web application and create a java library.  When you complie the library, you will get a .jar.  Then use this library (.jar) in your web application. 
 
Michelle


From: Júnior - iB [junior@...]
Sent: Monday, June 09, 2008 8:44 AM
To: nbj2ee@...
Subject: Re: [nbj2ee] JAR from WebApplication Project

I have a web application with the class Product.
And I want to use that class in other web application.


Sean Chen wrote:
The question is why do you want a jar, not a war. It doesn't make much sense.

On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB junior@... wrote:
  
How do i generate a .JAR for a Web Application?
By default it generates .WAR, but I need a .WAR and a .JAR to the same
project.

Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)

Thanks,
Júnior.


    


  


t1.jpg (66K) Download Attachment

Re: JAR from WebApplication Project

by Sean Chen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Don't quite understand what you mean, but you should create a common
library for both web projects instead of duplicating a class in two
different libraries.

On Mon, Jun 9, 2008 at 1:13 PM, Júnior - iB <junior@...> wrote:

> Michelle, Vince, Victor...
>
> Actually I am using my classes out of my web application.
> And I´m having to create two Project: a "Java Class Library" for each "Web
> Application".
> I would like to create just one (but, of course, I would like to include
> this one in others).
> Take a look in 'contas' at attachments.
>
> Thanks.
>
>
> Ho, Michelle M. wrote:
>
> Júnior,
>
> You can pull your class out of your web application and create a java
> library.  When you complie the library, you will get a .jar.  Then use this
> library (.jar) in your web application.
>
> Michelle
> ________________________________
> From: Júnior - iB [mailto:junior@...]
> Sent: Monday, June 09, 2008 8:44 AM
> To: nbj2ee@...
> Subject: Re: [nbj2ee] JAR from WebApplication Project
>
> I have a web application with the class Product.
> And I want to use that class in other web application.
>
>
> Sean Chen wrote:
>
> The question is why do you want a jar, not a war. It doesn't make much
> sense.
>
> On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <junior@...>
> wrote:
>
>
> How do i generate a .JAR for a Web Application?
> By default it generates .WAR, but I need a .WAR and a .JAR to the same
> project.
>
> Product Version: NetBeans IDE 6.1 (Build 200804211638)
> Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
> System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)
>
> Thanks,
> Júnior.
>
>
>
>
>

RE: JAR from WebApplication Project

by Ho, Michelle M. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I agree with Sean.  You can create a single library (or multiple where it makes sense) with multiple packages.  You can dump any "shared" code into the library, organizing the code with packages.  Then you can use the library with any web app you develop.
 
Michelle


From: Júnior - iB [mailto:junior@...]
Sent: Monday, June 09, 2008 10:13 AM
To: nbj2ee@...
Subject: Re: [nbj2ee] JAR from WebApplication Project

Michelle, Vince, Victor...

Actually I am using my classes out of my web application.
And I´m having to create two Project: a "Java Class Library" for each "Web Application".
I would like to create just one (but, of course, I would like to include this one in others).
Take a look in 'contas' at attachments.

Thanks.


Ho, Michelle M. wrote:
Júnior,
 
You can pull your class out of your web application and create a java library.  When you complie the library, you will get a .jar.  Then use this library (.jar) in your web application. 
 
Michelle


From: Júnior - iB [junior@...]
Sent: Monday, June 09, 2008 8:44 AM
To: nbj2ee@...
Subject: Re: [nbj2ee] JAR from WebApplication Project

I have a web application with the class Product.
And I want to use that class in other web application.


Sean Chen wrote:
The question is why do you want a jar, not a war. It doesn't make much sense.

On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB junior@... wrote:
  
How do i generate a .JAR for a Web Application?
By default it generates .WAR, but I need a .WAR and a .JAR to the same
project.

Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)

Thanks,
Júnior.


    


  

Re: JAR from WebApplication Project

by Victor Manuel Ramirez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You just have to create one "Java Class Library", then add it to every Web Project where you need it

2008/6/9 Sean Chen <zyschen@...>:
Don't quite understand what you mean, but you should create a common
library for both web projects instead of duplicating a class in two
different libraries.

On Mon, Jun 9, 2008 at 1:13 PM, Júnior - iB <junior@...> wrote:
> Michelle, Vince, Victor...
>
> Actually I am using my classes out of my web application.
> And I´m having to create two Project: a "Java Class Library" for each "Web
> Application".
> I would like to create just one (but, of course, I would like to include
> this one in others).
> Take a look in 'contas' at attachments.
>
> Thanks.
>
>
> Ho, Michelle M. wrote:
>
> Júnior,
>
> You can pull your class out of your web application and create a java
> library.  When you complie the library, you will get a .jar.  Then use this
> library (.jar) in your web application.
>
> Michelle
> ________________________________
> From: Júnior - iB [mailto:junior@...]
> Sent: Monday, June 09, 2008 8:44 AM
> To: nbj2ee@...
> Subject: Re: [nbj2ee] JAR from WebApplication Project
>
> I have a web application with the class Product.
> And I want to use that class in other web application.
>
>
> Sean Chen wrote:
>
> The question is why do you want a jar, not a war. It doesn't make much
> sense.
>
> On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <junior@...>
> wrote:
>
>
> How do i generate a .JAR for a Web Application?
> By default it generates .WAR, but I need a .WAR and a .JAR to the same
> project.
>
> Product Version: NetBeans IDE 6.1 (Build 200804211638)
> Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
> System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb)
>
> Thanks,
> Júnior.
>
>
>
>
>



--
Victor M. Ramirez A.
Ingeniero de Sistemas
Universidad del Norte
http://vramirez.wordpress.com
LightInTheBox - Buy quality products at wholesale price