Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Running examples in j2ee tutorial update 4 of Sun Microsystem's tutorial pdf resource

Posted on 2005-05-16
12
Medium Priority
?
500 Views
Last Modified: 2012-05-05
I downloaded a zip file which contains all tutorial resources including source codes. My problem is that the tutorial assumed that the reader is using Sun's application server. I'm currently using Jboss 4.0.1sp1 as my application server and Im using eclipse 3.0.2 as my development environment. I'm really having difficulties running web application samples found in the resource tutorial.

1. How can I open web application samples found in Sun's "j2ee tutorial update 4" using eclipse 3.0.2 and be able to deploy it? I really need to experiment with the examples.

please help, im really having a hard time on j2ee development.
0
Comment
Question by:anthon007r
  • 7
  • 5
12 Comments
 
LVL 16

Expert Comment

by:suprapto45
ID: 14015673
Hi,

I am thinking that you need to create a new J2EE project on your Eclipse, then you need to copy manually all the JSP, HTML, images and .java files to the appropriate folder. It is something like you are assembling the sample in the Eclipse and JBoss instead of Sun App Server. Do not forget to copy all the jar files too.

Then for the deployment, I think that Eclipse created it automatically, if not, you need to configure your build.xml (Ant) by yourself.

I hope that helps.

Regards
Dave
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 14015682
Alternatively,

If the sample provides .war file, you can import it in your Eclipse. Or you might want to import all the files after you unzip it into your Eclipse.

Regards
Dave
0
 
LVL 1

Author Comment

by:anthon007r
ID: 14015694
how about those xml files? should i copy them too if creating new j2ee projects in eclipse generates some xml files and let the sample's xml files overwrite xml files generated by eclipse?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:anthon007r
ID: 14015725
Im also having problems where to put folders and files to corresponding correct folder
0
 
LVL 1

Author Comment

by:anthon007r
ID: 14015768
like for example,
in eclipse IDE, creating a j2ee web application generates this file system structure:

hello1*
  src
  JRE System Library
  j2ee 1.4 library container
  WebRoot
    META-INF
      MANIFEST.MF
    WEB-INF
      lib
      web.xml

*assuming i named the project as "hello1"

while the "hello1" sample found on tutorial resource have this file system structure

hello1
   build
      duke.waving.gif
      index.jsp
      reponse.jsp
      WEB-INF
        web.xml
   web
      duke.waving.gif
      index.jsp
      index.txt
      response.jsp
      response.txt
     
I really don't know where to put what. My first attempt is to create a "web" folder on web project and copy-paste all the contents from web folder of sample application from the tutorial and got at least 6 errors.

It's really a headache :(
0
 
LVL 1

Author Comment

by:anthon007r
ID: 14015817
I don't thinks it's easy as copy-pasting
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 14015874
Yes,

It is a headache. Normally, if it is a Sun App Server example, you should use Sun App Server. Are you sure that the sample is only in Sun App Server?

I will try to anwer your above questions soon

Regards
Dave
0
 
LVL 1

Author Comment

by:anthon007r
ID: 14015895
Im not sure if I should really use Sun App Server.. but in my opinion, it should not be the case.. what if the I want to switch to different app server? Isn't very inconvenient for the developer to rewrite again? Im not so sure because im really a beginner here in J2ee.. but anyways, I really appreciate your effort for helping me.
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 14016057
Hi,

>>"Isn't very inconvenient for the developer to rewrite again"
Yes, normally, after we finished creating the J2EE web application, we created .WAR file so that it would be fit to other app server. it is like we bundle all the application into 1 portable file. However, if your Sun App server sample has no .war file (instead all the JSP, HTML, .java and etc), it would be hard for us to switch app server since you need to copy manually.

Regards
Dave

0
 
LVL 16

Accepted Solution

by:
suprapto45 earned 600 total points
ID: 14016077
Hi,

Okay since you have this structure in your tutorial.

hello1
   build
      duke.waving.gif
      index.jsp
      reponse.jsp
      WEB-INF
        web.xml
   web
      duke.waving.gif
      index.jsp
      index.txt
      response.jsp
      response.txt

What you can do is that you need to copy the hello1 folder into your Eclipse workspace folder (c:/eclipse3/workspace/hello1). Then you need to go to File > Import > Existing project into Workspace then in the wizard, you need to choose which folder you want to import and what is the name of the project that you want to have and etc.

Now, I do not really know about JBoss but I think that JBoss (Web Server and not App Server) has no JSP/Servlet Container so JBoss itself will not be able to run JSP. You should downlaod the Tomcat in combination of JBoss to run JSP. Unless, you want to download the application server such as IBM WSAD or Bea WebLogic which are able to execute JSP as well as J2EE things (JBoss). I can tell you how to run the application in Tomcat.

Regards
Dave
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 14016079
>> " im really a beginner here in J2ee.."
Any experts in the world came from beginner :)

Regards
Dave
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 14016098
Hi,

As J2EE Beginner, I strongly recommend you to read the threads below.

http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_21396857.html

then

http://www.experts-exchange.com/Web/Q_21399150.html

Regards
Dave
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you a startup company? Being a startup, you may be using shared hosting, or maybe even dedicated hosting. But have you ever given a thought to using cloud computing now? Yes, don’t be surprised, it is possible for startups to opt for cloud compu…
Google webmaster tool or Google search console is an imperative tool for solving different website relevant issues. The amazing features of this tool greatly help to check the indexing and improve the visibility of the site.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month11 days, 8 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question