You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mighty Tornado <mi...@gmail.com> on 2009/03/01 13:50:09 UTC

Can't use J2EE libraries in Eclipse

Hi,
I am working on Mac OS X.
I have the latest version of Tomcat, and Eclipse Europa.

Mac OS X did not come with J2EE.

I downloaded J2EE with GlassFish from Sun. Set it up by running the setup
shell script. Unfortunately the directory structure is very different now, I
am guessing the J2EE is inside GlassFish somewhere. I need to set it up in
Eclipse to be able to compile Servlets and the like. and I cannot find the
right Jars.

1. Could somebody point me to where the jars are now within GlassFish so I
can add them to Eclipse?
2. Is there a way to install J2EE without this GlassFish stuff, just
alongside the J2SE?

Thank you.

Re: Can't use J2EE libraries in Eclipse

Posted by Pid <p...@pidster.com>.
Mighty Tornado wrote:
> Hi,
> I am working on Mac OS X.
> I have the latest version of Tomcat, and Eclipse Europa.
> 
> Mac OS X did not come with J2EE.

Why do you need J2EE?
If you're just making a JSP/Servlet application you don't need it.


p



> I downloaded J2EE with GlassFish from Sun. Set it up by running the setup
> shell script. Unfortunately the directory structure is very different now, I
> am guessing the J2EE is inside GlassFish somewhere. I need to set it up in
> Eclipse to be able to compile Servlets and the like. and I cannot find the
> right Jars.
> 
> 1. Could somebody point me to where the jars are now within GlassFish so I
> can add them to Eclipse?
> 2. Is there a way to install J2EE without this GlassFish stuff, just
> alongside the J2SE?
> 
> Thank you.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Can't use J2EE libraries in Eclipse

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mighty Tornado [mailto:mighty.tornado@gmail.com]
> Subject: Re: Can't use J2EE libraries in Eclipse
>
> <form action="GetInfo.do" method="post">
>  <p>Please Choose Info:</p>
>  <select name="InfoSelect">
>   <option value="Members">Family Members</option>
>   <option value="Time">Time</option>
>  </select>
> </form>
> <input type="submit">

You're missing the closing </input> (or just change the > to /> on the input element).

> <welcome-file-list>
>  <welcome-file>/HTML/index.html</welcome-file>
> </welcome-file-list>

That's not a valid <welcom-file>; to quote from section 9.10 of the servlet spec:

"The welcome file list is an ordered list of partial URLs with no trailing or leading /."

If yours works, it's an accident.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Can't use J2EE libraries in Eclipse

Posted by Mighty Tornado <mi...@gmail.com>.
Here is what I have:
HTML
========

<form action="GetInfo.do" method="post">

<p>

Please Choose Info:

</p>

 <select name="InfoSelect">

<option value="Members">Family Members</option>

<option value="Time">Time</option>

</select>

 </form>

 <input type="submit">


web.xml
=======

<welcome-file-list>

    <welcome-file>/HTML/index.html</welcome-file>

  </welcome-file-list>



  <servlet>

  <servlet-name>GetInfo</servlet-name>

  <servlet-class>com.Household.servlet.GetInfo</servlet-class>

  </servlet>



  <servlet-mapping>

  <servlet-name>GetInfo</servlet-name>

  <url-pattern>/GetInfo.do</url-pattern>

  </servlet-mapping>
On Sun, Mar 1, 2009 at 7:31 PM, Martin Gainty <mg...@hotmail.com> wrote:

