java—以编程方式将创建的项名称添加到站点页面url

cygmwpex  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(136)

我的网站页面结构如下:

/Collections (main page that appears on main navigation menu)
   /Add Collection (child page that appears as a drop down (hover) on main    navigation menu)
      /General Information (child page of Add Collection that appears as tabbed sub navigation menu below main navigation menu. After adding the collection, I redirect to this page.)

所以我们的想法是添加一个集合,重定向到 General Information 我在其中显示有关所添加集合的信息的页面。
第一级和第二级页面 theme1 ,而第三级页面“一般信息”有 theme2 . 在站点管理中,这个第三级页面有友好的url http://localhost:8080/web/guest/collections/general-information 这就是我试图通过编程修改的内容。
在创建集合后的portlet类中,我附加 id 此友好url的参数 response.sendRedirect(themeDisplay.getURLPortal()+"/collections/"+"general-information?id="+id); 而在 theme2 以及 jsp ,我明白了 id 显示 General Information 适当的收藏。
我想做的也许是修改友好的网址编程和容纳 collection name 在此url中。比如:

http://localhost:8080/web/guest/collections/{collectionname}/general-information

我该怎么做?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题