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.ac tions.Forw ardAction" 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??
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
</definition>
<action path="/gotoHome" type="org.apache.struts.ac
I get a 500 error when I click the link... can anyone help? Am I missing something else I need to do??
Can you paste the stacktrace from the application server log ?
ASKER
Forgive my ignorance - the error log?
ASKER
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
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
ASKER
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?
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?
ASKER
Also - the application files actually sit in the Tomcat 5.5 folder
ASKER
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
ASKER
30 Sep 2011 13:49:17 ERROR org.apache.catalina.core.C ontainerBa se.[Catali na].[local host].[/Se lfServe].[ SelfServe] -Servlet.service() for servlet SelfServe threw exception
org.apache.struts.chain.co mmands.Inv alidPathEx ception: No action config found for the specified url.
at org.apache.struts.chain.co mmands.Abs tractSelec tAction.ex ecute(Abst ractSelect Action.jav a:71)
at org.apache.struts.chain.co mmands.Act ionCommand Base.execu te(ActionC ommandBase .java:51)
at org.apache.commons.chain.i mpl.ChainB ase.execut e(ChainBas e.java:191 )
at org.apache.commons.chain.g eneric.Loo kupCommand .execute(L ookupComma nd.java:30 5)
at org.apache.commons.chain.i mpl.ChainB ase.execut e(ChainBas e.java:191 )
at org.apache.struts.chain.Co mposableRe questProce ssor.proce ss(Composa bleRequest Processor. java:283)
at org.apache.struts.action.A ctionServl et.process (ActionSer vlet.java: 1913)
at org.apache.struts.action.A ctionServl et.doGet(A ctionServl et.java:44 9)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 627)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 729)
at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:269 )
at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:1 88)
at net.commsoft.sso.SSOFilter .doFilter( SSOFilter. java:89)
at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:215 )
at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:1 88)
at org.apache.catalina.core.S tandardWra pperValve. invoke(Sta ndardWrapp erValve.ja va:213)
at org.apache.catalina.core.S tandardCon textValve. invoke(Sta ndardConte xtValve.ja va:172)
at org.apache.catalina.authen ticator.Au thenticato rBase.invo ke(Authent icatorBase .java:470)
at org.apache.catalina.core.S tandardHos tValve.inv oke(Standa rdHostValv e.java:127 )
at org.apache.catalina.valves .ErrorRepo rtValve.in voke(Error ReportValv e.java:117 )
at org.apache.catalina.core.S tandardEng ineValve.i nvoke(Stan dardEngine Valve.java :108)
at org.apache.catalina.connec tor.Coyote Adapter.se rvice(Coyo teAdapter. java:174)
at org.apache.jk.server.JkCoy oteHandler .invoke(Jk CoyoteHand ler.java:2 00)
at org.apache.jk.common.Handl erRequest. invoke(Han dlerReques t.java:291 )
at org.apache.jk.common.Chann elSocket.i nvoke(Chan nelSocket. java:775)
at org.apache.jk.common.Chann elSocket.p rocessConn ection(Cha nnelSocket .java:704)
at org.apache.jk.common.Chann elSocket$S ocketConne ction.runI t(ChannelS ocket.java :897)
at org.apache.tomcat.util.thr eads.Threa dPool$Cont rolRunnabl e.run(Thre adPool.jav a:689)
at java.lang.Thread.run(Unkno wn Source)
This is the log that is capturing the error -
org.apache.struts.chain.co
at org.apache.struts.chain.co
at org.apache.struts.chain.co
at org.apache.commons.chain.i
at org.apache.commons.chain.g
at org.apache.commons.chain.i
at org.apache.struts.chain.Co
at org.apache.struts.action.A
at org.apache.struts.action.A
at javax.servlet.http.HttpSer
at javax.servlet.http.HttpSer
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at net.commsoft.sso.SSOFilter
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.authen
at org.apache.catalina.core.S
at org.apache.catalina.valves
at org.apache.catalina.core.S
at org.apache.catalina.connec
at org.apache.jk.server.JkCoy
at org.apache.jk.common.Handl
at org.apache.jk.common.Chann
at org.apache.jk.common.Chann
at org.apache.jk.common.Chann
at org.apache.tomcat.util.thr
at java.lang.Thread.run(Unkno
This is the log that is capturing the error -
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found the solution myself - yay!