You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Akshay Ahooja <ak...@gmail.com> on 2006/06/30 20:08:37 UTC
Hi,
I am using the struts bridge for J2.
I am calling an action by contructing a URL.
As a web app I would call it as so:
<a href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>"> delete
</a>
However in order for it to work inside J2 I need to replace <a with
<html:link :
<html:link href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>">
delete </html:link>
When I use this - the <%=idvalue%> and <%=count%> are not used but rather
treated as strings. This does not happen in the <a case but only in the
<html:link case.
I tried to seperate it out into java print statements:
<%
String link = " <html:link
href=\"RAPSearchDelete.do?id=" +idvalue+ "&check=" +count+ "\"> ";
String endlink = "
</html:link> ";
%>
<%=link%> del <%=endlink%>
The source produced by this comes out correct - but "del" does not appear as
a link.
How do I get around this?
Any help would be great.
Thanks!
Akshay
Posted by Akshay Ahooja <ak...@gmail.com>.
Thanks Susheel...
That still was not working out but i did find another solution:
<bean:define id="id" name="ele" property="<%=idvalue%>"/>
<bean:define id="check" name="ele" property="<%=count-1%>"
/>
<%
java.util.HashMap params = new java.util.HashMap();
params.put("id", idvalue);
params.put("check", count-1);
pageContext.setAttribute("paramsName", params);
%>
<html:link onclick="return window.confirm('Are you sure you
want to delete?');" page="/RAPSearchDelete.do"
name="paramsName">
del
</html:link>
Even though this solution works, there must be something wrong because none
of my links work in J2: ex. <html:link page="RAPSearch.jsp"> Search
</html:link>
I have included the above URI...The error page is pasted below...Any ideas?
Thanks,
Akshay
rapsheet
[image: minimized]<http://localhost:8080/myportal/portal/_ns:YVAtMTBjNDk3MzE5NzMtMTAwMDN8YzB8ZDI_/rapsheet.psml>
[image:
maximized]<http://localhost:8080/myportal/portal/_ns:YVAtMTBjNDk3MzE5NzMtMTAwMDN8YzB8ZDE_/rapsheet.psml>
------------------------------
Error *Error* null *Error Type* java.lang.NullPointerException *Stacktrace*
org.apache.portals.bridges.struts.taglib.LinkTag.calculateURL(LinkTag.java
:99)
org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:341)
org.apache.jsp.RAPSearch_jsp._jspx_meth_html_link_0(RAPSearch_jsp.java:224)
org.apache.jsp.RAPSearch_jsp._jspService(RAPSearch_jsp.java:117)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
org.apache.catalina.core.ApplicationDispatcher.doInclude(
ApplicationDispatcher.java:574)
org.apache.catalina.core.ApplicationDispatcher.include(
ApplicationDispatcher.java:499)
org.apache.portals.bridges.struts.StrutsPortlet.processRequest(
StrutsPortlet.java:375)
org.apache.portals.bridges.struts.StrutsPortlet.processAction(
StrutsPortlet.java:279)
org.apache.jetspeed.factory.JetspeedPortletInstance.processAction(
JetspeedPortletInstance.java:96)
org.apache.jetspeed.container.JetspeedContainerServlet.doGet(
JetspeedContainerServlet.java:221)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
org.apache.catalina.core.ApplicationDispatcher.doInclude(
ApplicationDispatcher.java:574)
org.apache.catalina.core.ApplicationDispatcher.include(
ApplicationDispatcher.java:499)
org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(
ServletPortletInvoker.java:213)
org.apache.jetspeed.container.invoker.ServletPortletInvoker.action(
ServletPortletInvoker.java:133)
org.apache.pluto.PortletContainerImpl.processPortletAction(
PortletContainerImpl.java:164)
org.apache.jetspeed.container.JetspeedPortletContainerWrapper.processPortletAction
(JetspeedPortletContainerWrapper.java:132)
org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(
ActionValveImpl.java:87)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.decoration.DecorationValve.invoke(DecorationValve.java
:100)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(
ProfilerValveImpl.java:179)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.security.impl.LoginValidationValveImpl.invoke(
LoginValidationValveImpl.java:143)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.security.impl.PasswordCredentialValveImpl.invoke(
PasswordCredentialValveImpl.java:148)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.localization.impl.LocalizationValveImpl.invoke(
LocalizationValveImpl.java:168)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.security.impl.AbstractSecurityValve$1.run(
AbstractSecurityValve.java:117)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Unknown Source)
org.apache.jetspeed.security.impl.AbstractSecurityValve.invoke(
AbstractSecurityValve.java:111)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.container.url.impl.PortalURLValveImpl.invoke(
PortalURLValveImpl.java:55)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(
CapabilityValveImpl.java:128)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(
JetspeedPipeline.java:203)
org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java
:185)
org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:231)
org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:226)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(
AuthenticatorBase.java:432)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)
On 7/5/06, Susheel Choudhari <sc...@serenecorp.com> wrote:
>
> Try
>
> <html:link page="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>">
> delete </html:link>
>
> and replace
> <%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
>
> by
> <%@ taglib
> uri="http://portals.apache.org/bridges/struts/tags-portlet-html"
> prefix="html" %>
>
> in your jsp.
>
> Thanks
> Susheel
>
> -----Original Message-----
> From: Akshay Ahooja [mailto:akshayahooja@gmail.com]
> Sent: Friday, June 30, 2006 11:09 AM
> To: Jetspeed Users List
> Subject: <a href> --> <html:link href> issues
>
> Hi,
>
> I am using the struts bridge for J2.
>
> I am calling an action by contructing a URL.
>
> As a web app I would call it as so:
>
> <a href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>"> delete
> </a>
>
>
> However in order for it to work inside J2 I need to replace <a with
> <html:link :
>
> <html:link href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>">
> delete </html:link>
>
>
> When I use this - the <%=idvalue%> and <%=count%> are not used but
> rather
> treated as strings. This does not happen in the <a case but only in the
> <html:link case.
>
> I tried to seperate it out into java print statements:
>
> <%
>
> String link = " <html:link
> href=\"RAPSearchDelete.do?id=" +idvalue+ "&check=" +count+ "\"> ";
> String endlink = "
> </html:link> ";
>
> %>
>
> <%=link%> del <%=endlink%>
>
> The source produced by this comes out correct - but "del" does not
> appear as
> a link.
>
> How do I get around this?
>
> Any help would be great.
>
> Thanks!
>
> Akshay
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
Posted by Susheel Choudhari <sc...@serenecorp.com>.
Try
<html:link page="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>">
delete </html:link>
and replace
<%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
by
<%@ taglib
uri="http://portals.apache.org/bridges/struts/tags-portlet-html"
prefix="html" %>
in your jsp.
Thanks
Susheel
-----Original Message-----
From: Akshay Ahooja [mailto:akshayahooja@gmail.com]
Sent: Friday, June 30, 2006 11:09 AM
To: Jetspeed Users List
Subject: <a href> --> <html:link href> issues
Hi,
I am using the struts bridge for J2.
I am calling an action by contructing a URL.
As a web app I would call it as so:
<a href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>"> delete
</a>
However in order for it to work inside J2 I need to replace <a with
<html:link :
<html:link href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>">
delete </html:link>
When I use this - the <%=idvalue%> and <%=count%> are not used but
rather
treated as strings. This does not happen in the <a case but only in the
<html:link case.
I tried to seperate it out into java print statements:
<%
String link = " <html:link
href=\"RAPSearchDelete.do?id=" +idvalue+ "&check=" +count+ "\"> ";
String endlink = "
</html:link> ";
%>
<%=link%> del <%=endlink%>
The source produced by this comes out correct - but "del" does not
appear as
a link.
How do I get around this?
Any help would be great.
Thanks!
Akshay
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Posted by Susheel Choudhari <sc...@serenecorp.com>.
Try
<html:link page="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>">
delete </html:link>
replace
by
-----Original Message-----
From: Akshay Ahooja [mailto:akshayahooja@gmail.com]
Sent: Friday, June 30, 2006 11:09 AM
To: Jetspeed Users List
Subject: <a href> --> <html:link href> issues
Hi,
I am using the struts bridge for J2.
I am calling an action by contructing a URL.
As a web app I would call it as so:
<a href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>"> delete
</a>
However in order for it to work inside J2 I need to replace <a with
<html:link :
<html:link href="RAPSearchDelete.do?id=<%=idvalue%>&check=<%=count%>">
delete </html:link>
When I use this - the <%=idvalue%> and <%=count%> are not used but
rather
treated as strings. This does not happen in the <a case but only in the
<html:link case.
I tried to seperate it out into java print statements:
<%
String link = " <html:link
href=\"RAPSearchDelete.do?id=" +idvalue+ "&check=" +count+ "\"> ";
String endlink = "
</html:link> ";
%>
<%=link%> del <%=endlink%>
The source produced by this comes out correct - but "del" does not
appear as
a link.
How do I get around this?
Any help would be great.
Thanks!
Akshay
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org