How to get current sesssion information using Webappscontext in servlet?
Hi,
I have an applet embedded in a self-service page (using OAHTMLWebBean). This applet sends information to a servlet, to query the database. I would like to use the session that was created when I logged into Oracle Applications as the session for the servlet.
I have tried using Webappscontext myCtx = new Webappscontext(System.getProperty("JTFDBCFILE")); in the servlet, but it always creates an ANONYMOUS user session.
Is there anyway I can access (or set) the Oracle Apps session in the servlet?
Any response would be appreciated.
regards
I figured out how to do it.
Try this if you have the same problem.
import oracle.apps.fnd.common.WebAppsContext;
import oracle.apps.fnd.common.WebRequestUtil;
// Use the HttpServletRequest and HttpServletResponse from the servlet to get the current webappscontext that the user is logged in with.
WebAppsContext ctx = WebRequestUtil.validateContext(request,response);
String respId = ctx.getRespId();
Similar Messages
-
How to get Remote System informations using java
Hi
Any one know how to get remote machine information, processor speed , mainmemory size, etc using java .
Thanks in adv.......Hi
Any one know how to get remote machine information,
processor speed , mainmemory size, etc using java .
Thanks in adv.......That's impossible.
Kaj -
How to get TaskId's Information using UWL in Webdynpro?
Hi,
I've to get TaskId's Information using UWL in WebDynpro
from SAP R/3 workflow.
For e.g. Name, Creation Date, Status etc.
I'm able to see property Value in WebDynpro but instead of Property Value I want same Information in WebDynpro without using any Functional Module from R/3
I'm giving the XML file structure which I'm using
I want to display information about the task Id which I'm giving in this configuration.
<?xml version="1.0" encoding="utf-8"?>
<! DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd' [
]>
<UWLConfiguration version="1.0">
<ItemTypes>
<ItemType name="uwl.task.webflow.TS91000129.UWL" connector="WebFlowConnector"
defaultView="Test" executionMode="default" defaultAction="launchWebdynpro">
<ItemTypeCriteria systemId="UWL" externalType="TS91000129" connector="WebFlowConnector"/>
<Actions>
<Action name="launchWebDynPro" handler="SAPWebDynproLauncher"
returnToDetailViewAllowed="yes" launchInNewWindow="yes" launchNewWindowFeatures="width=800,height=600,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no">
<Properties>
<Property name="WebDynproApplication" value="TEST"/>
<Property name="WebDynproDeployableObject" value="local/TEST1"/>
<Property name="isnewwindow" value="1"/>
<Property name="fruit" value="apple"/>
<Property name="DynamicParameter" value="wi_id=${item.externaId}"/>
<Property name="System" value="LocalSystem"/>
</Properties>
</Action>
</Actions>
</ItemType>
</ItemTypes>
</UWLConfiguration>
Then in WebDynpro application I'm using this code
String text = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("DynamicParameter");
If I give any other property name I'm able to get in WebDynpro application.
But I tried it for Task Id using Dynamic Parameter I was getting a Blank Value.
Please Help Me.Hi Niharika,
I think you have a typo in your code. You can retrieve the work item id by using [code]<Property name="DynamicParameter" value="wi_id=${item.<b>externalId</b>}" />[/code] instead of [code]<Property name="DynamicParameter" value="wi_id=${item.<b>externaId</b>}"/>[/code]
In addition, you can get values from the work item container by extracting them as custom attributes:
[code]<ItemType name="uwl.task.webflow.TS90000001.<system id>" connector="WebFlowConnector" ...>
<ItemTypeCriteria ... />
<CustomAttributes>
<CustomAttributeSource id="WEBFLOW_CONTAINER" objectIdHolder="<element name>" ...>
<Attribute name="<element name>" type="string" displayName="<element description>" />
</CustomAttributeSource>
</CustomAttributes>
<Actions>
<Action name="launchWebDynPro" handler="SAPWebDynproLauncher">
<Properties>
<Property name="DynamicParameter" value="<custom param>=${item.<element name>}" />
</Properties>
<Descriptions default="" />
</Action>
</Actions>
</ItemType>[/code]
Hope this helps,
Mikko -
How to get current navigation data using C#
Hi,
Please help me to get the current navigation data using c#.
In detail, In my sharepoint 2013 site, if i navigate to the Site Actions -> Settings ->Navigation -> Current Naviation and add some link it should show on my web part.
I am trying to create a new web part and this web part should show the content of Current Navigation (under settings).
Thanks in advance.Hi Lakshmanan,
Thanks for your reply.
I need more CSS customization so i am looking for C# code and i got the code. i am getting all the subsites but child nodes of subsites are showing zero even though the subsites having another subsites and pages.
I have tried the below scranario,
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigation.quicklaunch.aspx
Please help me on this. This is very urgent for me.
Thanks a ton. -
How to get Current Row information
Hi,
Actually i have an lov item and when user enters some value in the lov and just tabs out the process request method on the lov region is fired. Now the lov item is in a advance table and table has lets say 5 rows.
Now the user enters some invalid value in lov item of say 3 row and tabs out of the lov. As a result the lov popup gets enabled and process request at the lov region is called.
Now my requirement is in the process request of lov region i want to get hold of the current row of view object.
I have attached a controller at the lov region and i have put system.out.println at process request method.
The control is going there, now when i grab the VO and do getCurrentRow() it doesn't return anything.
Actually i know that we can capture the tab out event using pageContext.islovevent but it gets fired only for valid values in lov input. for invalid values process request is called at the lov region.
Kindly put some light on it.
Thanks,
Gaurav SharmaActually, when the user tabs out of the lov then if there's a valid value in lov then lovValidate event is fired and lov is not popped up. But for invalid values lovvalidate event is not getting fired but control goes to the process request of lov region.
My requirement is that i have two lovs in an advance table region . one for Country and one for State.
Now i want that as the user enters some value in State lov and tabs out then as the lov gets popped up then it should pick up the value in Country LOV and based on that Country it should display the results for the current row as there may be multiple rows on advance table.
Now there are two things, when user clicks on lov torch on state then lov prepare event is fired and then i am able to grab the the country for the current row using row reference.
But when user enters some invalid value in state lov and tabs out then no event is fired, rather than this process request is called at the lov region . Now how can i capture the value in Country lov of current row.
Thanks,
Gaurav
Edited by: [email protected] on May 21, 2009 4:59 AM -
How to get regional options information using java api
Hi all
I want to read what is properties like what is the currency symbol , what is the precession , what is the digit seperator and No of digits after the decimal .. such information i want to get using the java API
How can i get this information.
i tried with Locale API.
But it always giving me the default information only.
If i go and change those things in teh regional options it is not effecting
Any suggestions.
Thankin youhttp://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormatSymbols.html
-
How to get Current row of ViewObject in the DoDML methode
Hi all
I have two ViewObject EmplyesView and DeptView
How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesViewOK, we can play this game on and on...
I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
Timo -
Issue in getting current row value using getCurrent Value
Issue:When I call ththe method executeSearchVO from controller class
with Row row = personalActionSearchVO.first();
I am getting the corresponding value.
but my requirement is I have multiple record , If i press action on any of the record, I need to read SITName value for the particular record and need to pass it as parameter to other pager(i mean If i select any record, I need to get corresponding value in the attribute for the record.)
if i comment personalActionSearchVO.first(); i am getting null pointer exception.
Pl. helpme how to get current row instead of first row always.
AMIMPL Clause
public void executeSearchVO(String loginPersonId)
XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
personalActionSearchVO.initQuery(loginPersonId);
// Row row = personalActionSearchVO.first();
row = personalActionSearchVO.getFirstFilteredRow("action","1");
Row masterRow = row;
personalActionSearchVO.setCurrentRow(masterRow);
OARow Row1 = (OARow)personalActionSearchVO.getCurrentRow();
System.out.println("Org "+Row1.getAttribute("Organization"));
calling this method from controller clause
if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
System.out.println("Person Id "+ pageContext.getParameter("XXHRPersonId"));
Serializable methodParams[] = {pageContext.getEmployeeId()+""};
applicationModule.invokeMethod("executeSearchVO",methodParams);
need it urgently. pl. help
thanks
sivaTimo,
I am new to Jdevloper. I will explain the issue in detail.
Version: Oracle 9i Jdeveloper
I have a query page with multiple records. when I perform action , I need to pass 2 parameters from query screen to my actual page.
1 parameter is Login person Id,. Now the issue is with getting current value for 2nd paramenter. 2nd Parameter will be changed depends upon record i am choosing in my query page: column is : Information Name.
when I use getcurrentrow , I am getting null pointer exception.
My controller class when I click action button :
if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
Serializable methodParams[] = {pageContext.getEmployeeId()+""};
applicationModule.invokeMethod("executeSearchVO1",methodParams);
{color:#993300}
// Here I need to get InformationName value based on the record I am choosing{color}
HashMap hashMap = new HashMap(2);
hashMap.put("XXHRPersonId", pageContext.getParameter("XXHRPersonId"));
// hashMap.put("InformationName", methodParams);
pageContext.forwardImmediately(
"OA.jsp?page=/xxhr/oracle/apps/xxhr/selfservice/personalaction/webui/XXHRPersonalActionPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hashMap,
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO
my AMIMPL Clause :
I am just pasting whatever I have tried. Pl. suggest me If my code is wrong.
*{color:#993300}I need to get current row information value from the below method*
*{color}*
public void executeSearchVO1(String loginPersonId)
XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
personalActionSearchVO.initQuery(loginPersonId);
System.out.println("Row count "+personalActionSearchVO.getRowCount());
// Row row = personalActionSearchVO.first();
Row row = personalActionSearchVO.getCurrentRow();
System.out.println("Informaton Name "+row.getAttribute("InformationName");
In this , If i initialzie with Row row = personalActionSearchVO.first();I am able to get value for my column Information Name.
whereas, if I use directly Row row = personalActionSearchVO.getCurrentRow();, i am getting null pointer exception.
Pl. let me know how to get current row value for Information Name.
Looking for the reply at the earliest.
Thanks
siva -
How to get the directory name using vnode address
All,
I am writing a C program and need info on the following:
1. I have got the vnode address of the current directory. my question is "How to get the inode information (in particular, directory name) from the vnode address ?". What calls i need to use in order to get the info ?
2. Any helpful web sites containing the above information ?
Thanks in advancepackage x.y;
import java.io.File;
public class Test {
public static void main(String[] args) {
System.out.println(new File(Test.class.getResource("").getFile()).getAbsolutePath());
} -
I have a JVC video camera and it records the video to a .mod format (which Apple devices don't support). I figured out how to get them to iPhoto using iMovie but I want to be able to get the videos on my iPad 2 but it won't let it sync. Any help?
Thanks for that. Much more constructive than the last comment. It's only the restriction code I can't recall, not the access passcode. So I can currently access the device, just not age restricted content. Does that's make a difference? I also wondered if anyone knew how many attempts you get to try to get it right. Now tried 21 times and so far nothing bad has happened but I am concerned I'll eventually be completely locked out of the device. That doesn't seem in the spirit of things though. Surely it's foreseeable that a child could repeatedly try to guess the code so I can't see that it would be right to lock the device down completely in that circumstance, particularly if the access code is being typed in correctly every time.
Thanks -
How to get current rowindex of clicked object in cr2008 preview control
hi
i want to get selected raw data when user click on crystal report 2008 preview control.
i can achieve using following code for particular row no.
Dim repReport as new ReportDocument
repReport.Rows(RowIndex).Item(ColumnIndex)
how to get current rowindex ?
Thanks
Sanjiv SharmaOnly way I can think of is to use the rowset controller from the InProc RAS SDK. Here is a snippet of a sample code on how to:
//Load the report
if (clientDoc != null) {
//create metadata structure
RowsetMetaData rowSetMetaData = new RowsetMetaData(); rowSetMetaData.setDataFields
(clientDoc.getDataDefinition().getResultFields());
Fields fields = rowSetMetaData.getDataFields();
String colName,colTypeName;
int colType, len;
Field field;
HashMap colNames = new HashMap();
HashMap colTypes = new HashMap();
for (int i = 0; i < fields.size(); i++) {
field = (Field) fields.get(i);
colName =field.getDisplayName(FieldDisplayNameType.description, Locale
.ENGLISH);
colNames.put("COL"+i,colName);
colType = getColTypeFromVariant(field.getType().toVariantTypeString());
len=field.getLength();
//Placeholder
//add column metadata to data structure or XML
Object colValue;
int rowCount=0;
if (getMaxRows() != 0) {
RowsetCursor rowsetCursor = clientDoc.getRowsetController(). createCursor
(null, rowSetMetaData);
//Setting the batch size to make sure that you get back all the
//rows by setting the batch size.
clientDoc.getRowsetController().setRowsetBatchSize (rowsetCursor
.getRowset().getTotalRecordCount());
//Getting the Results back starting from the first row
RowsetCursor resultCursor = clientDoc.getRowsetController(). createCursor(null,
rowSetMetaData);
resultCursor.moveTo(0);
while (!resultCursor.isEOF()) {
for (int i = 0; i < fields.size(); i++) {
colName=(String)colNames.get("COL"+i);
colTypeName=(String)colTypes.get("COL"+i);
colValue=record.getValue(i);
//Placeholder
//add row data to data structure or XML
resultCursor.moveNext();
For more details, consult the Report Application Server .NET SDK Developer Guide
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
How to get RMAN catalog information from Target database?
Hi,
How to get RMAN catalog information from Target database because i don't know about catalog database? is it possible?
ThanksIf you run RMAN backups of a target database using a Catalog schema in another database, the target is not aware of the catalog.
The RMAN backup script would have the connection identifier for the Catalog.
Hemant K Chitale -
How to get current month and last month dynamically??
how to get current month and last month dynamically
like
month = getCurrentMonth();
lastmonth = getcurrentMonth() -1;
please help
thankshi :-)
/* depracated but can be still useful */
java.util.Date dtCurrent = new java.util.Date();
int month = dtCurrent.getMonth();
int lastmonth = dtCurrent.getMonth() - 1;
System.out.println("* " + month);
System.out.println("* " + lastmonth);
/* better to use this one */
Calendar cal = new GregorianCalendar();
int imonth = cal.get(Calendar.MONTH);
int ilastmonth = cal.get(Calendar.MONTH) - 1;
System.out.println("*** " + imonth);
System.out.println("*** " + ilastmonth);
regards, -
How to get current assigned participant id?
Hi mates,
This might be a basic questions, but useful for me :)
How to get current assigned participant id from screenflow? Or How to pass it as an argument from interactive activity?
Below is what I tried.
Participant.id or Instance.participant.id - returns login user id
ThanksHi,
Please correct me if I understood wrong.
You want to know whether an instance is assigned or not and if assigned then you want to fetch the assigned participant id.
If this is your requirement then please find the code below and make the necessary changes into it.
Write the following code in screen flow automatic activity but before that you need to pass the instanceid as argument to the screen flow.
In the process as well as screen flow layer make an instance variable instanceid as Int.
Then make an argument variable instanceidArg as Int in both the screenflow and process layer and map accordingly so that it will take the instanceid from process layer to the screen flow layer.
Assign instanceid = id.number; in process layer automatic activity but before the global interactive activity where you have maped the screen flow.
Write the following code in screen flow automatic activity.
logMessage("============= instanceid ==============" + instanceid); //instanceid is the id of the instance that you have passed from process layer.
ProcessService ps;
InstanceFilter instF = InstanceFilter();
ps.connectTo(url : Fuego.Server.directoryURL, user : "<userid>", password : "<password>"); //In studio the userid and password will be same
logMessage("Connected");
instF.create(processService : ps);
instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
//<ProessId Name> is the id of the process where you want to know the assighed participant id
instF.addAttributeTo(variable : VarDefinition.processid, comparator : Comparison.CONTAINS, value : "/" + "<ProessId>");
instF.addAttributeTo(variable : VarDefinition.INSTANCE_NUMBER, comparator : Comparison.IS, value : Int(instanceid));
Fuego.Papi.Instance[] instances = getInstancesByFilter(ps, filter : instF);
foreach (instance in instances) {
logMessage("Assigned ?: " + instance.participantId.empty);
logMessage("instance.participantId: " + instance.participantId);
ps.disconnectFrom();
Bibhu -
How to get current date for posting date
hi,
how to get current date for posting date ? any sample code ?
ThanksHi......
Use
Select getdate()
for current date.......
Regards,
Rahul
Maybe you are looking for
-
I installed the dowmload asst -now where is the program i selected for trial elements10 it says to
select a program offered css-5 orcreative suite NO other options i already selected elements 10 and went to download it but had to install asst 1st now I am stuck with this assistant for WHAT?
-
Hi can you helped how to locate my ipad 3
hi can you helped me how to locate may ipad?because they get it inside our house,and what should the best thing that i can do to find it again?..thank you.
-
Scaling percentage images inside InDesign
hi, got an image with a size of 544 x 408 px meassured in photoshop. Safe it as layered .psd at 264dpi. Bring it to InDesign where I create articles for a 1024 x 768 px folio. At 100% the image meassures 101.489 x 96.233 px. Think it's a resolution i
-
OMW hangs on mapping some databases
Hello: I am migrating about 20 databases from MS SQL 6.5 to Oracle 8.0.5. 15 of the databased migrate flawlessly, but 5 of them hang on OMW during the mapping phase. I have to "End Task" the program to get it to stop. I have played with the source mo
-
I created and distributed my form. How do I see and print the returned form?
I need to know how I can print the returned form? Thanks