>
> you need to identify a program that submit will post to as in this example
>
> <form method="POST" action='chat' name="loginForm">
> <input type="hidden" name="action" value="login"/>
> Nickname: <input type="text" name="nickname"/>
> </form>
>
> where the contents of web.xml map chat to submit its contents to
> ChatServlet
>    <servlet-mapping>
>        <servlet-name>ChatServlet</servlet-name>
>        <url-pattern>/jsp/chat/chat</url-pattern>
>    </servlet-mapping>
>
> where ChatServlet maps to the ChatServlet class located in
> /WEB-INF/classes/chat/ChatServlet
>    <servlet>
>        <servlet-name>ChatServlet</servlet-name>
>        <servlet-class>chat.ChatServlet</servlet-class>
>    </servlet>
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
>
>
> > Date: Sun, 1 Mar 2009 19:02:03 -0500
> > Subject: Re: Can't use J2EE libraries in Eclipse
> > From: mighty.tornado@gmail.com
> > To: users@tomcat.apache.org
> >
> > Thanks,
> > I resolved this issue by having Eclipse use the Tomcat SDK.
> >
> > Unfortunately I now have a different problem with my initial app.
> >
> > I have an HTML page - index.html which asks the user to select one of two
> > values from a dropdown and then click a Submit button.
> >
> > It's a regular HTML form using POST request. I have a context in my
> > server.xml, I have a servlet mapped in web.xml. I have the servlet class
> > compiled and in the deployment dir under webapps in tomcat directory.
> > However, when I hit the submit button on the HTML, nothing happens.
> >
> > not sure where I went wrong.
> >
> > On Sun, Mar 1, 2009 at 8:56 AM, supareno <re...@free.fr> wrote:
> >
> > > Mighty,
> > >
> > > you need to add to your classpath project the servlet.api to compile
> > > servlet
> > > <tomcat6.0.x>/lib/servlet-api.api
> > > (right click on the projet -> build path/configure build path choose
> > > librairy/ add external jar)
> > >
> > > in glassfish v2, it is in <glassfish>/lib/javaee.jar
> > >
> > > now with javaee5, i'm not sure that is possible to download the ee sdk
> > > separeted from glassfish
> > > it was possible with j2ee 1.4
> > >
> > > hope this help
> > >
> > > supareno
> > >
> > >  Hi,
> > >> I am working on Mac OS X.
> > >> I have the latest version of Tomcat, and Eclipse Europa.
> > >>
> > >> Mac OS X did not come with J2EE.
> > >>
> > >> I downloaded J2EE with GlassFish from Sun. Set it up by running the
> setup
> > >> shell script. Unfortunately the directory structure is very different
> now,
> > >> I
> > >> am guessing the J2EE is inside GlassFish somewhere. I need to set it
> up in
> > >> Eclipse to be able to compile Servlets and the like. and I cannot find
> the
> > >> right Jars.
> > >>
> > >> 1. Could somebody point me to where the jars are now within GlassFish
> so I
> > >> can add them to Eclipse?
> > >> 2. Is there a way to install J2EE without this GlassFish stuff, just
> > >> alongside the J2SE?
> > >>
> > >> Thank you.
> > >>
> > >>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
>
> _________________________________________________________________
> Express your personality in color! Preview and select themes for HotmailĀ®.
>
> http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
>

RE: Can't use J2EE libraries in Eclipse

Posted by Martin Gainty <mg...@hotmail.com>.
you need to identify a program that submit will post to as in this example

<form method="POST" action='chat' name="loginForm">
<input type="hidden" name="action" value="login"/>
Nickname: <input type="text" name="nickname"/>
</form>

where the contents of web.xml map chat to submit its contents to ChatServlet
    <servlet-mapping>
        <servlet-name>ChatServlet</servlet-name>
        <url-pattern>/jsp/chat/chat</url-pattern>
    </servlet-mapping>

where ChatServlet maps to the ChatServlet class located in /WEB-INF/classes/chat/ChatServlet
    <servlet>
        <servlet-name>ChatServlet</servlet-name>
        <servlet-class>chat.ChatServlet</servlet-class>
    </servlet>

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Sun, 1 Mar 2009 19:02:03 -0500
> Subject: Re: Can't use J2EE libraries in Eclipse
> From: mighty.tornado@gmail.com
> To: users@tomcat.apache.org
> 
> Thanks,
> I resolved this issue by having Eclipse use the Tomcat SDK.
> 
> Unfortunately I now have a different problem with my initial app.
> 
> I have an HTML page - index.html which asks the user to select one of two
> values from a dropdown and then click a Submit button.
> 
> It's a regular HTML form using POST request. I have a context in my
> server.xml, I have a servlet mapped in web.xml. I have the servlet class
> compiled and in the deployment dir under webapps in tomcat directory.
> However, when I hit the submit button on the HTML, nothing happens.
> 
> not sure where I went wrong.
> 
> On Sun, Mar 1, 2009 at 8:56 AM, supareno <re...@free.fr> wrote:
> 
> > Mighty,
> >
> > you need to add to your classpath project the servlet.api to compile
> > servlet
> > <tomcat6.0.x>/lib/servlet-api.api
> > (right click on the projet -> build path/configure build path choose
> > librairy/ add external jar)
> >
> > in glassfish v2, it is in <glassfish>/lib/javaee.jar
> >
> > now with javaee5, i'm not sure that is possible to download the ee sdk
> > separeted from glassfish
> > it was possible with j2ee 1.4
> >
> > hope this help
> >
> > supareno
> >
> >  Hi,
> >> I am working on Mac OS X.
> >> I have the latest version of Tomcat, and Eclipse Europa.
> >>
> >> Mac OS X did not come with J2EE.
> >>
> >> I downloaded J2EE with GlassFish from Sun. Set it up by running the setup
> >> shell script. Unfortunately the directory structure is very different now,
> >> I
> >> am guessing the J2EE is inside GlassFish somewhere. I need to set it up in
> >> Eclipse to be able to compile Servlets and the like. and I cannot find the
> >> right Jars.
> >>
> >> 1. Could somebody point me to where the jars are now within GlassFish so I
> >> can add them to Eclipse?
> >> 2. Is there a way to install J2EE without this GlassFish stuff, just
> >> alongside the J2SE?
> >>
> >> Thank you.
> >>
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >

