File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes error while using html:rewrite in simple jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "error while using html:rewrite in simple jsp" Watch "error while using html:rewrite in simple jsp" New topic
Author

error while using html:rewrite in simple jsp

Tanumon Samanta
Greenhorn

Joined: Aug 24, 2012
Posts: 7
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

Joined: Jan 10, 2002
Posts: 60063
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tanumon Samanta
Greenhorn

Joined: Aug 24, 2012
Posts: 7
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

Joined: Jan 10, 2002
Posts: 60063
    
  65

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

Joined: Jan 10, 2002
Posts: 60063
    
  65

Just guessing, I'd have to surmise that <c:url> is what you are after.
Tanumon Samanta
Greenhorn

Joined: Aug 24, 2012
Posts: 7
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

Joined: Jan 10, 2002
Posts: 60063
    
  65

OK, so you are using Struts? Which is it, yes or no?
Tanumon Samanta
Greenhorn

Joined: Aug 24, 2012
Posts: 7
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

Joined: Jan 10, 2002
Posts: 60063
    
  65

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

Joined: Jul 17, 2012
Posts: 94

i don't know what you want but this is my guess what you are looking


Learning some thing New Every Day
Yogesh Lonkar
Ranch Hand

Joined: Jul 17, 2012
Posts: 94

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error while using html:rewrite in simple jsp
 
Similar Threads
issing message for key
Output Stream already obtained Exception in Websphere
Exception: Cannot find bean in scope -- load testing
Error Urgent PleaseHelp
to Inclue jsp page in another using jsf