aspose file tools*
The moose likes Struts and the fly likes struts problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts problem" Watch "struts problem" New topic
Author

struts problem

Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
I have struts 1.1 and tomcat 3.2.1 installed in my PC with j2sdk1.4 ,But as given in your site i tried to do first the struts-blank application. I copied & pasted it in my tomcat\webapps directory..when i start my server again its giving these errors.

-----------

Aug 11, 2004 12:45:40 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
e
Aug 11, 2004 12:45:40 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
l=true
Aug 11, 2004 12:45:40 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='resources.application', returnNull=true
Aug 11, 2004 12:45:40 PM org.apache.struts.tiles.TilesPlugin init
INFO: Tiles definition factory loaded for module ''.
Aug 11, 2004 12:45:40 PM org.apache.struts.validator.ValidatorPlugIn initResourc
es
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Aug 11, 2004 12:45:41 PM org.apache.struts.validator.ValidatorPlugIn initResourc
es
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
2004-08-11 12:45:41 - PoolTcpConnector: Starting HttpConnectionHandler on 8080

--------------
Can u please help me..


DKR<br />SCJP1.2,SCWCD1.4,SCBCD1.3,SCJA
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
I don't see any errors in the log you posted.
Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
when i try to run the jsp file from localhost..this is coming on the browser---------


Internal Servlet Error:

javax.servlet.ServletException: Missing message for key "welcome.title"
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at pages._0002fpages_0002fWelcome_0002ejspWelcome_jsp_0._jspService(_0002fpages_0002fWelcome_0002ejspWelcome_jsp_0.java:226)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:534)
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
It looks like Struts is trying to lookup a value for the key "welcome.title" in a properties file and is not finding it. In your struts-config.xml file, it is telling Struts to look in the 'resources' folder for a file called 'application.properties'

Make sure that there is a file called 'application.properties' in the 'resources' folder and that there is a key and value for 'welcome.title' and 'welcome.heading' and 'welcome.message' in properties file. That should fix the problem.

You could also validate that Struts isn't finding your properties file by commenting out all the <bean:message/> tags in Welcome.jsp and seeing if the jsp prints out "Application resources not loaded -- check servlet container" when you run the application.
Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
Thanks for the reply but, I could not find any error...the application.properties file was there and it had all the 3 key-values.
I could not understand the 2nd suggestion u gave me. I don't have any </bean:meassage> in my jsp file.

Thanks in adv.
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
Below is what the Welcome.jsp file should contain and it should in the 'pages' folder. Do you see the <bean:message/> tags now?

Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
I tried commenting all the bean msg tags but still the error is coming.
Please help me..its becoming messy for me...
is it that hard..!!!
Thanks in adv.
Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
hey! thanks it worked when I deleted the bean msg tags. commenting didn't work.But, why is it not working with the tags.
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
Your commenting did not work because you probably were using html style comments. If you use the jsp comments <%-- %--> then it will properly comment out tag usage.

You can go to this link to find out more documentation on the bean:message tag:

http://struts.apache.org/userGuide/struts-bean.html#message
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts problem