• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Links in jsp getting jsessionid embedded in them causing them to break

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have separated our project into multiple wars and jars and now when links are created sometimes they get the jsessionid imbedded into them which causes the link to fail. I have told browser to enable cookies. The project when it was not separated into pieces did not put the jsessionid in the url links. Below is the "view source of one of the list jsp screens which shows the jsessionid in some of the links. Then the error screen follows. Do you know how I can stop the system from imbedding the jsessionid's into the links.



<a href="#" id="ToDoListMenuList352Actuator" class="actuator">Filter</a>
<ul id="ToDoListMenuList352Menu" class="menu">
<li><a href="/partyRoleUI/roleTypeAttrList.do?do=listRoleTypeAttrActive;jsessionid=ABC050043B658172728D72ABBBF6EE64" title="Active Items" style="width: 100px">Active Items</a></li>
<li><a href="/partyRoleUI/roleTypeAttrList.do?do=listRoleTypeAttrAll;jsessionid=ABC050043B658172728D72ABBBF6EE64" title="All Items" style="width: 100px">All Items</a></li>
<li><a href="/partyRoleUI/roleTypeAttrList.do?do=listRoleTypeAttrDeleted;jsessionid=ABC050043B658172728D72ABBBF6EE64" title="Deleted Items" style="width: 150px">Deleted Items</a></li>
</ul>
</li>

** THIS IS THE ERROR I GET. IF I REMOVE THE JSESSIONID FROM THE ADDRESS LINE THE LINK WORKS.
HTTP Status 500 -

type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Action[/roleTypeAttrList] does not contain specified method (check logs)
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
root cause
java.lang.NoSuchMethodException: Action[/roleTypeAttrList] does not contain specified method (check logs)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:264)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So why did you separate the web applications if they need to access each other in this manner? Sounds like they logical belong together in the first place.

If there are good reasons for the separation (you didn't say why you separated them), sounds like it may make sense for them to expose their functionality as web services that they can access between each other.
 
David Kirvan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry I did not post the why as I did not think it was pertinent to the problem. The WHY is because my boss wanted it split for reasons he felt it would allow different parts of the system to be redeployed without taking down the whole system. I did have the whole system in a single WAR (my preference). But I am trying get the system to work like he wants.
So I have a War that manages the layout look and feel and contains the decorator.jsp along with the header.jsp, footer.jsp, navigation.jsp and the listmenu.jsp. I have another WAR for handling the logging on to the system and I have a partyRole War for the managing party role UI functions. I have jars to handle the hibernate and business logic.
So I can log in and the top menu links are just fine. When I display any of our List jsp's a new menu like is displayed that will allow the user to filter the data by Active records, All records or Logically deleted records. All worked fine when contained in a single War. Now the filter links have the jsessionid imbedded in them and when selected I think the system is trying to use the jsessionid as a parameter to the method and is failing. Thank you very much for any assistance. I have not found this issue out on the internet.
 
David Kirvan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Resolved.
I used WikiUrlSessionIdFilter which is part of jboss-seam. Which I believe was written by Christian Bauer

https://jira.jboss.org/jira/browse/JBSEAM-3018
 
reply
    Bookmark Topic Watch Topic
  • New Topic