• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Filters and web.xml problem + Eclipse

 
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post your struts-config.xml
 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes sir,



thank you for you time!
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOLVED! It was human error as usual...

I did



instead of






Thanks to those who helped!
 
That feels good. Thanks. Here's a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic