I want to get the usr login name
hi
i have a jsp code in which i can get ip of any client in my LAN by the following func
request.getRemoteAddr()
but i want the login name of the users which they used to log in into windows.we hv windowsxp installed.and each one is provided wth a uname and password.is this possible in JSP??
If I understood correctly....
You may try the below script:
SET NOCOUNT ON
DECLARE @Tables table (DbName sysname,SchemaName sysname, TableName sysname, columnName sysname,TypeName sysname)
DECLARE @SQL nvarchar(4000)
SET @SQL='select ''?'' as DbName, s.name as SchemaName, t.name as TableName,c.name ,tp.name
from [?].sys.tables t
inner join [?].sys.schemas s on t.schema_id=s.schema_id
Inner join [?].sys.columns c on t.object_id = c.object_id
Inner Join [?].sys.types Tp on tp.system_type_id = c.system_type_id where t.object_id=' + cast(427916646 as varchar(100))
INSERT INTO @Tables (DbName, SchemaName, TableName,columnName,TypeName)
EXEC sp_msforeachdb @SQL
SET NOCOUNT OFF
SELECT * FROM @Tables ORDER BY DbName, SchemaName, TableName
Ref: http://gallery.technet.microsoft.com/Find-SchemaTableColumn-and-13506d80
Similar Messages
-
Want to get the Client Machine name from Oracle Forms
Hi,
I want to get the Client machine name from the Oracle Forms.
I have attached web_util.pll.
I use user_name := webutil_clientinfo.get_host_name;
but i am getting following error - WebUtil Error:WUC-015: Your form must contain the following Bean for this function to be available: oracle.forms.webutil.clientinfo.GetClientInfo.
Can any one help me in this!
Thanks & Regards,
Avinash Bhamare.
Pune.Hi,
I have written the code on when-button-pressed trigger of a push button -
DECLARE
user_name VARCHAR2(50);
BEGIN
user_name := client_win_api_environment.get_computer_name;
message('user_name is :'||user_name);
message('user_name is :'||user_name);
END;
And on clicking on this button i am getting error -
frm-40734:Internal Error:PL/SQL error occurred
Can any one help in this asap please!
Thanks & Regards,
Avinash. -
How can I get the workspace login name in a custom jsp?
I want to add a custom jsp in workspace, how can I pass the login name to this jsp?
DrClap wrote:
I think the OP wants to start up an application like MS Word and then operate it from a Java program.Doesn't The Monkey's Paw do that? What a second, according to Wikipedia:
[http://en.wikipedia.org/wiki/The_Monkey%27s_Paw]
<quote>
...the paw of a dead monkey is a talisman that grants its possessor three wishes, but the wishes come with an enormous price.
The moral of the story is contained in this description of the paw: "It had a spell put on it by an old fakir," said the sergeant-major, "a very holy man. He wanted to show that fate ruled people's lives, and that those who interfered with it did so to their sorrow."
</quote>
So I guess that a non-sequitor ... or is it? -
How to get the Output File Name as One of the Field Value From Payload
Hi All,
I want to get the Output file name as one of the Field value from payload.
Example:
Source XML
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_TEST xmlns:ns0="http://sample.com">
- <Header>
<NAME>Bopanna</NAME>
</Header>
</ns0:MT_TEST>
I want to get the Output file name as " Bopanna.xml"
Please suggest me on this.
Regards
BopannaHi,
There are couple of links already available for this. Just for info see the below details,
The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
// Description: Function to create dynamic Filename
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
With this udf map it with the MessageType as
(File Name field from Payload) > DynamicFileConfiguration>MTReceiver
Thanks
Swarup -
Getting the Source File name Info into Target Message
Hi all,
I want to get the Source file name Info into Target message of one of the fields.
i followed Michal BLOG /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Requirement :
1) I am able to get the Target file name as same as the source file name when i check the ASMA in Sender & Receiver Adapter , with out any UDF...............this thing is OK
2) I took One field extra in the target structure Like "FileName" & I mapped it Like
Constant(" " )--UDF-----FileName
I Checked the Option ASMA in Both Sender & Receiver Adapters
Here iam getting the Target File name as same as Source file name + Source File name Info in the Target Field " FileName".
I Dont want to get the Target File name as same as Source file name. I want like Out.xml as Target file name.
If i de-select the Option ASMA in Adapters means it is showing " null" value in the target field "FileName".
Please Provide the Solution for this
Regards
BopannaHi All,
Iam able to do this by checking the Option ASMA in only sender adapter itself
Regards
Bopanna -
How to get the Background job name
Hi,
I am executing a report in background and i want to get the background job name in the same report program. How can i get the same.
Regards,
Rajgopal Dara.Hi,
for this fm is used 148 times in our system, I made a check program and it works:
report zsbatchfm.
data: xv_jobcn type btcjobcnt.
data: xv_jobnm type btcjob.
data: xv_stepc type btcstepcnt.
call function 'GET_JOB_RUNTIME_INFO'
importing
* EVENTID =
* EVENTPARM =
* EXTERNAL_PROGRAM_ACTIVE =
jobcount = xv_jobcn
jobname = xv_jobnm
stepcount = xv_stepc
exceptions
no_runtime_info = 1
others = 2.
if sy-subrc <> 0.
write: /1 'SY-SUBRC = ', sy-subrc.
else.
write: /1 'JOBCOUNT = ', xv_jobcn.
write: /1 'JOBNAME = ', xv_jobnm.
write: /1 'STEPCOUNT = ', xv_stepc.
endif.
commit work.
In online mode you get a SUBRC = 1, in batch mode you get the informations (here: in SPOOL)
Please check it on your system!
Regards,
Klaus -
How to get the database owner name in T-SQL script
Hello, All!
I want to get the database ower name (in format DOMAIN\user) by through T-SQL script. But SELECT * FROM sys.databases returns only owner_sid.
Please show me a way - how to get the owner name, if you have only owner_sid. Or, may be, somebody know another way ?
Andy MishechkinSELECT suser_sname( owner_sid ), * FROM sys.databases
http://www.t-sql.ru -
Is it possible to get the main class name in a Thread context ?
for example, i want to get the main class name (the first entry of the program).
public class Test implements Runnable {
public Test() {}
public static void main(String[] args) {
new Thread(new Test()).start();
public void run() {
try {
//Want to get the main class name (not the current class name)
throw new Throwable();
} catch (Throwable e) {
e.printStackTrace();
}Acutally, i wanna make clear about the concept of a "Thread"
Is it true that ..
the main() method is a thread , once I create another thread in the program , both of (or all of them) will contains it owns stack exception information ?
My english is poor, please try to understand it. Thx -
Hi,
How to get the root folder name using sharepoint designer WF? i have a document library with root folders and subfolders. so i am trying to get the root specific root folder name attaching with email once user will
upload any files to subfolders within that root folder.
Thanks in advanced!Hi,
According to your description, you might want to get the root folder name in SharePoint Designer Workflow when there is file uploading.
The “Path” field of the current item holds the relative path of a file, as a workaround, you can retrieve the value of the “Path” as string, then split the string
value with a delimiter character of “/” to meet your requirement.
In SharePoint Designer 2010, there is no OOTB action to split the string. You can use the custom workflow actions below to achieve it.
Here is a link about the related actions I use in this scenario:
https://spdwfstringactions.codeplex.com/
Settings of workflow as below:
It works well in my environment:
Best regards
Patrick Liang
TechNet Community Support -
How to get the pull path name from a file upload window
Hello everyone!
I have encountered the following problem with the following JSP code:
<form method="post" action="filename.jsp">
Upload JAVA program:
<input type=file size=20 name="fname" accept="java">
<input type=submit value="go">
</form>
<%
String s = "";
if (request.getParameter("fname") != null)
s = request.getParameter("fname")
%>
The value of s is alway the filename. However I want to get the full path in addition to the filename, so that I can read the file. Does anyone know how to get the pull name of the file?
thanks a lot in advance,Dear Sir,
thanks a lot for your reply. Please let me explain what I intended to do: I want to upload a file from the local machine and then read the content of the file. Therefore I need to the fullpath of the filename like /var/local/file.java instead of file.java. The latter is what I got.
The problem I have with your code is that the function like "request.getServerScheme()" is not recognized. Maybe is it because I didn't install servelet package? I only installed javax package btw. Also my application runns on Tomcat server if this could give you some information. The error message I had is as follows:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
[javac] Compiling 1 source file
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:133: cannot resolve symbol
symbol : method getServerScheme ()
location: interface javax.servlet.http.HttpServletRequest
url = request.getServerScheme()
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:136: cannot resolve symbol
symbol : method getServerScheme ()
location: interface javax.servlet.http.HttpServletRequest
+ ((("http".equals(request.getServerScheme()) && request.getServerPort() != 80)
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:137: cannot resolve symbol
symbol : method getServerScheme ()
location: interface javax.servlet.http.HttpServletRequest
||("https".equals(request.getServerScheme()) && request.getServerPort() != 443))
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:139: cannot resolve symbol
symbol : method getServletConfig ()
location: interface javax.servlet.http.HttpServletRequest
+ "/" + request.getServletConfig().getServletName()
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:140: cannot resolve symbol
symbol : variable path
location: class org.apache.jsp.addExercise_jsp
+ "/" + path
^
5 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) -
How to get windows XP login name in SAP.
I want get windows XP login name in SAP, which funcion module can and How method can, thanks.
hi,
GUI_GET_DESKTOP_INFO Returns information about the end-users desktop
TH_USER_INFO Returns information about user
Try this FM, not sure if it return windown user name....give it a try.
Hope this helps, Do reward.
Edited by: Runal Singh on Mar 27, 2008 4:16 PM -
How to get the complete path name when uploading a file from servlet
Hi,
I write a servlet to upload a file from html page
<intput type=file name=fileupload>I am using
import org.apache.commons.fileupload.to upload file. i want to get the all fields in the form and file name and content of the file also.
It give the file name only
String filename= fileItem.getName();
o/p krish.jpgBut i want complete path naem like
d:/krishna/images/funny/krish.jpgI serach the API org.apache.commons.fileupload.*
But i did nt find the method to get it.
plz help me , which api or method to use here..Krishna_Rao_chintu wrote:
But i need path and have to do some calculations on it.No, you don't. If you have requirements which say you do then the requirements are wrong. You couldn't do anything useful with the path on the client system even if you could get it.
is there any alternatives in java
I need path and have to calculate MD5, Presumably you need to calculate MD5 on the contents of the file and not on the name of the file.
and convert the file to binary format.... etc oprations on itSorry, "convert a file to binary format" is basically meaningless.
but we can get the content of the file using
byte [] get()/ getString() methods
If i get content is there any performance degrades?
ie if the content is lengthy is it take more time?Take more time than what? Degrading performance from what? It's certainly true that it would be quicker to not upload the file, but that's a pointless comparison. If you have some other process to compare with, let us know what it would be. -
How to get the SQL file name in SQL*plus
hi all,
I have created two sql file at C drive as "c:\Createtable.sql" and "c:\Deletetable.sql"
afterwards i open
C:\>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 30 11:37:10 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: scott/tiger
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> @C:\Createtable.sql'
Table created.
SQL> @'C:\Deletetable.sql'
Table dropped.
SQL>My problem is to get the name of the file as "c:\createtable.sql" and "C:\Deletetable.sql" in sql*plus enviornment.
Thanks & Regards
SinghDear Damorgan,
>>your version number to three decimal places
My Oracle DB Version i have already stated in my previous post is 10.2.0.1.0
Actually my problem is to get the sql files name we run in sqlplus enviornment with @ symbol. like
i have created one sql file in c drive as
"C:\Createtable.sql"
afterwords i have connected to sqlplus as
sql> conn scott/tiger
sql>@c:\createtable.sql
Now i want some query to get the name of the file which is run.
In actual my problem is as
i have suppose 10 or more SQL files in some folder ( sql1.sql, sql2.sql, sql3.sql ....).
i created one file to call all the 10 sql files (main.sql)
i have also one track_table which will keep track that which sql file is runned.
I want some automated script which will insert the record in that track_table....... for that i need the name of sql file which is runned.
Hope this will help you.
Thanks & Regards
Singh -
In OSB file protocol, trying to get the archived file name in proxy service
Hi,
I have a requirement that i need to process the archived file of file protocol, with java callout in proxy service.
I am able to get the file name which is reading with 'tokenize($inbound/ctx:transport/ctx:request/tp:headers/file:fileName,"\\")[last()]' , but this file is getting archived to archive folder. I want to pass the archive file name as input to the Java callout.
Please let me know if this can achieve in OSB proxy or any other options.
Note : I am reading a xlsx file in the file protocolIf you're using pass by reference option in the file transport, I guess the archive filename can be obtained from $body/ctx:binary-content/@ref. Try it out.
-
Need help in multisim 11?
I want to get the transient response of RL circuit....i can get the increasing exponential graph in multisim 7 during simulation.....but i am getting a decreasing exponential curve(i.e,decay response) in multisim 11 when i do the same procedure as i did in multisim 7.....how can i get the initial or growth transient response for RL circuit in multisim 11 so that i can get increasing exponential curve....which satisfies time constant = L/RHello,
The process is the same for any circuit (in this case it is an RC circuit which you sent me). You can find the response on the voltage (which I think it's what you're looking for) at any point of the circuit, as well as any parameter really (R,V,I,L..etc).
Please refer to the image attached (an analysis on the voltage at an inductor and the wires connected to it).
The way to set it up (once you're in the transient analysis set up) is, select the Output tab, under Variables in circuit, you can select which parameters to take. V(1) and V(2) refer to the voltage in the circuit at Net 1/2 (or wire 1/2).
This differs from the voltage change within the capacitor/inductor/resistor. If you would like to see the voltage change of an inductor/capacitor/resistor/etc, you can select under the More options box, the button Add device/model parameter, which will take you to a window to select the device type, its name (in the circuit) and the parameter which you wish to analyse. Once you click on Simulate, you can select Cursor >> Show Cursors, to view information for y and x axis (like rise time, decay time, voltage difference...etc)
Hope this helps,
Miguel V
National Instruments
Attachments:
untitled.jpg 178 KB
Maybe you are looking for
-
Legacy integration between Exchange 2003 and Exchange 2010
Dear Team, we are using Microsoft Exchange 2003 & 2010 Server for Emails, now we have both servers are connected, we want to raise new Single incident request for doing this activity, we want disconnect 2003 server from 2010 server so accordingly nee
-
Search not finding word I see is there. Why?
I am searching for a word that I know (and found manually) is in a PDF file . Why can't Acrobat see it? The document is not created as a scanned image, and when I choose file save as a rich text format file, Microsoft Word finds the word I seek. Wha
-
To sort nw mps songs in alphabetic order to an exist
i have a music map called"Disco" with 6 G of Disco music,at he Touch and everyweek i download approx 5 new discosongs and bring them straight from my PC -through the usb cable and the Creative organizer into the map Disco at he Touch. So far so good.
-
DP cluster filed in transaction /SAPAPO/MAT1- Extras
Hello Experts, Can you please let me know if the field DP cluster is a standard field in the transaction /sapapo/mat1 under Extras tab. Meaning Transaction : /sapapo/mat1 Tab : Extras/Extra attributes field : DP cluster I
-
How can I make a link in a AccordionTab?
Hi, This is my website: www.student.tue.nl/V/b.a.t.moor As you can see the basis for my website is a Spry Accordion. The words with a large font-size are the first navigationlevel. The smaller words in the Tabs are the secondaire navigationlevel. Now