Refering to object instances from a jsp
How can i call object instances within class instances in my application -- from a jsp?
In other words, i want to reference to an pre-existing application instance of a class.
I do not want "use:bean" -- which will use a class (not the specific instance i am looking for in the application).
I also do not want a binding to a variable only ( #{class.variable} ).
Thank You!
eric
That's a good reminder of how to positively access class2, stevejluke. Thanks.
However, i have found by trying to access a simple String in Class1 that the class1 instantiated by the jsf page (this comes up first in the application and has components which require Class1) is not the same instantiation that being accessed by the jsp page (which is navigated to by a button from the jsf page).
I put:
<jsp:useBean id="myBean" class="com.mycompany.expense.EntryHandler" scope="session"/>
at the top of both the jsf and the jsp page.
faces-config.xml has:
<managed-bean>
<description>
Glue bean for entry related events and the current entry data
</description>
<managed-bean-name>entryHandler</managed-bean-name>
<managed-bean-class>
com.mycompany.expense.EntryHandler
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property> ((about 4)) <managed-property>
<managed-bean>
I tried setting <managed-bean-name> equal to the id in the jsp:useBean tag but drew the an error indicating the the <jsp:useBean ...> tag had instantiated the class before the faces-config.xml file had -- hence the managed property could not be found.
I also tried putting name="entryHandler" in the <jsp:useBean > tag, but this is not allowed.
Hmm, how to get the <managed-bean> and <jsp:useBean> to match?
Maybe i have to put in code to the effect "get context " "get instantiation" etc,
I'll have to try looking it up . . .
Similar Messages
-
Create SOFM object instance from PDF
Hi All,
I am using 4.6 version of SAP where FM 'sap_wapi_attachment_add' is does not exit. My query is to create an attachment (SMARTFORM coverted in PDF) in ABAP progam which i have to send as attachment with a Decision Task in the workflow.
I am able to send attachment with mail but to send attachment with decision task i need to create an instance of SOFM object. Please suggest an alternative method to do so instead of FM 'sap_wapi_attachment_add' .Hi Taran,
I had put my code in workflow task. You can find the task method code below:
*Data declaration
DATA: GITAB TYPE SOLIX_TAB,
GSTAB LIKE LINE OF GITAB,
SOFM_KEY TYPE SOFMK,
GIT_LINES TYPE SOLI_TAB.
DATA: LREF_DOCUMENT_BCS TYPE REF TO CL_DOCUMENT_BCS,
LREF_IM_DOCUMENT TYPE REF TO IF_DOCUMENT_BCS.
Generate Smartform*
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = C_FORM
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = GV_FM
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = SY-LANGU
* I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = GV_OUTPUT_OPTIONS-TDPRINTER
EXCEPTIONS
NO_LANGUAGE = 1
LANGUAGE_NOT_INSTALLED = 2
NO_DEVTYPE_FOUND = 3
SYSTEM_ERROR = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
GV_OUTPUT_OPTIONS-TDNOPREV = 'X'.
GV_CONTROL_PARAMETERS-GETOTF = 'X'.
GV_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
CALL FUNCTION GV_FM
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = GV_CONTROL_PARAMETERS
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = GV_OUTPUT_OPTIONS
USER_SETTINGS = 'X'
GV_ENAME = GV_ENAME
GV_PERNR = GV_PERNR
GV_PERSK = GV_PERSK
GV_ZZ_LEVEL = GV_ZZ_LEVEL
GV_BTRTX = GV_BTRTX
GV_GBDAT = GV_GBDAT
GV_JOIN_DATE = GV_JOIN_DATE
GV_RESIN_DATE = GV_RESIN_DATE
IMPORTING
DOCUMENT_OUTPUT_INFO = GV_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = GV_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = GV_JOB_OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
* EXPORTING
* USE_OTF_MC_CMD = 'X'
* ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
TABLES
OTF = GV_JOB_OUTPUT_INFO-OTFDATA
DOCTAB_ARCHIVE = GIT_DOCS
LINES = GIT_LINES_TEMP
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
TABLES
CONTENT_IN = GIT_LINES_TEMP
CONTENT_OUT = GIT_LINES.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
EXPORTING
IP_SOLITAB = GIT_LINES "GIT_LINES_TEMP1
IMPORTING
EP_SOLIXTAB = GITAB.
*Create SOFM object from smartform PDF
IF NOT GITAB IS INITIAL.
TRY.
CALL METHOD CL_DOCUMENT_BCS=>CREATE_DOCUMENT
EXPORTING
I_TYPE = 'BIN'
I_SUBJECT = 'NOTICE PAY WAIVER FORM'
* I_LENGTH =
* I_LANGUAGE = SPACE
* I_IMPORTANCE =
* I_SENSITIVITY =
* I_TEXT =
I_HEX = GITAB
* I_HEADER =
* I_SENDER =
RECEIVING
RESULT = LREF_DOCUMENT_BCS.
CATCH CX_DOCUMENT_BCS .
ENDTRY.
LREF_IM_DOCUMENT = LREF_DOCUMENT_BCS.
TRY.
CALL METHOD LREF_DOCUMENT_BCS->ADD_DOCUMENT_AS_ATTACHMENT
EXPORTING
IM_DOCUMENT = LREF_IM_DOCUMENT.
CATCH CX_DOCUMENT_BCS .
ENDTRY.
TRY.
CALL METHOD LREF_DOCUMENT_BCS->GET_DOCTP
RECEIVING
RESULT = SOFM_KEY-DOCTP.
CATCH CX_OS_OBJECT_NOT_FOUND .
ENDTRY.
TRY.
CALL METHOD LREF_DOCUMENT_BCS->GET_DOCYR
RECEIVING
RESULT = SOFM_KEY-DOCYR.
CATCH CX_OS_OBJECT_NOT_FOUND .
ENDTRY.
TRY.
CALL METHOD LREF_DOCUMENT_BCS->GET_DOCNO
RECEIVING
RESULT = SOFM_KEY-DOCNO.
CATCH CX_OS_OBJECT_NOT_FOUND .
ENDTRY.
SWC_CREATE_OBJECT NOTICE_PAY_WAIVER_FORM 'SOFM' SOFM_KEY.
SWC_SET_ELEMENT CONTAINER 'NOTICE_PAY_WAIVER_FORM'
NOTICE_PAY_WAIVER_FORM.
ENDIF.
The object instance thus created will be visible along with other object instances in the workitem display. Provide this object in binding of decision step as you provise any other obect instance and not as ATTACH_OBJECT
Regards,
Neha -
Transient java object instance from jvm through jni?
Hello, All
Sometimes I want manage the memory take by object instance,
for example, If I want to design a cache which cache a huge number object.
Then, there may two problems:
1, May occur OutOfMemory error.
2, I want like to manually reclaim the memory take by the cached object,
not by gc, because it may take a little time to check the reference for gc.
Just as you know, there is keyword transient for serialization.
I want know if some same mechanism for object instance creating or release, managing memory by jni, or by some other way?No, since you're not supposed to do that. hence you can't really expect Java to provide the means...
Maybe you can use classes like WeakReference etc. but that won't bypass GC. -
How can I invoke a JSP using a URL instance from another JSP?
Hi all.
I've been developed a J2EE application using Oracle 9iAS.
Now I'm migrating to WL Server and I have the following problem.
I was using the following code to read a URL contents from another JSP:
URL url = config.getServletContext().getResource("/path/to/url/of/textfile.xsl");
This was working fine in a expanded directory project structure (typical during
development time) and Oracle 9iAS.
When I execute this code from my WL packed .ear file I get a URL not found exception.
Which is the right way to get a resource available from the same context root?
Thanks in advance for your answers (and sorry for my bad english ;-))
The previous owner of that machine should have wiped it and install the original OS that shipped with the system leaving the system at the point where the new owner takes over and enters all there own information.
Before you go much further with this machine you should seriously consider backing up any new stuff you have done and wiping it and starting from scratch. If you keep the system like it is you will be plagued with problems. Even doing OS updates will prove frustrating.
Right now the best you can do is to move the Aperture that is on the system into the trash, log into the App Store using your ID and buying Aperture. That should work but to be honest I have never had to do it so can;t say for sure.
You might want to look at this What to do before selling or giving away your Mac from Apple to read what they recommend.
good luck
regards -
Is itpossible recover BPM Object instance from Screenflow in Grab Activity?
My process has two roles: role1 and role2.
role2 has an activity of type "Interactive" and the implementation type of this activity is Screenflow, in this Screenflow I have an instance variable of the type BPM Object.
role1 has a Grab Activity from Interactive Activity that describes above, the Grab Activity has a unconditional transition to another Interactive Activity and this Interactive Activity has the same implementation type of the Interactive Activity of the role2 and points to the same Screenflow.
I need to recover the values of the BPM Object that filled in role2, in other words, I need the same instance of the BPM Object in Interactive Acitivity of the role2 in the role1.
If an user filled a field called "name" of BPM Object in the Interactive Activity of the role2, it needs to see that value in the Interactive Activity of the role1 after grabbed this activity of the role2 to role1.
Is it possible?Hi,
Sure it's just me, but I got a bit lost with the description of what you're trying to do. One place I got lost was in the discussion of roles. Roles are used in Oracle BPM processes for a variety of reasons, but I'm not sure they're germane to your problem so I'm trying to rephrase your question without their use.
Here's my attempt to rephrase what it is that I think you're trying to do:
1. I think you have two activities. I'm naming them "Check Credit" and "Final Check"
2. I'm guessing you have a transition between the two activities "Check Credit" and "Final Check"
3. Your process has an instance variable that is a BPM Object that I'm naming "customer". Since it's a BPM Object type, it has a variety of attributes (e.g. customer.name, customer.address, etc.)
4. You have a Grab activity that has its "Runtime" property set to be "Defined" (meaning you have transitions defined coming into and out of the Grab activity). I think you might have a transition going from the "Final Check" activity to your Grab activity and I think you might have a transition going from the Grab to the "Check Credit" activity.
Does this describe your process? I'm assuming you probably want to have the instance variable revert back to original values of the instance variable object before work was done in one of the activites, but don't want to head too far down this path until you confirm that this is what you want to know.
Thanks,
Dan -
Object instance from bean to bean
Hi.
I have backing bean with next structure:
import mypackage.ClassA;
public class BeanName1{
private ClassA instanceClassA;
public ClassA getInstanceClassA();
public void setInstanceClassA(ClassA a);
public class BeanName2{
How can I get instance fro object instanceClassA in other bean class BeanName2?
Thx.Sinnerman,
Exactly what are you trying to do? What are the scopes of your two beans? Depending upon what you are trying to do, there are different answers as to the best way...
For example, if you're trying to pass parameters from one page to another, you could look at using af:setActionListener.
Another method would be to inject the value into the second bean as a managed property (assuming the bean scopes would support it).
In short - more information is needed about what exactly you are trying to do in order to suggest the best approach.
Regards,
John -
Refering to entity instances from a more specific entity context
I have the global entity and two non-singleton entities; the obligation and the invoice. There are multiple obligations, and each obligation has multiple invoices, so it is a classic hierarchical entity structure.
When I write a rule in the context of 'the invoice', I can't seem to be able to refer to the parent 'obligation' that owns the invoice, but I understand that I should be able to because there is no ambiguity as to which obligation I am referring to.
Is this different now in version 10 of OPA? Does it require For()? Does anyone have an example of such a reference?Hi Michael,
Had another look at this after we chatted. You need to use the 'For' function and the reverse text of the relationship between obligations and invoices.
I have an example with the following entities:
Global -- one-to-many --> the cat (Relationship text: the cats)
the cat -- one-to-many --> the cat's toys (Relationship text: the cat's toys; Reverse relationship text: the toy of the cat)
Here's an example rule which infers something about the cat's toy from something about the cat:
the cat's toy is happy if
…..For(the toy of the cat, the cat is happy)This compiles and runs fine in the debugger. Looks like we can't add attachments to posts on the external forum, but I can email the example to you separately.
Cheers,
Jasmine -
How to communicate (transfer object instance) between to java vm?
Hello, All
If possible to transfer object instance straight between two java vm?It is possible to copy an object instance from one java application to another. Define it as serializable, and pass it as a parameter to an RMI call.
-
How to invoke BPM object instance variable from interactive activity?
I have a screenflow with an automatic activity "A" followed by an interactive activity "B". "B" calls a BPM object "X" and uses a JSP presentation to show its attributes. Is there a way to use another BPM object, say type "Y", create an instance variable of that type inside "A", and get its attributes values from the JSP page associated to "B"?
Edited by: user6473912 on 20/07/2010 03:37 PMTry this. It assumes you have:
<li> a user named "auto"
<li> a project variable named "customerType"
<li> an instance variable named "orderAmount" that is a decimal
<li> an instance variable named "order" that is a BPM Object that has attributes named "customerName" and "amount"
ps as ProcessService
xmlObject as Fuego.Xml.XMLObject
do
connectTo ps
using url = Fuego.Server.directoryURL,
user = "auto",
password = "auto"
instF as InstanceFilter
create(instF, processService : ps)
addAttributeTo(instF, variable : "customerType", comparator : IS, value : "Gold")
instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS)
for each inst in getInstancesByFilter(ps, filter : instF) do
// here's how to get the value inside a primitive instance variable
orderAmtObj as Object = getVar(inst, var : "orderAmount")
// here's how to get the value of attributes inside a complex BPM Object instance variable
// - in this case this is an "order" object with two attributes (customerName and amount)
orderObj as Object = (getVar(inst, var : "order"))
xmlObject = Fuego.Xml.XMLObject(createXmlTextFor(DynamicXml, object : orderObj, topLevelTag : "xsi"))
logMessage "The value of the order object's customer name is: " +
selectString(xmlObject, xpath : "customerName")
logMessage "The value of the order object's order amount is: " +
selectNumber(xmlObject, xpath : "amount")
// here's a rather uninspired way to retrieve who the participant is that was assigned the instance
logMessage "The participant assigned to this instance is: " + inst.participantId
end
on exit
disconnectFrom ps
endDan -
Help! How to convert an instance from java.lang.Object to a particula class
* How to convert an instance from java.lang.Object class to a particular class
witch is known only at the running time?
Roster EJB component is make up of RosterHome, Roster and RosterBean.
RosterHome is the home interface of Roster EJB.
Roster is the remote interface of Roster EJB.
RosterBean is the implement of Roster EJB.
The following code segment is to invoke Roster EJB component.
String jndiName="roster.RosterHome";
javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
Object objref = initial.lookup(jndiName);
RosterHome home =
(RosterHome)javax.rmi.PortableRemoteObject.narrow(objref,
RosterHome.class);
Roster myRoster = home.create();
String team="T1"
String player="Tom"
myRoster.addPlayer(player,team);
But, now, all the home interface, the remote interface and the JNDI Name of
Roster EJB component are not been known at the compiling time. However They are
known at the running time, throught reading from the XML config file.
Questions:
1,How to write code for this case ? or
2,How to convert an instance from Object class to a particular class witch is known
only at the running time?
String jndiName="roster.RosterHome";// in fact, reads from XML file.
String homeClassName="roster.RosterHome";// in fact, reads from XML file.
String remoteClassName="roster.Roster";// in fact, reads from XML file.
javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
Object objref = initial.lookup(jndiName);
Object objHome= javax.rmi.PortableRemoteObject.narrow(objref,
Class.forName(homeClassName));
/* how to do next?
}I am not sure what you are trying to do. But at some point you should know which methods to call on the remote interfaces. Maybe the method names are stored in the XML file as well or you have a set of standard method names (also consider parameters).
However, this can be solved by reflection. Look at the java.lang.reflect package, especially java.lang.reflect.Method, and also at java.lang.Class.
If you are doing this on the app server:
I've seen posts where people say that reflection is not permitted in EJB, but I don't think so. Check the EJB spec.
If you are doing this in an application: reflection is always permitted. Probably also in applets and JSP. -
Share Java Object Instance between JSP's
Hi@all!
Can i share a Java Object Instance between JSPages?
Example:
Class x
Public Attribute txt
Object creation in x.jsp
set public Attribute txt to "HelloWorld"
goto y.jsp
get value from txt
or...
a global package
thnx for helpHere is a tutorial that explains how to use jsps and javabeans together.
http://www.roseindia.net/jsp/usingbeansinjsp.shtml
Quick question is sounds like you are pretty early in your development phase. Have you considered adopting JSF. You may find it a bit easier.
Regards. -
Refering Master object from DetailViewRowImpl
Hi, Can anyone please tell me how can I refer to a Master object row from a DetailViewRowImpl. I have a Master.jsp and Detail.jsp where when I update 'Quantity' in Detail view, 'Current Quantity' in Master View should be updated. Can anyone please explain me how can I do this?
Thank You
Sirishahi
I think this forum thread is related to your problem:
"ADF BC : using ViewLink to get master-row"
ADF BC : using ViewLink to get master-row
I would also recommend reading:
"Difference Between View Link Attribute and View Link Instance in Data Model"
http://radio.weblogs.com/0118231/stories/2004/11/08/differenceBetweenViewLinkAttributeAndViewLinkInstanceInDataModel.html
success
Jan Vervecken -
Cannot a get JSP page instance from a page being destroyed
We have a J2EE app, using Struts + Tiles (build 1.1-b3), running on Win2KPro, Ora9ias v9.0.3. The application is roles-based, and different users see different versions of the same page based on their role authorizations. Occasionally, when multiple users in different roles are requesting the same page, the app returns the following exception:
OracleJSP:
JSP Error:
Request URI:/fast/WEB-INF/jsp/tiles/layouts/baseLayout.jsp
Exception:
javax.servlet.ServletException: Cannot a get JSP page instance from a page being destroyed
at oracle.jsp.runtimev2.JspPageInstFacade.getInstance(JspPageInstFacade.java:147)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:303)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at com.gal.fast.portal.web.SessionInitializedFilter.doFilter(SessionInitializedFilter.java:105)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:119)
at org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude(TilesUtilStrutsModulesImpl.java:124)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:161)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:703)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:818)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:467)
at web2d_inf._jsp._tiles._layouts._baseLayout._jspService(_baseLayout.java:445)
[SRC:/WEB-INF/jsp/tiles/layouts/baseLayout.jsp:149]
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at com.gal.fast.portal.web.SessionInitializedFilter.doFilter(SessionInitializedFilter.java:105)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1033)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:269)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:249)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:303)
at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at com.gal.fast.portal.web.FastActionServlet.service(FastActionServlet.java:110)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at com.gal.fast.portal.web.SessionInitializedFilter.doFilter(SessionInitializedFilter.java:105)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:536)
All the code in the two custom classes above ( com.gal.fast.portal.web.SessionInitializedFilter and com.gal.fast.portal.web.FastActionServlet ) has been commented out to the point that they are NOOP stubs.
We only see this with multiple near-simultaneous requests for the same page with differet roles. It smells like a threading issue to me, but I'm no expert (hence this post). Any thoughts?
--mattWe have a J2EE app, using Struts + Tiles (build 1.1-b3), running on Win2KPro, Ora9ias v9.0.3. The application is roles-based, and different users see different versions of the same page based on their role authorizations. Occasionally, when multiple users in different roles are requesting the same page, the app returns the following exception:
OracleJSP:
JSP Error:
Request URI:/fast/WEB-INF/jsp/tiles/layouts/baseLayout.jsp
Exception:
javax.servlet.ServletException: Cannot a get JSP page instance from a page being destroyed
at oracle.jsp.runtimev2.JspPageInstFacade.getInstance(JspPageInstFacade.java:147)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:303)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at com.gal.fast.portal.web.SessionInitializedFilter.doFilter(SessionInitializedFilter.java:105)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:119)
at org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude(TilesUtilStrutsModulesImpl.java:124)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:161)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:703)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:818)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:467)
at web2d_inf._jsp._tiles._layouts._baseLayout._jspService(_baseLayout.java:445)
[SRC:/WEB-INF/jsp/tiles/layouts/baseLayout.jsp:149]
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at com.gal.fast.portal.web.SessionInitializedFilter.doFilter(SessionInitializedFilter.java:105)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1033)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:269)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:249)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:303)
at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at com.gal.fast.portal.web.FastActionServlet.service(FastActionServlet.java:110)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at com.gal.fast.portal.web.SessionInitializedFilter.doFilter(SessionInitializedFilter.java:105)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:536)
All the code in the two custom classes above ( com.gal.fast.portal.web.SessionInitializedFilter and com.gal.fast.portal.web.FastActionServlet ) has been commented out to the point that they are NOOP stubs.
We only see this with multiple near-simultaneous requests for the same page with differet roles. It smells like a threading issue to me, but I'm no expert (hence this post). Any thoughts?
--matt -
Passing "Value Objects" from one JSP to next (2)
Someone posted a response from BEA which has since disappeared, it was no different
from what I was doing and it I still can't get it to store the information in
the Value Object.
I get values (true/false) from a Radio button on a FORM in a JSP, press a "Next
Step" Button.
I have a "Value Object" in JSP_1, which I use the setters to store various information
obtained from the <FORM>. I then "jsp:forward" to JSP_2, set different information
and then I "jsp:forward" to JSP_3 & so on. At the end of the JSP chain only the
last setter is has the value "true", all the other values are false, despite all
being "set" to "true".
The "Value Object" is not storing the information set in previous JSPs. When I
initially create the "value object" I use;
<jsp:useBean id="myVO" class="uk.co.notify.valueobjects.MyVO" scope="request"
/>
<jsp:setProperty name="myVO" property="*"/>
In JSP_2 JSP999 I don't use <jsp:setProperty> I let the setter in the VO do
it.
I am using WebLogic 6.1 sp2 under Windows 2K Pro.
Any pointers. Thanks.
[att1.html]
Ok. here's the difference.
Hitting submit is altogether a different "new" http request. It will send a
new request from your browser to the server. Whereas, the jsp:forward is
within the server itself.
So the VO object whose scope is set to "request" will not retain its values
between 2 http request.
For such kind of parameter passing, you could very well store the info. in
user's session object.
I hope this helps.
Best Regards,
Narayan Anand
Developer Relations Engineer
BEA Systems, Inc.
"Roger Lee" <[email protected]> wrote in message
news:[email protected]...
>
> If I put the jsp:forward statement in all my JSPs before I test for my
request;
>
> <%
> if ( request.getParameter("SubmitStep2") != null ) {
> String sParameter2 = request.getParameter("SubmitStep2");
> if (sParameter2.equals("Next Step")) {
> // CODE ETC
> }
> }
>
> The jsp will chain right to the last JSP and all the values set in my
ValueObject
> will remain set.
>
> Why does hitting a submitt button;
>
> <input type="submit" name="SubmitStep2" value="Next Step">
>
> cause the VO to lose previous stored values.
>
> Any information would be appreciated.
>
> Roger Lee
>
>
> "Roger Lee" <[email protected]> wrote:
> >
> >Narayan,
> >
> >I got your example working fine.
> >
> >I added a few more debug statements and it appears that as I enter JSP
> >2 the value
> >"set" in JSP 1 is stored okay (boolean true).
> >
> >However after the "submit" of the button in JSP which forwards us to
> >JSP 3 is
> >pressed all the values are reset to their default value (false).
> >
> >
> >"Narayan Anand" <[email protected]> wrote:
> >>Hi Roger,
> >>
> >>I will look into your code.
> >>In the meantime, pls try my test case in your system and see if you
> >can
> >>run
> >>that without any problem.
> >>
> >>Best Regards,
> >>Narayan Anand
> >>Developer Relations Engineer
> >>BEA Systems, Inc.
> >>
> >>"Roger Lee" <[email protected]> wrote in message
> >>news:[email protected]...
> >>>
> >>> Narayan,
> >>>
> >>> Thanks for your reply. My code seems to be the same as yours! I still
> >>can't get
> >>> the JSPs to "set" the VO and pass it down the chain of JSPs. When
> >I
> >>get
> >>the last
> >>> JSP the first three have the boolean value set to false, whilst the
> >>last
> >>one is
> >>> set to the value chosen (true).
> >>>
> >>> I have attached the JSPs and VO in the attached ZIP file. It must
> >be
> >>something
> >>> obvious, which I can't see!
> >>>
> >>> Regards,
> >>>
> >>> Roger Lee
> >>>
> >>>
> >>> "Narayan Anand" <[email protected]> wrote:
> >>> >
> >>> >
> >>> >
> >>> >------=_NextPart_001_02EB_01C257F2.2EC54EA0
> >>> >
> >>> >Hi Roger,
> >>> >
> >>> >I can still view my previous reply to your post.
> >>>
>
>>>http://216.148.48.100/cgi-bin/dnewsweb?cmd=3Darticle&group=3Dweblogic.dev
=
> >>> >eloper.interest.jsp&item=3D10138&utag=3D
> >>> >
> >>> >Just now I tested this again.
> >>> >WLS6.1SP2 on Win2k.
> >>> >
> >>> >JSP1 - sets one value using setProperty tag.
> >>> >JSP2 - sets second property using the VO's setter.
> >>> >JSP3 - retrieve and prints the values using the VO's getters and
> >also
> >>> >=
> >>> >using the getProperty tag.
> >>> >
> >>> >attached are all the jsp's and value object.
> >>> >Please test it in your environment. It should work.
> >>> >Then compare it with your code to see the difference.
> >>> >
> >>> >I hope this will help to resolve the issue.
> >>> >
> >>> >Regards,
> >>> >Narayan Anand
> >>> >Developer Relations Engineer
> >>> >BEA WebLogic Support
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > "Roger Lee" <[email protected]> wrote in message =
> >>> >news:[email protected]...
> >>> >
> >>> > Someone posted a response from BEA which has since disappeared,
> >>it
> >>> >was =
> >>> >no different
> >>> > from what I was doing and it I still can't get it to store the
> >=
> >>> >information in
> >>> > the Value Object.
> >>> >
> >>> > I get values (true/false) from a Radio button on a FORM in a JSP,
> >>=
> >>> >press a "Next
> >>> > Step" Button.
> >>> >
> >>> > I have a "Value Object" in JSP_1, which I use the setters to store
> >>> >=
> >>> >various information
> >>> > obtained from the <FORM>. I then "jsp:forward" to JSP_2, set
different
> >>> >=
> >>> >information
> >>> > and then I "jsp:forward" to JSP_3 & so on. At the end of the JSP
> >>chain
> >>> >=
> >>> >only the
> >>> > last setter is has the value "true", all the other values are
false,
> >>> >=
> >>> >despite all
> >>> > being "set" to "true".
> >>> >
> >>> > The "Value Object" is not storing the information set in previous
> >>=
> >>> >JSPs. When I
> >>> > initially create the "value object" I use;=20
> >>> >
> >>> > <jsp:useBean id=3D"myVO" class=3D"uk.co.notify.valueobjects.MyVO"
> >>=
> >>> >scope=3D"request"
> >>> > />=20
> >>> > <jsp:setProperty name=3D"myVO" property=3D"*"/>=20
> >>> >
> >>> > In JSP_2 JSP999 I don't use <jsp:setProperty> I let the setter
> >>in
> >>> >=
> >>> >the VO do
> >>> > it.
> >>> >
> >>> > I am using WebLogic 6.1 sp2 under Windows 2K Pro.=20
> >>> >
> >>> > Any pointers. Thanks.=20
> >>> >
> >>> >
> >>> >------=_NextPart_001_02EB_01C257F2.2EC54EA0
> >>> >
> >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> >>> ><HTML><HEAD>
> >>> ><META http-equiv=3DContent-Type content=3D"text/html; =
> >>> >charset=3Diso-8859-1">
> >>> ><META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
> >>> ><STYLE></STYLE>
> >>> ></HEAD>
> >>> ><BODY bgColor=3D#ffffff>
> >>> ><DIV><FONT face=3DArial size=3D2>Hi Roger,</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>I can still view my previous reply
> >>to
> >>> >=
> >>> >your=20
> >>> >post.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2><A=20
> >>>
>href=3D"http://216.148.48.100/cgi-bin/dnewsweb?cmd=3Darticle&group=3D=
> >>> >weblogic.developer.interest.jsp&item=3D10138&utag">http://216.148=
> >>>
>..48.100/cgi-bin/dnewsweb?cmd=3Darticle&group=3Dweblogic.developer.int=
> >>> >erest.jsp&item=3D10138&utag</A>=3D</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>Just now I tested this =
> >>> >again.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>WLS6.1SP2 on Win2k.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>JSP1 - sets one value using
setProperty
> >>> >=
> >>> >
> >>> >tag.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>JSP2 - sets second property using
> >>the
> >>> >=
> >>> >VO's=20
> >>> >setter.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>JSP3 - retrieve and prints the
values
> >>> >=
> >>> >using the=20
> >>> >VO's getters and also using the getProperty tag.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>attached are all the jsp's and
value=20
> >>> >object.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>Please test it in your environment.
> >>> >It =
> >>> >should=20
> >>> >work.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>Then compare it with your code to
> >>see
> >>> >=
> >>> >the=20
> >>> >difference.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>I hope this will help to resolve
> >>the=20
> >>> >issue.</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2>Regards,<BR>Narayan
Anand<BR>Developer
> >>> >=
> >>> >Relations=20
> >>> >Engineer<BR>BEA WebLogic Support</FONT></DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> >>> ><BLOCKQUOTE=20
> >>> >style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px;
> >>=
> >>> >BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
> >>> > <DIV>"Roger Lee" <<A=20
> >>> > href=3D"mailto:[email protected]">[email protected]</A>> wrote
> >in
> >>> >=
> >>> >message <A=20
> >>> > =
> >>>
>
>>>href=3D"news:[email protected]">news:[email protected]
=
> >>> >a.com</A>...</DIV><BR>Someone=20
> >>> > posted a response from BEA which has since disappeared, it was
> >no=20
> >>> > different<BR>from what I was doing and it I still can't get it
> >to
> >>=
> >>> >store the=20
> >>> > information in<BR>the Value Object.<BR><BR>I get values
(true/false)
> >>> >=
> >>> >from a=20
> >>> > Radio button on a FORM in a JSP, press a "Next<BR>Step" =
> >>> >Button.<BR><BR>I have=20
> >>> > a "Value Object" in JSP_1, which I use the setters to store
various=20
> >>> > information<BR>obtained from the <FORM>. I then "jsp:forward"
> >>> >to =
> >>> >JSP_2,=20
> >>> > set different information<BR>and then I "jsp:forward" to JSP_3
> >&
> >>> >=
> >>> >so on. At=20
> >>> > the end of the JSP chain only the<BR>last setter is has the value
> >>=
> >>> >"true", all=20
> >>> > the other values are false, despite all<BR>being "set" to =
> >>> >"true".<BR><BR>The=20
> >>> > "Value Object" is not storing the information set in previous JSPs.
> >>> >=
> >>> >When=20
> >>> > I<BR>initially create the "value object" I use; =
> >>> ><BR><BR><jsp:useBean=20
> >>> > id=3D"myVO" class=3D"uk.co.notify.valueobjects.MyVO" =
> >>> >scope=3D"request"<BR>/>=20
> >>> > <BR><jsp:setProperty name=3D"myVO" property=3D"*"/> <BR><BR>In
> >>> >=
> >>> >JSP_2=20
> >>> > JSP999 I don't use <jsp:setProperty> I let the setter in the
> >>> >=
> >>> >VO=20
> >>> > do<BR>it.<BR><BR>I am using WebLogic 6.1 sp2 under Windows 2K Pro.
> >>> >=
> >>> ><BR><BR>Any=20
> >>> > pointers. Thanks. <BR></BLOCKQUOTE></BODY></HTML>
> >>> >
> >>> >------=_NextPart_001_02EB_01C257F2.2EC54EA0--
> >>> >
> >>> >
> >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> >>> ><HTML>
> >>> ><HEAD>
> >>> ><TITLE>Reusing JavaBeans in JSP</TITLE>
> >>> ><LINK REL=STYLESHEET
> >>> > HREF="My-Style-Sheet.css"
> >>> > TYPE="text/css">
> >>> ></HEAD>
> >>> >
> >>> ><BODY>
> >>> >
> >>> ><CENTER>
> >>> ><TABLE BORDER=5>
> >>> > <TR><TH CLASS="TITLE">
> >>> > Reusing JavaBeans in JSP</TABLE>
> >>> ></CENTER>
> >>> ><P>
> >>> >
> >>> ><jsp:useBean id="test" scope="request" class="hall.SimpleBean" />
> >>> ><jsp:setProperty name="test"
> >>> > property="message"
> >>> > value="Hello forward WWW" />
> >>> >
> >>> ><jsp:forward page="/myjsp2.jsp" />
> >>> >
> >>> ></BODY>
> >>> ></HTML>
> >>> >
> >>> >
> >>> >
> >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> >>> ><HTML>
> >>> ><HEAD>
> >>> ><TITLE>Reusing JavaBeans in JSP</TITLE>
> >>> ><LINK REL=STYLESHEET
> >>> > HREF="My-Style-Sheet.css"
> >>> > TYPE="text/css">
> >>> ></HEAD>
> >>> >
> >>> ><BODY>
> >>> >
> >>> ><CENTER>
> >>> ><TABLE BORDER=5>
> >>> > <TR><TH CLASS="TITLE">
> >>> > Reusing JavaBeans in 2 JSP</TABLE>
> >>> ></CENTER>
> >>> ><P>
> >>> >
> >>> ><jsp:useBean id="test" scope="request" class="hall.SimpleBean" />
> >>> >
> >>> > <% test.setMessage1("Second message1 using setters"); %>
> >>> >
> >>> >
> >>> ><jsp:forward page="/myjsp3.jsp" />
> >>> >
> >>> >
> >>> ></BODY>
> >>> ></HTML>
> >>> >
> >>> >
> >>> >
> >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> >>> ><HTML>
> >>> ><HEAD>
> >>> ><TITLE>Reusing JavaBeans in JSP</TITLE>
> >>> ><LINK REL=STYLESHEET
> >>> > HREF="My-Style-Sheet.css"
> >>> > TYPE="text/css">
> >>> ></HEAD>
> >>> >
> >>> ><BODY>
> >>> >
> >>> ><CENTER>
> >>> ><TABLE BORDER=5>
> >>> > <TR><TH CLASS="TITLE">
> >>> > Reusing JavaBeans in 2 JSP</TABLE>
> >>> ></CENTER>
> >>> ><P>
> >>> >
> >>> ><jsp:useBean id="test" scope="request" class="hall.SimpleBean" />
> >>> >
> >>> ><%
> >>> >System.out.println("\nMessage is :"+test.getMessage());
> >>> >System.out.println("\nMessage1 is :"+test.getMessage1());
> >>> >%>
> >>> >
> >>> ><H1>Message: <I>
> >>> ><jsp:getProperty name="test" property="message" />
> >>> ></I></H1>
> >>> >
> >>> ><H1>Message1: <I>
> >>> ><jsp:getProperty name="test" property="message1" />
> >>> ></I></H1>
> >>> >
> >>> >
> >>> ></BODY>
> >>> ></HTML>
> >>> >
> >>> >
> >>> >
> >>> >package hall;
> >>> >
> >>> >public class SimpleBean {
> >>> > private String message = "No message specified";
> >>> > private String message1 = "No message1 specified";
> >>> >
> >>> > public String getMessage() {
> >>> > return(message);
> >>> > }
> >>> >
> >>> > public void setMessage(String message) {
> >>> > this.message = message;
> >>> > }
> >>> >
> >>> > public String getMessage1() {
> >>> > return(message1);
> >>> > }
> >>> >
> >>> > public void setMessage1(String message1) {
> >>> > this.message1 = message1;
> >>> > }
> >>> >}
> >>> >
> >>> >
> >>>
> >>
> >>
> >
>
-
Calling Bpel Process From a Jsp(Need a string output instead of XML object)
Hi
I am calling a BPEL process(Synchrononus) from a JSP page, Where Bpel process calls a java web service.The output from Bpel process is returned as an XML object. I need the output in a string format.Please let me know the steps to get the string output.
I also executed invokeCreditRatingService.jsp(from samples shipped with SOA Suite) that calls CreditRatingService bpel, but i was getting the following output where the rating value is printed as an XML object.
Output:-
BPELProcess CreditRatingService executed!
Credit Rating is oracle.xml.parser.v2.XMLElement@9511c8
Please let me know, what changes i need to make to get the string output.I followed all the steps given in "orabpel-Tutorial7-InvokingBPELProcesses.PDF" to execute credit rating jsp.
We are using SOA Suite 10.1.3.1.0 version.Do I need to make any changes to the code, to make it work with this version.
Thanks
Vandana.The call payload.get("payload") returns, as you have observed, an XMLElement. You can simply convert the XMLElement into an XML string by using a DOMSerializer implementation. The following code is very useful for this purpose:
http://javafaq.nu/java-example-code-432.html
Best,
Manfred
Maybe you are looking for
-
HELPDeleted user account with file vault on to free disk space, to no avail
My saga is a long one. Quick telling: I am the administrator on my eMac, and was locked out of my desktop last spring when the disk became overly full. File vault was turned on, and I was told by my computer repair folks that since the desktop was en
-
My Wishlist for WebOs Update 1.4.5 - ALL REASONABLE AND Somewhat EASY.
I just bought a Palm Pre and I love it far more than any windows or blackberry phone I ever had and far more than my old iphone. Its also, in my opinion, more of a draw for me than the android is. And I am sure that even though I am posting this, man
-
Can't get comcast mail after installing Lion
Hi All, I've read a lot about problems with Comcast emails after Lion has been installed but couldn't find anything that was just like my situation. I just installed Lion and created iCloud last night and this morning when I went to check my emails i
-
How do I add a mouseEvent to an area
does anyone know how i add a mouseEvent to an area? i want to test the response of the user to hit a Graphic on the screen but i dont know how to make the Graphic so that it can be hit. Simple enough problem just im a bit dim. lol THanks for any help
-
CPU Usage Maxing Out using Explorer
Ola guys, Ok, here's the prob. When I go to rename a video file XP states that the file is being used by another program (which it's not). This is followed by a system slowdown in which explorer is utilizing the CPU to 95-100%. This requires me t