_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme

Re: Can't use J2EE libraries in Eclipse

Posted by Mighty Tornado <mi...@gmail.com>.
Thanks,
I resolved this issue by having Eclipse use the Tomcat SDK.

Unfortunately I now have a different problem with my initial app.

I have an HTML page - index.html which asks the user to select one of two
values from a dropdown and then click a Submit button.

It's a regular HTML form using POST request. I have a context in my
server.xml, I have a servlet mapped in web.xml. I have the servlet class
compiled and in the deployment dir under webapps in tomcat directory.
However, when I hit the submit button on the HTML, nothing happens.

not sure where I went wrong.

On Sun, Mar 1, 2009 at 8:56 AM, supareno <re...@free.fr> wrote:

> Mighty,
>
> you need to add to your classpath project the servlet.api to compile
> servlet
> <tomcat6.0.x>/lib/servlet-api.api
> (right click on the projet -> build path/configure build path choose
> librairy/ add external jar)
>
> in glassfish v2, it is in <glassfish>/lib/javaee.jar
>
> now with javaee5, i'm not sure that is possible to download the ee sdk
> separeted from glassfish
> it was possible with j2ee 1.4
>
> hope this help
>
> supareno
>
>  Hi,
>> I am working on Mac OS X.
>> I have the latest version of Tomcat, and Eclipse Europa.
>>
>> Mac OS X did not come with J2EE.
>>
>> I downloaded J2EE with GlassFish from Sun. Set it up by running the setup
>> shell script. Unfortunately the directory structure is very different now,
>> I
>> am guessing the J2EE is inside GlassFish somewhere. I need to set it up in
>> Eclipse to be able to compile Servlets and the like. and I cannot find the
>> right Jars.
>>
>> 1. Could somebody point me to where the jars are now within GlassFish so I
>> can add them to Eclipse?
>> 2. Is there a way to install J2EE without this GlassFish stuff, just
>> alongside the J2SE?
>>
>> Thank you.
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Can't use J2EE libraries in Eclipse

Posted by supareno <re...@free.fr>.
Mighty,

you need to add to your classpath project the servlet.api to compile 
servlet
<tomcat6.0.x>/lib/servlet-api.api
(right click on the projet -> build path/configure build path choose 
librairy/ add external jar)

in glassfish v2, it is in <glassfish>/lib/javaee.jar

now with javaee5, i'm not sure that is possible to download the ee sdk 
separeted from glassfish
it was possible with j2ee 1.4

hope this help

supareno
> Hi,
> I am working on Mac OS X.
> I have the latest version of Tomcat, and Eclipse Europa.
>
> Mac OS X did not come with J2EE.
>
> I downloaded J2EE with GlassFish from Sun. Set it up by running the setup
> shell script. Unfortunately the directory structure is very different now, I
> am guessing the J2EE is inside GlassFish somewhere. I need to set it up in
> Eclipse to be able to compile Servlets and the like. and I cannot find the
> right Jars.
>
> 1. Could somebody point me to where the jars are now within GlassFish so I
> can add them to Eclipse?
> 2. Is there a way to install J2EE without this GlassFish stuff, just
> alongside the J2SE?
>
> Thank you.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org