File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Filters and web.xml problem + Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Filters and web.xml problem + Eclipse" Watch "Filters and web.xml problem + Eclipse" New topic
Author

Filters and web.xml problem + Eclipse

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi, I was trying to insert the following entries in web.xml using eclipse.



however, in servlet-name, eclipse modifies the entry into




This is kinda weird. Is eclipse saying that I'm doing something wrong?


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I'm doing something wrong ?


Yes, you're trying to set a url to a servlet-name. The <servlet-name> of the <filter-mapping> has to be an existing servlet name.
Instead, you should use <url-pattern>:



[My Blog]
All roads lead to JavaRanch
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Thanks! That was helpful. But now I get these errors...


HTTP Status 404 - /myapp/actions/findpage.do

--------------------------------------------------------------------------------

type Status report

message /myapp/actions/findpage.do

description The requested resource (/myapp/actions/findpage.do) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.17



Every page or servlet I access, I receive this error... Any more help? Thanks!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Post your struts-config.xml


[My Blog] [JavaRanch Journal]
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
yes sir,



thank you for you time!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

The struts-config.xml file looks to be fine. How do you invoke that action? Is it through some jsp? If so, post the contents of the jsp. Also, how is your application packaged? Is it a war or ear?
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
My app is not yet packaged, I just have my context file point to the .deployable directory of my current workspace in Eclipse. The action can be invoked through the JSP and the URL and I'm quite sure that there is nothing wrong with the JSP or my Action Servlet. Thank you.
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi guys, I haven't solved the problem yet. I looked on the catalina.log and found the following errors(highlighted in bold).


Jul 26, 2006 12:23:38 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_06\bin;C:\.;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
Jul 26, 2006 12:23:38 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8087
Jul 26, 2006 12:23:38 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1282 ms
Jul 26, 2006 12:23:38 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 26, 2006 12:23:38 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Jul 26, 2006 12:23:38 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 26, 2006 12:23:39 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jul 26, 2006 12:23:39 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 26, 2006 12:23:39 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 26, 2006 12:23:40 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jul 26, 2006 12:23:40 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/goldenmiles] startup failed due to previous errors
Jul 26, 2006 12:23:40 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive struts-examples.war
Jul 26, 2006 12:23:41 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 26, 2006 12:23:41 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator/validation.xml'
Jul 26, 2006 12:23:42 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8087
Jul 26, 2006 12:23:42 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 26, 2006 12:23:42 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47 config=null
Jul 26, 2006 12:23:42 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 26, 2006 12:23:42 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4578 ms


So generally, there are two kind of errors I'm dealing here...

1. INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
2. SEVERE: Error filterStart

I am more problematic on the latter since my app would run even if there's the 1st problem. May app would run when I remove the filter entries on my app. If you would ask, the filter entries are on the previous posts. Please help me, I'm only one step ahead to deployment phase. Thank you very much!
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
SOLVED! It was human error as usual...

I did



instead of






Thanks to those who helped!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filters and web.xml problem + Eclipse