Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes Page not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Page not found" Watch "Page not found" New topic
Author

Page not found

ujwwala tem
Ranch Hand

Joined: Feb 10, 2010
Posts: 83
Hello,


I have installed eclipse ganymede3.4.2 and struts2.1.2,and tomcat5.

I have created dynamic web project StrutsHelloWorld but context root and all I checked,but while running the application

http://localhost/StrutsHelloWorld

its giving me as HTTP Status 404 - /StrutsHelloWorld

Kindly help..
Venkata Kumar
Ranch Hand

Joined: Apr 16, 2008
Posts: 110

Hi Ujwwala,

To access Struts application typical url pattern is http://<ServerIPaddress>:<Port>/<AppContextroot>/<StrutsAction>;

http://localhost/StrutsHelloWorld

Port number and Struts action name are missing in the URL. Did you mention any default welcome page for the application in web.xml

Please post your struts.xml and web.xml. It will give more information to find the problem.

-Venkat


SCJP 5.0, SCWCD 5, preparing for SCDJWS
ujwwala tem
Ranch Hand

Joined: Feb 10, 2010
Posts: 83
Hello,

Thanks for the reply,

Here I have confusion as first of all I have tomcat 5.5.17 and I have added a sysdeo plugin in my eclipse so now how should I deploy my strutsHelloWorld app in tomcat, like if I create a new server and in server perspective so there I am finding option as add remove project but if I dont want to craete server and only want to run throgh plugin then where should I tell the tomcat to deploy this project and if I type http://localhost:80/StrutsHelloWorld/Login.jsp 404 is coming


my struts.xml







my web.xml




Please help
Venkata Kumar
Ranch Hand

Joined: Apr 16, 2008
Posts: 110

To deploy a web application in tomcat using tomcat plugin of eclipse you have to create the web application as tomcat project in eclipse.

here is a nice tutorial on how to deploy web application using tomcat plugin.
http://javaboutique.internet.com/tutorials/three/index.html


-Venkat
ujwwala tem
Ranch Hand

Joined: Feb 10, 2010
Posts: 83
Hello,

Thanks for the reply,
I have create a tomcat project as Hello and now atleast I am able to run the application using struts2,

but the log what I am getting is:

Mar 10, 2010 1:59:56 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\Java\jre1.5.0_22\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.5.0_22/bin/client;C:/Program Files/Java/jre1.5.0_22/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\K-Lite Codec Pack\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.5.0_22\bin;C:\Program Files\Java\jre1.5.0_22\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;;C:\TC\BIN
Mar 10, 2010 1:59:57 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Mar 10, 2010 1:59:57 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3828 ms
Mar 10, 2010 1:59:57 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 10, 2010 1:59:57 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Mar 10, 2010 1:59:57 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 10, 2010 2:00:01 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
Mar 10, 2010 2:00:02 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
Mar 10, 2010 2:00:02 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts.xml]
Mar 10, 2010 2:00:07 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Mar 10, 2010 2:00:07 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Mar 10, 2010 2:00:08 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='com.login.struts.ApplicationResources', returnNull=true
Mar 10, 2010 2:00:08 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive struts-blank.war
Mar 10, 2010 2:00:09 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Mar 10, 2010 2:00:09 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='resources.application', returnNull=true
Mar 10, 2010 2:00:09 PM org.apache.struts.tiles.TilesPlugin init
INFO: Tiles definition factory loaded for module ''.
Mar 10, 2010 2:00:09 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Mar 10, 2010 2:00:10 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Mar 10, 2010 2:00:10 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
Mar 10, 2010 2:00:11 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 10, 2010 2:00:11 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 10, 2010 2:00:12 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Mar 10, 2010 2:00:12 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='com.library.struts.ApplicationResources', returnNull=true
Mar 10, 2010 2:00:13 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Mar 10, 2010 2:00:13 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='com.login.struts.ApplicationResources', returnNull=true
Mar 10, 2010 2:00:13 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 10, 2010 2:00:13 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 10, 2010 2:00:15 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Mar 10, 2010 2:00:16 PM org.apache.jk.common.ChannelSocket init
INFO: Port busy 8009 java.net.BindException: Address already in use: JVM_Bind
Mar 10, 2010 2:00:16 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8010
Mar 10, 2010 2:00:16 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=1 time=0/187 config=null
Mar 10, 2010 2:00:16 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Mar 10, 2010 2:00:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 20218 ms
Mar 10, 2010 2:00:23 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [org.apache.catalina.jsp_file]
Mar 10, 2010 2:00:23 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [struts.valueStack]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:24 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:26 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [.freemarker.Request]
Mar 10, 2010 2:00:26 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [.freemarker.RequestParameters]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [actionErrors]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [actionErrors]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: No configuration found for the specified action: 'login.action' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:27 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Mar 10, 2010 2:00:28 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:28 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Mar 10, 2010 2:00:28 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at java.text.MessageFormat.applyPattern(Unknown Source)
at java.text.MessageFormat.<init>(Unknown Source)
at com.opensymphony.xwork2.DefaultTextProvider.getText(DefaultTextProvider.java:70)
at com.opensymphony.xwork2.DefaultTextProvider.getText(DefaultTextProvider.java:111)
at org.apache.struts2.util.TextProviderHelper.getText(TextProviderHelper.java:62)
at org.apache.struts2.util.TextProviderHelper.getText(TextProviderHelper.java:105)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:631)
at org.apache.struts2.components.UIBean.end(UIBean.java:509)
at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
at org.apache.jsp.Login_jsp._jspx_meth_s_textfield_0(Login_jsp.java:177)
at org.apache.jsp.Login_jsp._jspx_meth_s_form_0(Login_jsp.java:134)
at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:79)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:461)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)



The structure of my project is

WEB-INF/src

---Application.properties

WEB-INF/src/net/virapatel/struts2 -- here loginaction.java

and WEB-INF/struts.xml,web.xml

Please have a look for why the login page still not coming?


ujwwala tem
Ranch Hand

Joined: Feb 10, 2010
Posts: 83
Hello,

Finally I run the project,
Thanks,

Helen Ayele
Greenhorn

Joined: Jan 13, 2011
Posts: 1
Please I am getting the same log messages, how do you remove those error messages? I was using my own customized login page, but now what it comes is the spring security login page and the above error log messages.

I am very confused, would you help me please?

Thanks,

Helen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page not found