• 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

Need help getting servlet software working

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to set up the orion server and get to the point where I can create my own servlets. Here's what I've done:
- downloaded Orion and followed directions for starting the server, creating moo.html, and accessing DateServlet. This all worked.
- tried to download J2EE SDK. I've been working with Java 5 and I downloaded Java EE 5 SDK Preview (All-in-One Bundle). After I completed this download, I modified my CLASSPATH to include the j2ee.jar (in c:\Sun\AppServer\lib\j2ee.jar)
- I compiled BeeServlet.java and copied BeeServlet.class to c:\orion\default-web-app\WEB-INF\classes
- when I directed my browser to http://localhost/servlet/BeeServlet, I got this message:
405 Method Not Allowed
HTTP method GET is not supported by this URL
- if I try the orion-supplied servlets in c:\orion\default-web-app\WEB-INF\classes -- example: configServlet -- the servlets work with no problem

I'd appreciate any help I can get so that I can my own servlets working. I have verified that I did add j2ee.jar correctly to my classpath.

Also, I'm working on Windows XP.

Thanks to anyone who can help.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't tried j2ee 5. I don't know any reason why it would prevent BeeServlet from running, but ...

The j2ee versions generally run one version behind the j2se stuff. You might try uninstalling version 5 and install and compile with j2ee version 4, just to see if that is the culprit.

The orion servlets were precompiled. Another thing you might try (I believe they provide the source code for those example servlets) is to recompile one of the orion servlets, redeploy it (rename the original and put the recompiled one in its place) and see if it still runs.
 
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I had problems with that version as well. When I went back to j2sdkee-1_3_1 everything worked fine.
BTW did you put the jr.jar where it belongs?
[ April 01, 2006: Message edited by: Carol Murphy ]
 
Susan Brown
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marilyn, Carol,

Thanks for your responses. My cable modem wasn't working at home this weekend so I'm late in getting back to the problem. I do think I will try Marilyn's suggestion to recompile and try one of the Orion example servlets. If the servlet doesn't work, I'll think about how I want to handle this. I may uninstall Orion and try to install Tomcat. The experience of checking out Tomcat might be useful because a number of projects in my company use Tomcat.

Susan
 
Susan Brown
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whoops, I should have said that I plan to try both of Marilyn's suggestions.
 
Susan Brown
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just thought I would let people know what I wound up doing. I decided to try installing and working with tomcat rather than Orion. My reasons? I wanted to keep working with Java 5 and, more important, some projects at my company use tomcat and I thought gaining experience with tomcat might be more useful to me than experience with Orion.

So, how did my tomcat installation/configuration work? Well, I got tomcat installed and I can use it for my own servlets. I've submitted assignment servlets-1 for nitpicking and I've also done servlets-2. So, I was successful. Was installing/configuring tomcat difficult? It was a bit of a hassle and it did take me a bit of time. For this reason I'll post some information on what I did and learned in the outside case that another cattledrive student decides to use tomcat.

0: I am using Java 5 with Windows XP so what I write may not be applicable to folks using older versions of Java and different OS's.

1: I went to the tomcat sites:
http://tomcat.apache.org/
http://tomcat.apache.org/tomcat-5.5-doc/setup.html

and downloaded the exe version of tomcat 5.5 for Windows. I chose the exe file because the Java 2 book said that was what should be downloaded for Windows.

I goggled to figure out how to configure tomcat for servlets. I configured tomcat. And I tried to run tomcat. And I tried to run tomcat. I spent some hours on this and couldn't get tomcat to work with my servlets. It did work with the tomcat example servlets and it did work with some servlets I installed from some war file. But when I tried to get my servlets running I kept getting an error message. After gooling the error messages, I ultimately learned (from one of the javaranch newsgroups!) that the windows exe version of tomcat seems (seemed?) to have a problem.

2: I then went back to the tomcat sites and downloaded the zip version of tomcat for windows. I installed and configured it, and with a little work tomcat actually worked for the example servlets and for my servlets.

3: Configuring tomcat is not hard. Learning how to configure tomcat can take some time. I did not find the official tomcat sites to be very useful. They are slanted towards people who are experts in configuring servlet containers, and they have lots (and lots) of information on lots of configurable values. For novices like me the site provided way more information than I could easily plow through to get simple servlets working. The sites that I did find useful are:

http://www.coreservlets.com/Apache-Tomcat-Tutorial/#Configure-Tomcat

http://www.murach.com/dloads/jsps/jsps_tomcat-5.5.pdf

The coreservlets site was particularly useful, and I would recommend using its installation/configuration instructions.
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the update as well as the info, Susan
 
We begin by testing your absorbancy by exposing you to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic