Link to home
Start Free TrialLog in
Avatar of Bethanzil
Bethanzil

asked on

Need help- JSP page using Struts

I need some help with some JSP pages - I'm a designer, not programmer with limited programming knowledge...   I have a site that is using JSP pages - it has a basicLayout.jsp which includes the header, footer, content, menu, etc...   There are several HTM pages already linked to in the menu by using the gotoPAGENAME as the href...  what I need is to link to a new HTM page in the same fashion so it uses the basicLayout.jsp as the shell and spits it out in the content section.

I copied one of the existing pages, put it in the same directory and used the same process for linking... also there is an tiles-config and struts-config XML file where I copied and included the new definitions....
  <definition name="pages.home" extends="basicLayout">
    <put name="title" value="Home" />
    <put name="pageTitle" value="Home" />
    <put name="content" value="/pages/content/home.htm" />
  </definition>

<action path="/gotoHome" type="org.apache.struts.actions.ForwardAction" scope="request" parameter="pages.home" />

I get a 500 error when I click the link...  can anyone help?  Am I missing something else I need to do??
Avatar of Frank Contrepois
Frank Contrepois
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you paste the stacktrace from the application server log ?
Avatar of Bethanzil
Bethanzil

ASKER

Forgive my ignorance - the error log?
When we rebooted the server after my making the changes above - the application now won't start - did my change cause the problem?  I removed the changes, replaced the files and it still won't start up again.  
How do you start the server ? This is just to understand which application server you're using, from this info we can find the error log.

The error log is a file with all the information about the starting of the application server

With tomcat the file is called catalina.out
Hello again - so IT is rolling back to previous working version - apache 2.2 folder - there are several logs - error - access - and more.   So I'm back to square one with needing to make the changes - can you help me understand what I need to do to make the "Home" page use the basicLayout.jsp -

That is essentially what I want to do - someone else had gone in and redone the home page with a different layout - we just want it all the same.  So in the menu, I want the home link to link to home.htm but display it in the content area of the basicLayout.jsp with is using tiles for the header, menu, etc...  Does that make sense?
Also - the application files actually sit in the Tomcat 5.5 folder
I remote desktop into the server and can restart - or have IT do it for me...
you should have a logs directory on the tomcat folder. Attach the last 200 lines from logs/catalina.out here
30 Sep 2011 13:49:17 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SelfServe].[SelfServe] -Servlet.service() for servlet SelfServe threw exception
org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.
      at org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)
      at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
      at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
      at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at net.commsoft.sso.SSOFilter.doFilter(SSOFilter.java:89)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Unknown Source)


This is the log that is capturing the error -
I have added a definition to the tiles-def.xml - and the <action path.... > to the struts-config.xml - am I missing a reference somewhere?
ASKER CERTIFIED SOLUTION
Avatar of Bethanzil
Bethanzil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found the solution myself - yay!