Help me in passing parameter

<%@ page import="java.net.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<html>
<head>
     <title>Untitled</title>
</head>
<body>
<%
     Vector mail = new Vector();
     try{
     Class.forName("com.mysql.jdbc.Driver").newInstance();
     catch (Exception E) {
     out.println("Unable to load driver.");
     E.printStackTrace();
     try{
          Connection C = DriverManager.getConnection("jdbc:mysql://localhost/attendance","root","");
%>
<div align="center"><font size="+6">Student BarList</font><br>
In this page will display out the student that attendance NOT MORE THAN 70%. The Student Below is NOT ALLOW to take exam for the relevant subject.
The student whoever not satisfy with the bar can negotiate with the lecturer of the relevant subject.<p/>
The student below will be bar from the relevent subject:
<%Statement S = C.createStatement();
               ResultSet rs = S.executeQuery("SELECT * FROM bar");
               ResultSetMetaData rsStruc = rs.getMetaData();
out.println("<table bgcolor=red cellpadding=10 cellspacing=1 size=70>");
               out.println("<tr bgcolor=red>");
               int colCount = rsStruc.getColumnCount();
               String colName = "";
               for(int i=1;i <= colCount; i++){
               colName = rsStruc.getColumnName(i) ;
               out.println("<td><B><font color=white>" + colName + "</font></b></td>\n");
               out.println("</tr>");
               while (rs.next()) {
               String email=rs.getString("email");
               mail.addElement(email);
               out.println("<tr bgcolor=ffffff>");
               for(int i=1;i <= colCount; i++){
               colName = rsStruc.getColumnName(i) ;
               String fld = rs.getString(colName);
                    out.println("<td>" + fld + "</td>");
               out.println("</tr>");
               out.println("</table>");
               rs.close();
               C.close();}
catch (Exception E) {
     out.println("SQLException: " + E.getMessage());
     for(int i=0; i< mail.size(); i++){
String add= mail.elementAt(i)+",";
out.println(add);
     %>
<form action="simplemail.jsp" method="post">
<input type="text" name="address" value="<%=add%>">
<input type="submit" name="send" value="Send Mail">
</body>
</html>
what problem with my page i want to read the vector data then set it inside the variable (e.g [email protected],[email protected]) then put it into the textbox and passing parameter to next page.. how i gotta solve this problem?

i have to use the hidden input html to send the vector to the next page but found out the problem "Type mismatch: cannot convert from String to Vector"
<%@ page import="java.net.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<%
Vector mail = new Vector();
try{
Class.forName("com.mysql.jdbc.Driver");
catch (Exception E) {
out.println("Unable to load driver.");
E.printStackTrace();
try{
Connection C = DriverManager.getConnection("jdbc:mysql://localhost/attendance","root","");
%>
<div align="center"><font size="+6">Student BarList</font><br>
In this page will display out the student that attendance NOT MORE THAN 70%. The Student Below is NOT ALLOW to take exam for the relevant subject.
The student whoever not satisfy with the bar can negotiate with the lecturer of the relevant subject.<p/>
The student below will be bar from the relevent subject:<br/>
<%
Statement S = C.createStatement();
ResultSet rs = S.executeQuery("SELECT * FROM bar");
ResultSetMetaData rsStruc = rs.getMetaData();
out.println("<table bgcolor=red cellpadding=10 cellspacing=1 size=70>");
out.println("<tr bgcolor=red>");
int colCount = rsStruc.getColumnCount();
String colName = "";
for(int i=1;i <= colCount; i++){
colName = rsStruc.getColumnName(i) ;
out.println("<td><B><font color=white>" + colName + "</font></b></td>\n");
out.println("</tr>");
while (rs.next()) {
String email=rs.getString("email");
mail.addElement(email);
out.println("<tr bgcolor='ffffff'>");
for(int i=1;i <= colCount; i++){
colName = rsStruc.getColumnName(i) ;
String fld = rs.getString(colName);
out.println("<td>" + fld + "</td>");
out.println("</tr>");
out.println("</table>");
rs.close();
C.close();}
catch (Exception E) {
out.println("SQLException: " + E.getMessage());
//String add = "";
//for(int i=0; i< mail.size(); i++){
//add = mail.elementAt(i)+",";
//out.println(add);
%>
<form action="simplemail.jsp" method="post">
<input type="hidden" name="address" value="<%=mail%>">
<input type="submit" name="send" value="Send Mail">
</body>
</html>the vector should be pass to this page:
<%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
<%
Vector to2= new Vector();
to2=request.getParameter("address");
//String subject=request.getParameter("subject");
//String message2=request.getParameter("message");
for(int i=0; i< to2.size(); i++)
     String add = (String)to2.elementAt(i);
     System.out.println(add);
Properties props = new Properties();
  props.put("localhost:25","localhost:25");
  Session s = Session.getInstance(props,null);
  MimeMessage message = new MimeMessage(s);
  InternetAddress from = new InternetAddress("albert");
  message.setFrom(from);
  InternetAddress to = new InternetAddress(add);
  message.addRecipient(Message.RecipientType.TO, to);
  //message.setSubject(subject);
  //message.setText(message2);
message.setSubject("Bar exam acknowledgement");
message.setText("You been bar from the exam, please check on the student attendance online for more information");
  Transport.send(message);
%>
<html>
<p align="center">A Message has been sent.<br>Check your inbox.</p>
<p align="center"><a href="mail.html">Click here to send another!</a><br>
</p>
</html>please help me!!! i stuck in this oledi

Similar Messages

  • Help Needed in passing parameter to cryst report

    Hello everyone, I am trying to create a report for a single record and as such am trying to pass parameters to a crystal report but I am not sure exactly how to do this. This is my own method that I am employeeing. I do not want to create a data table and put all the info I need in there and then base a report off of it. I do not want to deal with loops and arrays right now. I just want to pass for example parameter JuvenileID = 1 to my crystal report, then create a command under the database expert and set the parameter for my command to the parameter I passed my crystal report. How would I go about in doing this? I am using VS 2010 C#. This is a windows application. I have a dataentry form that is already populated with the info needed for the report. I just need to pass all the controls.text values to the report and populate it that way.

    I'm not sure if I fully understand the issue, but since you have all the data you need in a data entry form that is already populated, why don't you simple create an ADO .NET Dataset and pass that to the report? Much easier to implement, faster execution with the small amount of data you have and less code.
    Dataset sample app is here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    More info on datasets is here:
    [1511438 - How to use datasets to pass data to crystal reports|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533313331333433333338%7D.do].
    - Ludek

  • Pls. help me   -   passed parameter

    I have a procedure "PROC_XXX" that it has one cursor inside. "CUR_XXX"
    I would like to pass parameter that have statement from my trigger etc. "When-button-pressed" to my cursor "CUR_XXX" in procedure "PROC_XXX".
    < v_stmt := 'and v_empno = ...........' >.
    How can i pass ' v_stmt ' to "PROC_XXX " in my DB.
    Thank you very much
    v_stmt is depend on events
    < v_stmt := 'and v_empno between ...........' >.
    < v_stmt := 'or v_empno =< ...........' >.

    Do you already made the procedure? Looks like you could use dynamic sql in the procedure. check out the oracle pl/sql documentation.

  • Issue on How to mimic Deski document from CMS to local machine, pass parameter, execute and save in a mutiple report format then store in a network drive.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Would you know if there's a way to mimic Deski
    document from BOXI server(CMS) to local machine, pass parameter, execute and
    save in a mutiple report format then store in a local drive or network
    drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only and not desktop intelligence.  Please let me know your ideas. I would really appreciate your help. Thanks.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Hi Ted,
    Thanks for the reply.The file is not available in the server. Though, I checked CMS and I found an instance in history tab and the status is failed with error below. 
                Error Message:
                A variable prevented the data provider Query 1 with BANRRD30 from being refreshed. (DMA0008).When I checked my codes, I found out that the object Im using is for web intelligence data provider. However, I cannot find any documentation and example for passing parameter values in desktop intelligence data provider. Any idea on this? You think this is not suported by Report Engine SDK?Thanks.    

  • How to get month value from custom calendar without passing parameter from SSRS in MDX query

    Could you please throw some light to achieve below requirement?  
    I need to filter the data between two periods dynamically . The date calendar here works differently(ex:-Date 26-Aug-2014 will fall in period 7 which is last date and 27-Aug-2014 will fall in period 8 and it is first date of period 8),so I cannot go
    with system date period/Month. Date Hierarchy is like YEAR,QUARTER,PERIOD ,WEEK and DAY.
    I cannot use SSRS for passing parameter. Requirement is to extract last 2 period of data dynamically in Power Pivot with MDX.
    Thanks Chandan

    Hi Chandan,
    You might try something like this
    Tail(null:
    Extract(
    StrToMember("[FYDay].[DATE].&[ + cStr(Format(Now(),"yyyy-MM-ddT00:00:00")) + "]")
    *[FYDay].[DateHierarchy].[Day]
    ,[FYDay].[DateHierarchy]).parent.parent
    ,2)
    What it is doing is multiplying Day by the current date, which returns a set of one date with cardinality of (Date,Day).  The Extract is pulling out just the datehierarchy Day.  the the Tail() is getting it and the previous day.
    Hope that helps,
    Richard

  • Error while passing parameter in Oracle Jdeveloper

    Hi All,
    I was passed Crystal report viewer object  From Servlet it is Running fine but one problem in that while passing parameter from that page  to data base it is not supporting (The ok Button on page).
    can any one tell me how to find Action Button (.Jsp page)
    Because i am using .jsp  page That was made in CR4E
    in that i found only jsp code I have not get how to work Action of that button
    Also another problem while making Viewer.jsp pge ..rpt-Crystal reports--->>Create Viewer Jsp->>Insert CrysatlReport viewer API code------->>>1.Connectparameterinthat report 2.connect the crystalreportPageViewer  while makin this page  i was running on Apache tomcat Server it is not displaying Anything only Displaying Blank Browser
    Can Any one help me...
    Sincerly
    Amol

    For your first question can you please be a little more clear as to what you are referring to?  I am not familiar with an action button for the parameter pages.... what I can tell you is that we don't have any jsp code for the viewer controls, all of that is generated dynamically at runtime.  We do have a viewer SDK that you can use to set properties on the viewer; information about this can be found in the [Developer Library|https://boc.sdn.sap.com/developer/library] in the Viewer SDK documentation book.
    For your second question, I assume you are referring to generating a viewer page from a report in Crystal Reports for Eclipse.  You will need to uncomment the viewer code (for some reason when the page is generated, the viewer code has block comments surrounding it).  You will probably want to make sure the parameter code is uncommented as well. 
    In addition to this, there is a helper file called JRCHelperSample.java that contains all of the helper methods for the automatically generated viewer page.  This can be modified in whatever way you wish to suit your needs.

  • How to Pass parameter to Custom Scheduler dynamically

    hi ,
    I am new to OIM.
    Need your help in passing parameters dynamically to Custom Scheduler.
    I have created Custom Scheduler by extending Task Support.
    I have registered the plugin through API , using PlatformService.registerPlugin() method.
    As I need to send the parameter(s) to this CustomScheduler, I have defined them in Metadata (CustomScheduleTask.xml) file as below and got it imported into DB
    through weblogicImportMetadata.sh script by providing the path of the file.
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
    <task>
    <name>CustomScheduleTask</name>
    <class>org.schedule.custom.task.CustomScheduleTask</class>
    <description>Fetch details of the given user_id</description>
    <retry>5</retry>
    <parameters>
    <string-param required="true" helpText="Login Name">Login Name</string-param>
    </parameters>
    </task>
    </scheduledTasks>
    Iam able to import this plugin as well as register the plugin successfully. Now I have defined a job to which this Custom SchedulerTask is mapped.
    Now in order to run this job(schedule task) I need to provide Login name( or id) which needs to be send as a parameter for the scheduler to get executed.
    But while defining the job with this Schedule Task on OIM console, I was not able to define or pass parameter to this job. hence parameter is null in
    CustomSchedule 's execute method .
    Kindly help me how to pass parameter dynamically while running the scheduler from OIM console so that the execute method would be able to receive it.
    Thank you in Advance.
    Regards,
    Kumar

    Hi,
    When you have created the schedule job for your custom schedule task, you should see your Login Name textfield in the schedule task. If not, then there verify your schedule task xml.
    In your schedule class code, add:
    public void execute(HashMap arg0) {
              final String METHOD_NAME = "execute :: ";
              logger.debug(CLASS_NAME + METHOD_NAME + "Entering Method - execute");
              try {
                   String LoginName = arg0.get("Login Name");
    Regards,
    Sunny

  • Can't pass parameter's to a transaction in a new win and skip first screen.

    Dear experts,
    I'm trying to open a  transaction('CV04N') in a new window from a screen that has input box and a pushbutton. I'm trying to pass parameter(DOKNR/'CV1') into the new transaction and skip the first selection-screen. I tried to use Get/Set parameter and that didn't work.
    Also i tried to passing values with batch input and that did pass my values but without skipping the first screen and also it froze the transaction.
    Is there anything I can do to fix this problem?

    Hi Gershon Osmolovski,
    Alvaro is right, CV04N needs to press Execute button. So you need to use Batch Input. If it doesn't work, there must be an error in your code, what messages are returned by SAP? I have tested right now, SAP leaves immediately after the selection screen because there is a code that stops the program if it detects it runs using batch input (SY-BINPT system field). So, you should run CALL TRANSACTION with OPTIONS FROM structured data object (data type CTU_PARAMS, see ABAP documentation for more information), with component NOBINPT='X'. Be careful as an ALV grid is then displayed, you can only simulate the buttons so I advise you to indicate the exaction selection in the selection screen, then press "select all", and execute the function you want.
    If you need more help, paste your code, only useful part.
    BR
    Sandra

  • Passing parameter to the i18n text from xml view in fiori app

    Hi,
    Could somebody let me know how to pass parameter to get the i18n text inside xml view of a Fiori app.
    For e.g. inside my i18n properties file i have a entry like:
    PEC_ISSUE={0}issues of total{1}
    inside xml i use it like {i18n>PEC_ISSUE}
    but now how do i pass those 2 parameters to this ??
    i know in javascript it works with , (comma) but does not work in xml. Any help...
    Thanks,
    Ashish

    Hi Michele,
    I found it. Below is the example from my coding.
    <Text      text="{parts: [{path: 'i18n>PEC_to'}, {path: 'promoprocsteps>RetailPromotionSalesFromDate_E'},
                                                           {path:'promoprocsteps>RetailPromotionSalesToDate_E'}],
                                                           formatter: 'retail.promn.promotioncockpit.utils.Formatter.formatDatesString'}"  />
    So you have to create a formatter and pass all the strings to the formatter and then do it inside JS.
    In JS you do it in this way:
    i18n.getText(i18String, [newString, string2]);
    i hope this helps.
    Regards,
    Ashish

  • Passing Parameter to XSL document (in XDK forPL/SQL)

    Here i' trying to pass parameters to my XSL document.But the value is not getting populated in the final document, can anyone help me on this.,.?
    // This is how i 'm passing parameter value to the XSL
    xslprocessor.setParam (styles,'p_batch_name','batch1');
    // Applyting stylesheet(xsl) with XMLdoc and storing it in a DOM node
    docn := xmldom.makeNode(xslprocessor.processXSL(engine,styles,doc));
    My XSL is like this
    <INSERT xsl:version="1.0" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="p_batch_name"/>
    <ROWSET table="abc">
    <xsl:for-each select="rowset/row">
    <ROW>
    <batch_name>"{$p_batch_name}"</batch_name>
    </ROW>
    <xsl:for-each>
    </ROWSET>
    <INSERT>
    But in the final document, the value (batch1) is not getting
    populated. it is coming as null .
    Can anyone help me ...
    null

    This does not work because of the following two things:
    [list=1]
    [*]The value of a parameter is interpreted as an XPath expression. Passing a value of batch1 will be interpreted as the XPath expression batch1 that will try to match any <batch1> child elements of the root of the source document. You need to include the value in quotes to have it be interpreted as a literal string:xslprocessor.setParam (styles,'p_batch_name','"batch1"');[*] The setParam method can only set the value of "top-level" stylesheet parameters. In your stylesheet, you've illegally used <xsl:param> inside a template. You need to switch from the "simple form" of a stylesheet to the "normal form" of the stylesheet to use a top-level parameter. So instead of:<INSERT>
    </INSERT>
    [code]
    you need instead:
    [code]
    <xsl:stylesheet>
    <xsl:template match="/">
    <INSERT>
    </INSERT>
    </xsl:insert>
    </xsl:stylesheet>[list]
    null

  • Passing parameter to report title

    I am working with drill down report. My master ( Source ) report has
    Emp #, Emp Name, Address columns.
    I have prompt on Emp Name column. My second (target) has other employee details and report title is “ Individual Detail report for Employee” but my user is asking they want to display report name with employee name .( passing parameter to report title) . I mean in source report if I click on “Roy Rine” target report should display with following title
    “Individual Detail report for Roy Rine”
    Can I do this one with OBIEE? Please help me.
    Thanks for your time

    Its working but it is repeating names . i mean i have 4 people hvae name "Roy Jermon" . if i click on this column
    report is displaying ' INDIVIDUAL REPORT FOR ROY JERMON ROY JERMON ROY JERMON ROY JERMON"
    is ther any way we can control for only one time even if we have mutiple values.
    i am really appriciate for your time.

  • "Missing parameter values " when passing parameter to subreport

    i have a subreport embedded in main report.
    sub report take a procedure with parameter.the main report does nothing but only holds many sub report.now i have to pass parameter from code to sub report.ive used the following code but it gives "missing parameter values" error
    Any help??
       ParameterField paramField = new ParameterField();
            ParameterFields paramFields = new ParameterFields();
            ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
            paramField.Name = "@LabNo";
            paramDiscreteValue.Value = "1034";
            paramFields.Add(paramField);
            ParameterValues paramvalues = new ParameterValues();
           paramvalues.Add(paramDiscreteValue);
            paramField.CurrentValues.Add(paramDiscreteValue);
    rptDocument.ParameterFields[0].CurrentValues = paramvalues;

    does the sub report have parameters in it as well?
    if the sp used for the sub report has parameters you need to pass them to the sub. i would probably remove the parameters from the sub and join the sub to the main by the parameter from the main to the field in the sub.

  • How to mimic Deski document from BOXI server to local machine, pass parameter, execute and save in a mutiple report format then store in a network drive.

    Post Author: usaitconsultant
    CA Forum: JAVA
    To Guru's, Would you know if there's a way to mimic Deski document from BOXI server to local machine, pass parameter, execute and save in a mutiple report format then store in a local drive or network drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only.  Please let me know your ideas. I would really appreciate your help. Thanks. 

    Give Chronosync a go - have been using for over a year and it works great; if you like Syncback you'll like this app.

  • Looking for a way to pass parameter to external list from infopath

    Hey, i have a Sharepoint 2010 list for which I want to create Infopath form. I have an external content type and external list based on it.
    I want to prepopulate some fields in my Sharepoint list with data from external list. I tried to use external list as a secondary data source and query it for needed values. The issue I encounter is that my ECT has a finder with filter and I can't figure
    out how to pass a value to this filter within infopath.
    How can it be done with infopath? How can I pass the filter value to the external list using Infopath?

    Hi,
    According to your post, my understanding is that you wanted to pass parameter to external list from infopath.
    You need to query the external list from InfoPath using coding and CAML Query.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/33575/filtering-sharepoint-external-list-bcs-from-infopath
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • How do I pass parameter to different portlet regions from another page?

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

Maybe you are looking for

  • Charging US Microphoto in the

    Hello all?I've got a MicroPhoto I bought in the US but I li've in the UK So far I've just ben charging it through my computer, but to charge it from the mains can I just use a UK charger, or do I need to use a US charger with a plug adapter, or do I

  • Ok..... I am frustrated with Apple and my Ipod!  :(  Advice please.

    Hi all, This is a long post so bear with me. I have had an Ipod Mini since June 2005, so it's not that old, but its over a year.... I have noticed lately that the battery was not holding it's charge like it used to. Instead of the normal 8 hours(I be

  • DMS Configuration

    Hi, I have attached and stored a number of documents ( say 10, each representing different packaging instructions ) in SAP DMS. These are stored at a document type / part number / version level for a DMS document number. I have created a sales order

  • How do you transfer line art from Illustrator to Photoshop?

    I created a set of icons in illustrator and would like to move them to photoshop as shape layers. The icons are created from the strokes of shapes, and when I paste them into photoshop, the shape fills in and I lose the stroke. I could add a stroke i

  • Help! My iTunes keeps closing

    I cannot go to the store in iTunes without receiving a message that iTunes has stopped working.