Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filters and web.xml problem + Eclipse

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>:

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post your struts-config.xml
 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes sir,



thank you for you time!
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOLVED! It was human error as usual...

I did



instead of






Thanks to those who helped!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic