Sending a variable when a link is pressed

I am making a small archiving web site. For example you want to retreive all the documents with the keyword test, it will print you the document's path concerned by this keyword. So if I have a list of path as links, I want when I click on one of them to send the path to another jsp file (named download_file.jsp).
To print the list of path this is what i'm doing
while(rs.next()){
     doc_path = rs.getString("arch_path1");
%>
<tr>
<td width="195" align="left"><u>
          <%
               out.println(doc_path);
          %>
</u></td>
</tr>
<%
          }rs.close();
I want to use session.setAttribute( "DocPath", doc_path ) just for the document clicked and not all of them or the last one. Can someone help me?

This is all my page, the method searchdoc.SearchDoc in the jsp file is a method ththat finds all the documents concerned by the keyword given. The page works perfectly well except for the parameter given to each link
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="docinfo" scope="request" class="itrade.SendDocInfo" />
<jsp:setProperty name="docinfo" property="*"/>
<jsp:useBean id="searchdoc" scope="request" class="itrade.SearchDocKey" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Archive - Results by Keyword</title>
<link rel="stylesheet" href="emx_nav_left.css" type="text/css">
<script type="text/javascript">
<!--
var time = 3000;
var numofitems = 7;
//menu constructor
function menu(allitems,thisitem,startstate){
callname= "gl"+thisitem;
divname="subglobal"+thisitem;
this.numberofmenuitems = 7;
this.caller = document.getElementById(callname);
this.thediv = document.getElementById(divname);
this.thediv.style.visibility = startstate;
//menu methods
function ehandler(event,theobj){
for (var i=1; i<= theobj.numberofmenuitems; i++){
var shutdiv =eval( "menuitem"+i+".thediv");
shutdiv.style.visibility="hidden";
theobj.thediv.style.visibility="visible";
function closesubnav(event){
if ((event.clientY <48)||(event.clientY > 107)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+i+'.thediv');
shutdiv.style.visibility='hidden';
// -->
</script>
<style type="text/css">
<!--
.style1 {
     font-size: large;
     font-weight: bold;
.style2 {
     font-size: 14px;
     color: #0000FF;
.style3 {font-size: small;
           font-family:Arial, Helvetica, sans-serif;}
.style4 {font-weight: bold}
-->
</style>
</head>
<body onmousemove="closesubnav(event);">
<div class="skipLinks">skip to: page content | links on this page | site navigation | footer (site information) </div>
<div id="masthead">
<h1 id="siteName">ARCHIVES</h1>
<div id="globalNav">
<img alt="" src="gblnav_left.gif" height="32" width="4" id="gnl"> <img alt="" src="glbnav_right.gif" height="32" width="4" id="gnr">
<div id="globalLink">
Documents Management
     Search
</div>
<!--end globalLinks-->
</div>
<!-- end globalNav -->
<div id="subglobal1" class="subglobalNav">
Insert Documents | Edit Documents | Delete Documents
</div>
<div id="subglobal2" class="subglobalNav">
By Date-Author | By Keyword-Type-Author |
By Keyword </div>
</div>
<!-- end masthead -->
<div id="pagecell1">
<!--pagecell1-->
<img alt="" src="tl_curve_white.gif" height="6" width="6" id="tl"> <img alt="" src="tr_curve_white.gif" height="6" width="6" id="tr">
<div id="pageName">
<h2>RESULTS BY KEYWORD</h2>
</div>
<div id="pageNav">
<div id="sectionLinks">
Login Main Menu Section
Link Section Link Section Link Section
Link
</div>
</div>
<div id="content">
<div class="feature">
     <table width="990" border="1" bordercolor="#FFFFFF">
<%
     ResultSet rs;
     int doc_num;
     String keyword, temp, doc_title, doc_size, doc_path, doc_creation_date, type_label, author_name;
     keyword = docinfo.getKeyword();
     if(keyword != null){
%>
     <tr class="style3 style4">
<td width="90" align="center">Doc Number</td>
<td width="150" align="left">Doc Title</td>
<td width="120" align="left">Doc Author</td>
<td width="81" align="center">Doc Size</td>
<td width="81" align="center">Doc Type</td>
<td width="123" align="left">Doc Creation Date</td>
<td width="195" align="left">Doc Path</td>
</tr>
<%
          temp = "%";
          keyword = temp.concat(keyword);
          keyword = keyword.concat(temp);
          rs = searchdoc.SearchDoc(keyword);
          while(rs.next()){
                    doc_num = rs.getInt("arch_code");
                    doc_title = rs.getString("arch_title");
                    doc_size = rs.getString("arch_size");
                    doc_path = rs.getString("arch_path1");
                    doc_creation_date = rs.getString("arch_creation_date");
                    type_label = rs.getString("type_label");
                    author_name = rs.getString("emp_complete_name");
%>
     <tr class="style3">
<td width="90" align="center"><% out.println(doc_num); %></td>
<td width="150" align="left"><% out.println(doc_title); %></td>
<td width="120" align="left"><% out.println(author_name); %></td>
<td width="81" align="center"><% out.println(doc_size); %></td>
<td width="81" align="center"><% out.println(type_label); %></td>
<td width="123" align="left"><% out.println(doc_creation_date); %></td>
<td width="195" align="left"><a href="download_file.jsp?file=<%=doc_path%>"><u>
                                             <% out.println(doc_path); %></u></a></td>
</tr>
<%
          rs.close();
     }else{
%>
     <tr class="style3 style4">
          <td class="style3 style4">
               You didn't insert any keyword
          </td>
     </tr>
<%          
%>
     </table>
     </div>
</div>
<div id="siteInfo"> &copy;2005
iTrade
</div>
</div>
<!--end pagecell1-->
<br>
<script type="text/javascript">
<!--
var menuitem1 = new menu(7,1,"hidden");
               var menuitem2 = new menu(7,2,"hidden");
               var menuitem3 = new menu(7,3,"hidden");
               var menuitem4 = new menu(7,4,"hidden");
               var menuitem5 = new menu(7,5,"hidden");
               var menuitem6 = new menu(7,6,"hidden");
               var menuitem7 = new menu(7,7,"hidden");
// -->
</script>
</body>
</html>

Similar Messages

  • How to Open BPM worklist when a link is pressed in custom ADF application

    Hi Guru's
    I have a requirement where i have to open BPM worklist app when a user clicks on a custom ADF application link.
    Scenario
    1) In custom ADF application we have a link.
    2) user selects the link and we have to open the users BPM worklistapp page.
    Can you please let me know if this is possible or not? If so can you please help me out
    Regards,
    Ram

    Bill,
    Can you please let me know the steps or documentation that helps me out in achieving this?
    Regards,
    Raju
    Edited by: user080811 on Apr 18, 2013 12:12 PM

  • Popup is closed when command link is pressed even after validation exceptio

    Hi Techies,
    I am using JDeveloper 11.1.1.4. I have a sample .jspx page which has a table, a command link and a popup. When the user clicks the command link, the popup gets shown.
    The popup contains af:panelWindow as a direct child. panel window as a panel group layout which contains input box and a command link. The input text has a validation. Now my problem is even though the validation fails If i click the command link in the popup, the popup gets disappeared. Thankfully it is not updated in the database (Infact, the action and actionlisteners themselves are not getting called since the validation fails. Hope this is the expected behaviour) But my question is: could somebody tell my how to prevent the popup from hiding when i click the command link in popup once after the validation fails?
    Regards,
    V. Praveen

    Hi Praveen,
    Can you try with partialSubmit for the command link?
    Also use required partialTriggers as you want to refresh. Do not refresh the popup in your bean code.
    -Prasad

  • Cisco Prime Infrastructure 2.1 not send email alert when link down

    Hello everyone
     I use PI to monitor 1 switch and 1 firewall . When a link up/down on switch , PI immediately sends an email alert .
    But when a link up/down on FW , PI not send any email alert . PI knows link up/down on a FW is a critical alarm ( it's show up on "Alarm Browser") , but not send email.
    I enable all SNMP trap on FW , i tested that event on SolarWinds and it immediately sends an email alert . So there is no problem about FW config

    Causes of Errdisable
    This feature was first implemented to handle special collision situations in which the switch detected excessive or late collisions on a port. Excessive collisions occur when a frame is dropped because the switch encounters 16 collisions in a row. Late collisions occur after every device on the wire should have recognized that the wire was in use. Possible causes of these types of errors include:
    A cable that is out of specification (either too long, the wrong type, or defective)
    A bad network interface card (NIC) card (with physical problems or driver problems)
    A port duplex misconfiguration
    A port duplex misconfiguration is a common cause of the errors because of failures to negotiate the speed and duplex properly between two directly connected devices (for example, a NIC that connects to a switch). Only half-duplex connections should ever have collisions in a LAN. Because of the carrier sense multiple access (CSMA) nature of Ethernet, collisions are normal for half duplex, as long as the collisions do not exceed a small percentage of traffic.
    There are various reasons for the interface to go into errdisable. The reason can be:
    Duplex mismatch
    Port channel misconfiguration
    BPDU guard violation
    UniDirectional Link Detection (UDLD) condition
    Late-collision detection
    Link-flap detection
    Security violation
    Port Aggregation Protocol (PAgP) flap
    Layer 2 Tunneling Protocol (L2TP) guard
    DHCP snooping rate-limit
    Incorrect GBIC / Small Form-Factor Pluggable (SFP) module or cable
    Address Resolution Protocol (ARP) inspection
    Inline power
    Note: Error-disable detection is enabled for all of these reasons by default. In order to disable error-disable detection, use the no errdisable detect cause command. The show errdisable detect command displays the error-disable detection status.

  • Error when Setting value to Bind variable in View Link used in HGrid

    Hi
    I have requirement to pass profile id as bind variable, I have created a VO based on below Query.
    select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
    from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
    where a.child_id = b.child_id(+)
    and b.profile_id(+) = :1
    View Link Query that is being generated is
    SELECT * FROM (select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
    from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
    where a.child_id = b.child_id(+)
    and b.profile_id(+) = :1) QRSLT WHERE PARENT_ID = :Bind_ChildId
    it Shows Errors as
    ## Detail 0 ##
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could anyone tell what could be the wrong. Do we need to set bind variable in view link Explicitly? or any other alternative.
    Its very Urgent.
    Regards
    Vimal

    Hi,
    I have faced similar problem some time ago. I could not find any solution except removing bind parameters in where clause. I tried to change binding style but it also didn't work. I think the problem is caused by view link's where clause.

  • How to send a email with a link

    Hi All,
                I have a scenario where I have to send an email to a person informing him about the workitem
                Now this user is not a SAP user so i have to send a link to him of a web page where he will execute
                the work item.Please advice about how to send the email with a link.
    Thanks in Advance,
    Saket.

    Hi,
    If you are using a Workflow, in the send mail step type, simply write the e-mail link and press enter.
    when the user sees the same in the outlook, he will get them as a link but this does not happens when the mail is seen in the SAp INBOX.
    if you are using the FM, give the document type as 'HTM', to send mail.
    This will work for you.
    Let me know if u face any issues
    Regards,
    Kanika

  • Problems with encoding when creating link in mail

    A user inputs some text in a field at a webpage.
    From this I build a mail that has a link that looks like this:
    http://www.domain.com/a/controller/action/?name=[INPUT VALUE]
    My problem is that when I try to get the value in the receiving action, using params.name, it does not so good. The real problem is about odd characters like our swedish �,�,� for example.
    What I have tried to do when building the link is to use URLEncoder.encode([INPUT VALUE], 'UTF-8') and then using URLDecoder.decode(params.name, 'UTF-8') but it does not work at all. Is there any other way I should attack this problem?

    def name = "Mattias Sands�ter";
    def email = params.email;
    name = URLEncoder.encode(name, 'UTF-8');
    println(name)
    def message = http://domain.com/a/b/download/?name=" + name
    MailSender.sendMail(email, "Subject", message);{code}
    {code}def download = {
    println(params.name)
    println("download after decode" + URLDecoder.decode(params.name, 'UTF-8')){code}
    The first println looks fine, it says Mattias+Sands%C3%A4er
    The second println looks horrible, Mattias Sands��ter
    The third looks the same.
    Then I send this to my gsp(jsp) page and wants to put this in a standard textfield, but it of course looks like Mattias Sands��ter there too.
    This is on a linux-server, on my local computer, everything works as expected.
    Whatever it its, something happens to the name-variable when it is clicked on in the e-mail. It looks good in the e-mail, get pasted in the address-field in the browser correctly, but when retreiving the variable with params.name it is screwed
    Edited by: sandsater on Jul 8, 2008 8:44 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?

    using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?

    Thanks for your swift response.
    That sounds like a good solution, but the code I have on frame 2 is this
    timer = 0;
    countup = function(){
    timer++;
    countupInterval = setInterval(countup,100);
    If I added the same actionscript to frame 3 which has a dynamic textbox with a variable timer attached wouldn't it just put the timer back to 0? What I want is the last known value that was given when it was in frame 2.
    I am thinking of temple run here, I am trying to caculate the total distance(set in the timer variable) from the previous try.
    Hope this makes sense.
    Chazwick

  • Blank error message with ? appears and PDF does not open in Browser (IE11) when clicking link to open pdf. PC - IE11 Acrobat 9.0

    Blank error message with ? appears and PDF does not open in Browser (IE11) when clicking link to open pdf. PC - IE11 Acrobat 9.0
    Cannot access in browser PDF files unless blank box is closed and then website address is clicked on again in browser address bar and page reloaded.
    Uninstalled Acrobat 9, reinstalled, still same problem.
    Help please!

    Yes I can it only happens in the browser..
    I reinstalled Windows on my machine and started over a couple of weeks ago.
    When my desktop started up I didn’t have Acrobat installed and clicked on a pdf file and the open with xxx dialogue box came open.
    I chose a different program as Acrobat wasn’t installed yet so it associated pdf files with another program.
    Later Installed Acrobat and couldn’t associate the pdf file with acrobat so I went into Folder Options and manually associated PDF files with Acrobat.
    Ever since then I get the error when something is downloaded and opened in the browser.
    Works fine everywhere else and when I cancel the blank error, highlight the web address and press enter to reload it works 90% of the time.
    Not sure what to do..

  • Send Email Notification when comment blog in Sharepoint 2010

    Hi,
    Anyone can help me, when i comment on the blog, then send email directly ?. According to this link http://www.sitefinity.com/devnet/forums/sitefinity-3-x/general-discussions/blog-comment-notification.aspx 
    Its make some development or modifications, beside that is there any other way to do that without making modifications? probably just setting up in sharepoint admin?
    Please advice,
    Regards

    Hi
    I just found out that the the blog comments are stored in a list
    htp://yoursite/Blog/Lists/Comments/AllComments.aspx
    So you can write a workflow to send an email when a new item is created in this list.

  • How can I get a small window to open when a link is clicked (AS2)

    Hi i,m developing a HTML site and used one animated flash button(AS2) I want a small sized window to open when a user clicks on a button.
    The window will contain information that i want to display.It dosnt require a normal 800x600 window to open. I just want a 1/4 size of 800x600 etc. Is this possible and if so how.
    I havnt done this before
    Thanks
    Manoj

    HELLO NED,
    I WAS RECEIVING MANY MAILS FROM YOU, BUT I DON'T UNDERSTAND WHY DOESN'T RELATED WITH MY PETITION, I SEND
    TO YOU AGAIN MY QUESTION, AND IF YOU CAN HELP ME I APPRECIATED VERY MUCH LET ME KNOW.
    THIS IS MY QUESTION....."ABOUT DATAGRID AS3
    Hello Ned, I appreciate very much your soon answer, I believe you have understand me, but how can I do that? could you give some help? This is part of the code and this is the function that I use
    var url: String = "xmls/rests.xml";
    var req:URLRequest = new URLRequest(url);
    var myLoader:URLLoader = new URLLoader();
    myLoader.addEventListener(Event.COMPLETE, completeHandler);
    myLoader.load(req);
    function completHandler(event:Event):void {
           var myLoader:URLLoader = event.currentTarget as URLLoader;
           var xmlDP:XML = new XML (myLoader.data);
           XML.ignoreWhitespace = true;
           dp = new DataProvider(xmlDP);
           dp = sortOn("name", Array.CASEINSENSITIVE);
           dDg.dataProvider = dp;
           aDg.addEventListener(Event.CHANGE, changeHandler);
           function changeHandler(event:Event): void {
                var thisItem:Object = eve.target.selectedItem;
                descripTa.text = thisItem.description;
                aUI.source = (thisItem.image);
                preloader_mc.visible = true;
    My intention is that when a button from a main (swf) loads the swf it displayed the first selected item with a image (UILoader) and the description (TextArea)
    Thanks in advance Ned
    Joselyn             .................."
    THANKS AGAIN NED
    REGARDS
    JOSELYN
    Date: Thu, 13 Oct 2011 07:49:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I get a small window to open when a link is clicked (AS2)
    Re: How can I get a small window to open when a link is clicked (AS2) created by Ned Murphy in Flash Pro - General - View the full discussion
    Look at the Methods section and choose whichever suits your needs, the first one listed does not.
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3969302#3969302
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3969302#3969302. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Flash Pro - General by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Send a Notification When ever a new entry is created in Z-Table

    Dear All,
    I have got a requirement to send a notification  when ever a new entry is created in the Z-Table which contains some important information.
    I have searched in SCN and found few links in which it say to create an Event '05' and in that call FM SWE_EVENT_CREATE, but my query is  Do I need to create a new BO? 
    In the example which I found in other sites where its mentioned like
        W_OBJTYPE = 'YH355_BO'.
        W_OBJKEY  = ZCUST_INFO-CUSTNO.
        W_EVENT   = 'SENDEMAIL'.
    here OBJECTTYPE is a new BO or what.
    Kindly help me in solving my requirement as am new to Workflow concepts.

    If you want to send the mail call the function module "SO_NEW_DOCUMENT_ATT_SEND_API1"  in table maintenance event '05'.
    Regards
    Vinod

  • How do I plot two variables when neither are time?

    I know how to plot a variable against time, but how do I plot two variables when neither one of them are time against each other. For example if I want to plot say force against distance what is the best approach to use?
    Thank you.
    Solved!
    Go to Solution.

    Use an XY graph. Use Context Help to see the expected datatype, and refer to examples. Consider the following, remembering to rename the Scale Labels and Plot Name:
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • How to send 5th variable to maessage dynamically

    how to send 5th variable to maessage dynamically..
    we have only 4 like msgv1,msgv2,msgv3,msgv4.......
    how to send 5th variable
    thanks in advssssss

    hi,
    as per my knowledge it is not possible because Message texts in table T100 can contain up to four ampersand characters (&) as placeholders. You can replace these at runtime using the WITH addition in the MESSAGE statement:
    MESSAGE ... WITH f1 ... f4.
    The contents of fields f1 ... f4 are then inserted sequentially into the message text in place of the placeholders.
    for more information on messages follow this link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaaaf35c111d1829f0000e829fbfe/content.htm
    regards,
    Ashok reddy

  • How to stop sending Auto Reply when I am only BCC'ed

    Hi, I am working as software developer. I am in charge of the maintenance tasks of some of our company's sites. Most of those sites are sending email notifications once a transaction/ticket is created. I have put my email address to the BCC in those email
    notifications so whenever there is an issue i have a copy of the email notification. My question is i will be out of office for some days and i need to setup an auto reply, how can i setup a rule which the OoO is being sent only when I am in the "TO"
    and "CC"? I don't need to send an OoO when i am only BCC'ed. Thanks

    In this case i won't enable Automatic Replies (Out of Office) as it will respond even when our name is in To or Cc or Bcc
    I have created a rule where it will auto reply only when my name is in To or Cc
    In Outlook, click on Tools | Rules and Alerts
    Click New Rule
    Select the radio option, Start from a Blank Rule 
    Ensure the option, 'Check messages when they arrive' and click NEXT
    Select the option, 'where my name is in the To or Cc box'
    Click NEXT
    Select the option, 'have server reply using a specific message'
    In the bottom section of the Rule wizard, "Step 2: Edit the rule description", click on the link 'a specific message'
    An "untitled message' window opens, enter an appropriate subject, for example, Automatic Reply: Out Of Office, and enter appropriate text in the message body type
    Thanks for the email. I am currently Out of Office. I don’t have access to my emails.
    Click 'Save and Close' button
    Click 'NEXT'
    Click 'NEXT'
    Enter a name for the Rule in the field 'Step 1: Specify a name for this rule'
    Click 'Finish'
    Sender who sends email when you enable the rule will get a response like the below:
    Anil Kumar (MCITP)

Maybe you are looking for

  • How to insert a new line in MC1H(maintaining formula)

    How to insert a new line in MC1H(maintaining formula) Can anybody help me with  the steps

  • Slow broadband speed - connection dropping - bande...

    Hi, We've always had a problem with our connection dropping at least once a day since we first moved house but now our speed has been significantly reduced. From what I've read of other customer experiences, it sounds like the multiple loss of connec

  • Changing brush size in camera raw?

    I'm having trouble with changing brush size in the camera raw brush tools. What I use for input is a scandinavian keyboard and I have to type in alt gr+8 and alt gr+9 instead of brackets. This works great in Photoshop,  but sadly not in Camera Raw. I

  • What is happening to dotmac?

    Am I the only one encountering these dotmac problems? 1. I can't publish since yesterday (always "publish error"). Though it's publish error, I can still see my new post. Don't know why. 2. I can't login to dotmac, the mobileme page appears everytime

  • Session ID managment ?

    hi How to container(like tomcat ) manage session id in client side ? with cookie or URL rewriting .