• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error while using html:rewrite in simple jsp

 
Tanumon Samanta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use html:rewrite tag in simple jsp(not struts) by importing the <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
var rawURL = '<html:rewrite page="/questionnairesAction.do?impairmentId=IMPAIRMENT_VAL&dob=DATE_OF_BIRTH&act_age=ACTUAL_AGE&clmnt_id=CLAIMANT_ID&genderCode=GENDER_CODE&loop_Indx=IMPAIRMENTLOOPINDX" />';


but when i am running it in the WAS server i am getting the below error.(error with the log)

[8/24/12 19:43:39:812 IST] 0000004f LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[8/24/12 19:43:39:812 IST] 0000004f WebApp E [Servlet Error]-[PWBClaimantHistoryServlet]: java.lang.NullPointerException
at com.ibm.wps.portlets.struts.PortletApiUtilsImpl.createPortletURI(PortletApiUtilsImpl.java:338)
at com.ibm.wps.portlets.struts.PortletApiUtilsImpl.createPortletURIWithStrutsURL(PortletApiUtilsImpl.java:472)
at com.ibm.struts.taglib.html.RewriteTag.doStartTag(RewriteTag.java:132)
at com.ibm._jsp._ViewHistoryDetail._jspx_meth_html_rewrite_0(_ViewHistoryDetail.java:676)
at com.ibm._jsp._ViewHistoryDetail._jspService(_ViewHistoryDetail.java:204)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1097)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:570)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:226)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321)
at com.metlife.us.ins.pwb.portal.controller.ratedage.ClaimantHistoryServlet.doGet(ClaimantHistoryServlet.java:450)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1097)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:570)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1037)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:644)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

Please suggest me a way to use it.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're trying to use Struts not in Struts? What sense is there to that?

If you are using Struts you can use the Struts tags. If you are not, you cannot.
 
Tanumon Samanta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:You're trying to use Struts not in Struts? What sense is there to that?

If you are using Struts you can use the Struts tags. If you are not, you cannot.


so is there any alternative to use the html:rewrite in simple jsps.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is it you want to do? Expecting everyone to know what <html:rewrite> does is a tad optimistic, no?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just guessing, I'd have to surmise that <c:url> is what you are after.
 
Tanumon Samanta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Just guessing, I'd have to surmise that <c:url> is what you are after.


I am trying to call an action class(Struts) from a simple jsp.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so you are using Struts? Which is it, yes or no?
 
Tanumon Samanta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:OK, so you are using Struts? Which is it, yes or no?


Actually, i am using an application which has struts and servlets, the problem is that i have to call an action from a simple jsp. I did the same from another jsp using the html:rewrite tag and this jsp is in struts and it worked. But i cant find a way to call it from the simple jsp.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference between a "regular JSP" and a "simple JSP"?

In any case, this has been moved to the Struts forum.
 
Yogesh Lonkar
Ranch Hand
Posts: 94
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't know what you want but this is my guess what you are looking
 
Yogesh Lonkar
Ranch Hand
Posts: 94
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yogesh Lonkar wrote:i don't know what you want but this is my guess what you are looking


this will call an action "yourActionName" which you define inside your struts.xml
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic