• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HelloWorld.jsp Is Jarred Into a .war File

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This HelloWorld.jsp works fine under the c:\...\DefaultWebApp_myserver directory using the WebLogic 6.0 and under the
c:\...\public_html directory using the WebLogic 5.1.0
I jarred this HelloWorld.jsp and create a Test.war file by
cd to the directory and typed
jar cv0f Test.war HelloWorld.jsp <enter>
How do I display "HelloWorld" in the browser using this Test.war file?
 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the URL after your document root, I think you would type /Test/HelloWorld.jsp. Not really sure because I mostly use jars.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I draw this setence in accordance with your suggestion?
If I jar the HelloWorld.jsp into Test.jar, I can run and display "Hello world." by typing http:/localhost:7001/MyRoot/Test/HelloWorld.jsp in the browser.
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that is correct. Let's see if it works.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Both Test.jar and HelloWorld.jsp (which works fine by itself) are under the
c:\bea\wlserver6.0sp1
\config\mydomain\applications\DefaultWebApp_myserver
and I typed
http://localhost:7001/Test/HelloWorld.jsp
got message:
Error 404: Not Found
I cannot pinpoint the problem.
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not really sure of the best way to organize these things, but this is how I have it setup:
I put my jars in the applications directory, the same place where console.war is. I can get to the console by typing http://localhost:7001/console. So my jar, named myjar.jar contains a myjsp.jsp. I can access this by typing http://localhost:7001/myjar/myjsp.jsp.
Hope this helps,
Mike
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Mike, I still can not make that HelloWorld.jsp work after I jarred the file into a .war file. It does not matter whether I can get Hello World on the screen or not. I am simply curious about how to work with .war files.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Mike, I am reading the WebLogic 6.0 Administration document. The document makes me think if I want the jarred HelloWorld.jsp to work, I may need the web.xml, and weblogic.xml files specied and bundle them with the HelloWorld.jsp. What is your opinion? You are much advanced than I.
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry I haven't been around, major deadline #$%!%#@
We do use both those xml's for deploying our web apps, but if I remember correctly, it's mostly servlet mappings.
I'll look at it some tonight. Lots of work to do...

Take a look at WebLogic's samples/examples/webapp directories for an idea on how to use those .xmls. Not a whole lot in there. Just for reference, when I open up my .war in WinZip, my .jsp is not underneath any directory. So I get to it by typing http://localhost:7001/mywar/myjsp.jsp
[This message has been edited by Michael Hildner (edited May 08, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic