• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1160
  • Last Modified:

weblogic ,xml and jar files

Hi
  I am new to weblogic.I have to deploy a webapplication given the jar files and xml files and war files.I deployed the war files  using the weblogic console and it was successful.Now i am given application.xml files and some jar files and asked them to copy(do not know where to copy?) so that i would be able to run the servlets  because if i run with out placing them at the approriate position then i am getting errors.I have application specific xml files.My applicationa are in user_projects\domains\mydomain\myserve/ and i can find the war files in upload folder here.Where i have to keep the xml files(application specific) and jar files ?

Thanks for your help
koppcha
0
koppcha
Asked:
koppcha
1 Solution
 
vikraman_bCommented:
u can find config folder under ur user_projects\domain\...
put ur xml files under it
0
 
koppchaAuthor Commented:
I could find the config folder you are were talking about.In domain i can find all different domain names i created using config wizard.
0
 
koppchaAuthor Commented:
It was a typo.I could not find the folder
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
vikraman_bCommented:
Hi koppcha,
The thing is i want to know which version u r using?
Then when u deploying a war file u dont need application.xml etc.,
b'cos for war file only web.xml,weblogic.xml is needed ....

For ear file u can do thing like
user_projects\domains\mydomain\

under u create application folder
application\META-INF\application.xml
                \lib\place all ur jar files

when u create ur application folder weblogic automatically configure its class path etc.
try this
also u can visit
http://e-docs.bea.com
for all tutorial


0
 
vikraman_bCommented:
Also if u r not dealing with ear file only with war file..

then u can find WEB-INF folder in ur context root likewhen u r deploying for clarify u will choose like D:\Clarify\eFrontOffice10.1SR1\Clarify\Customer\en
under which u create folder for jsps e.g portaljsp\some .jsp
so here u can see WEB-INF folder
so place ur jar files under
WEB-INF\lib\ur jar files
       and web.xml and weblogic.xml under WEB-INF folder itself..

note u dont need any application.xml for war file it is needed only for ear file.
try it will work
0
 
vikraman_bCommented:
0
 
koppchaAuthor Commented:
I am not sure if i am hitting the point correctly.This is my situation tyags....
I have written a JSP and i submitted to my PL.He said it should be have the same look and feel like other jsp's designed for the company.So he said if you set up the environment in your location machine and try out the applications in your location machine then you can fill the style sheets that you could you for your jsp.
      After that i am supposed to do all this stuff.one of my project lead said you have to set the path of the config files in setenv.cmd file with -D option.Do you have any idea what i am talking about.

koppcha
0
 
vikraman_bCommented:
hi the setEnv.cmd is under user_projects/domain/mydomain ..search it.

it looks like

see the //vikram
these places i set my own classpath like that u need to set ..i did for external jars to put in weblogic path..see //vikram
@rem *************************************************************************
@rem This script is used to set up your environment for development with
@rem WebLogic Server. It simply calls the commEnv.cmd script under
@rem D:\bea\weblogic81\common\bin.  Add domain specific configuration in this script below.
@rem *************************************************************************

set WL_HOME=D:\bea\weblogic81
@rem Set Production Mode.  When this is set to true, the server starts up in
@rem production mode.  When set to false, the server starts up in development
@rem mode.  If it is not set, it will default to false.
set PRODUCTION_MODE=

@rem Set JAVA_VENDOR to java virtual machine you want to run on server side.
set JAVA_VENDOR=Sun

@rem Set JAVA_HOME to java virtual machine you want to run on server side.
set JAVA_HOME=D:\bea\jdk141_02

call "%WL_HOME%\common\bin\commEnv.cmd" USE_CURRENT_JAVA_HOME

@rem set JAVA_VM=
set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar


//vikram
set CLFYJAVACLASSPATH=D:\clarify\efrontoffice10.1sr1\javaclasses

//vikram
set CLASSPATH=%CLASSPATH%;%CLFYJAVACLASSPATH%/ClfyCbo.jar;%CLFYJAVACLASSPATH%/ClfyCommon.jar;%CLFYJAVACLASSPATH%/ClfyeOrder.jar;%CLFYJAVACLASSPATH%/servlet.jar;%CLFYJAVACLASSPATH%/xerces.jar
//vikram
set CLFY_INST_DIR=D:\clarify\efrontoffice10.1sr1
//vikram
set PATH=%WL_HOME%\bin;%JAVA_HOME%\bin;%PATH%
//vikram
set PATH=%PATH%;%CLFY_INST_DIR%/bin

What ur PL mean is if u r working with the server..then dont need to set class path but if u r developing u own jsp in stand alone..then put the neccessary class path setting as similar to that in server where the other jsp ir running..
like include the stylesheet,images etc..put similar folder structure ...
then only for integeration it will be easy...

0
 
rama_krishna580Commented:
Hi,

You need to place your servlet within a web application, which is very simple, actually.  You create a folder, lets call it "HelloWebapp".  In that folder create another folder called "WEB-INF".  In WEB-INF create a folder called "Classes".  Compile your serlvet into the "Classes" folder.  Note, your servlet must be in a package, so if it isn't, create a package declaration at the top of your servlet, then make sure, when you compile it, that it's compiled in a folder with the same name as the package name, within in the "Classes" folder.

So, if your servlet is in package "myPackage", the .class file should reside in \HelloWebapp\WEB-INF\Classes\myPackage\HelloServlet.class

You're almost done creating a web application.  Next, you will need a simple web.xml descriptor that gives a web friendly name for your servlet, and points to the servlet.  Create a file called web.xml in the WEB-INF folder (but not in the classes folder).  Paste this inside the web.xml file and save it:

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

    <display-name>Hello World Web Application</display-name>
    <description>Test Servlet</description>
     
    <servlet>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>myPackage.HelloServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/HelloServlet</url-pattern>
    </servlet-mapping>

</web-app>

Now you have told Weblogic that the URI /HelloServlet corresponds to your servlet "myPackage.HelloServlet".

Your Web Application is ready to be deployed at this point.  Log into Weblogic's admin console, and click on deployments, then navigate to "Web Application Modules" (I'm using Weblogic 8.1 - if you're not your interface may be slightly different).  Be sure your Web Application is located somewhere on the same computer as your server at this point.

Click "Deploy new Web Application Module"
Navigate to the location of your web application folder (HelloWebApp).  There should be a radio button next to it indicating that you can select that folder as a valid web application.  Click the radio button and click "Target Module".
Select which server you want to deploy your web application on, then click continue.  At this point, since you're just testing, select the "I will make the web application module accessible from the following location".  You shouldn't have to enter text because the location you selected should already be there.   Just click the "Deploy" button.

After deployed, your web application will appear in the "Web Application Modules" tree on the left.  Click on your web application, click the testing tab, then click the link shown there.  It will not yet show you your servlet (will probably show a 404 error) because you don't have an index.html or index.jsp page.  Instead, add your servlet on to the URL it provided.  

So, if the URL it provided was http://localhost:7001/HelloWebApp/  make your URL http://localhost:7001/HelloWebApp/HelloServlet

You should see your servlet's results at that point, if there are no runtime errors in your servlet.

Best of luck...

R.K
0
 
koppchaAuthor Commented:
You can set the config files specific to the applications in setWeblogic.cmd using the JAVA_OPTIONS a nd -D option.Hope this helps any one who has the same problem.
0
 
koppchaAuthor Commented:
Hi
 Since i figured out the answer myself i do not know what to do.I have posted the answer above.
0
 
moduloCommented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now