Solved

Need help- JSP page using Struts

Posted on 2011-09-23
12
418 Views
Last Modified: 2013-11-24
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??
0
Comment
Question by:Bethanzil
  • 9
  • 3
12 Comments
 
LVL 9

Expert Comment

by:fcontrepois
Comment Utility
Can you paste the stacktrace from the application server log ?
0
 

Author Comment

by:Bethanzil
Comment Utility
Forgive my ignorance - the error log?
0
 

Author Comment

by:Bethanzil
Comment Utility
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.  
0
 
LVL 9

Expert Comment

by:fcontrepois
Comment Utility
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
0
 

Author Comment

by:Bethanzil
Comment Utility
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?
0
 

Author Comment

by:Bethanzil
Comment Utility
Also - the application files actually sit in the Tomcat 5.5 folder
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Bethanzil
Comment Utility
I remote desktop into the server and can restart - or have IT do it for me...
0
 
LVL 9

Expert Comment

by:fcontrepois
Comment Utility
you should have a logs directory on the tomcat folder. Attach the last 200 lines from logs/catalina.out here
0
 

Author Comment

by:Bethanzil
Comment Utility
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 -
0
 

Author Comment

by:Bethanzil
Comment Utility
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?
0
 

Accepted Solution

by:
Bethanzil earned 0 total points
Comment Utility
I found the issue!! I'm posting here for others...

There is another file called sso-exclusion-urls.dat - Dreamweaver doesn't open this type of file, so my searches for references to the gotoPAGE wasn't finding it in this file...  Once I referenced the new action in this file - it worked.
0
 

Author Closing Comment

by:Bethanzil
Comment Utility
Found the solution myself - yay!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now