This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes is not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "is not available" Watch "is not available" New topic
Author

is not available

Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
Please, can any body help me with this servlet:



By the way I'm using Eclipse 3.0.2 and Tomcat 5.5, and with the rest of the servlets in the same package I don't have any problem.
Thanks!
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Originally posted by Slavko Glisic:
Please, can any body help me with this servlet:

...

By the way I'm using Eclipse 3.0.2 and Tomcat 5.5, and with the rest of the servlets in the same package I don't have any problem.
Thanks!


What problem are you having with this servlet?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
It shows that Servlet does not exist:
HTTP Status 404 - Servlet ListManagerServlet is not available
but I set everything same like for the other servlets from the package(I mean web.xml)
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
That is a very general error, check your tomcat logs to see what is going on.


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
Tim thanks for your reply, but I still don't found out what is going on!
I've found in log smthg like "INFO: Marking servlet ListManagerServlet as unavailable".
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

"INFO: Marking servlet ListManagerServlet as unavailable".


What about before that? The container is marking the servlet as unavailable for a reason -- usually because an exception was thrown while loading it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
But I realy cannot find it :-((!

This is all what it show me:

Jul 6, 2005 5:15:05 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 6, 2005 5:15:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2714 ms
Jul 6, 2005 5:15:06 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 6, 2005 5:15:06 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
Jul 6, 2005 5:15:06 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 6, 2005 5:15:07 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 6, 2005 5:15:07 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 6, 2005 5:15:07 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/80 config=null
Jul 6, 2005 5:15:07 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 6, 2005 5:15:07 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2023 ms
Jul 6, 2005 5:15:26 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
Jul 6, 2005 5:15:26 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Jul 6, 2005 5:15:26 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Jul 6, 2005 5:15:49 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet ListManagerServlet as unavailable
Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
But, thanx anyway!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Your servlet is not in a package - this is probably preventing the class file from being found.
Bill
Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
Thks Bill, but I think that's not a problem 'coz all other works well from the same package(default package), and I was set it in web.xml file, like the others...
i feel sicK!
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Originally posted by Slavko Glisic:
Please, can any body help me with this servlet:




Are you sure that an exception is not being thrown by your code in init? Althought normally I would expect any exceptions thrown to show up on the logs, try adding some logging statements (System.out.println) before the throw statements.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Now that I think about Sonny's suggestion - the only way you can get a not available message that I know of is if the NotAvailableException is thrown.
So it is likely that your web.xml is not providing the addressfile parameter.
Trying to debug servlets that are not put in packages is a hopeless task - thats what years of experience on this and other forums has shown. Just go ahead and bite the bullet - learn how to use packages and pay close attention to the correct form of web.xml. Also - do NOT use the /servlet/ form of URL addressing that requires the use of the "invoker" servlet.
Bill
Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
Thanks Sonny, Bill
Really I'm still new in servlets and I really want to bite the bullet, I don't expect to somebody make job for me, any way this is just one example what I trying to work...
I know that is best way for learning is go inside and try to fix what is the problem, but like I'm said all the other servlet behave normal except this one... b.t.w. this how looks my web.xml
Regards!

Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081


filename = config.getInitParameter("addressfile");


where is init-param for parameter addressfile in your web.xml ???

Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Slavko Glisic
Greenhorn

Joined: Jul 04, 2005
Posts: 14
That's it Shailesh, thanks a lot.
I must learn more about servlet deploying...
Just another question why in the log file this doesn't show me that exception is thrown?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is not available