Not getting the return value of a program though it has no errors
public static String giroReturnFileDate(String strType)throws IOException{
try{
SimpleDateFormat getFormatDate = new SimpleDateFormat("yyMM");
Date date = new Date();
String str = getFormatDate.format(date);
System.out.println("Current Date is : "+ str);
System.out.println("Fetching the Giro file now");
if(strType.equalsIgnoreCase("WPD") || strType.equalsIgnoreCase("ISTD")) {
FileReader inputFileReader = new FileReader("giro2itcs_"+strType+".txt");
ArrayList list = new ArrayList();
ArrayList list1 = new ArrayList();
System.out.println("Reading the file");
BufferedReader inputStream = new BufferedReader(inputFileReader);
String inLine = null;
String str1 = null;
while((inLine = inputStream.readLine()) != null && inLine.length() < 2)
list.add(inLine);
System.out.println("Control Record for giro2itcs_"+strType+"is:"+ inLine);
inputFileReader.close();
inputStream.close();
for (int i=0; i<inLine.length(); i++ )
str1 = inLine.substring(19,23);
System.out.println("date of the transaction is:"+str1);
if (str .equals(str1)){
System.out.println("giro2itcs_"+strType+".txt file is created today");
return "true";
else{
System.out.println("giro2itcs_"+strType+".txt file is not created today");
return "false";
}// end of if
return "test";
}// end of try
catch(Exception e) {
System.out.println("The Exception is ::::::::::::::"+e);
return "one";
}//end of giroReturnFileDate(...) method
}//end of of the class
main method is seperate. this program compiles fine but am not getting the return value for this. none of the return values. plzzz help me.
can you send me the code complete one ...
i will debug and solve the problem
[email protected]
By publishing your email address you are likely to get loads of spam.
Similar Messages
-
Remote Object - not able to get the returned value from java method
Hi ,
I am developing one sample flex aplication that connects to the java code and displays the returned value from the
java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
lastResult is giving null . I am able to see the sysout messages in server console.
I am using flex 3.2 and blazeds server and java 1.5
Here is the code what I have written.
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
<mx:Script><![CDATA[
import mx.controls.Alert;
import mx.binding.utils.ChangeWatcher;
import mx.rpc.events.ResultEvent;
import mx.messaging.*;
import mx.messaging.channels.*
public function initApp():void {
var cs:ChannelSet = new ChannelSet();
var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf"); cs.addChannel(customChannel);
remoteObj.channelSet = cs;
public function writeToConsole():void { remoteObj.writeToConsole(
"hello from Flash client");
var returnedVal:String = remoteObj.setName().lastResult; Alert.show(returnedVal);
//[Bindable]
// private var returnedVal:String;
]]>
</mx:Script>
<mx:RemoteObject id="remoteObj" destination="sro" />
<mx:Form width="437" height="281">
<mx:FormItem>
</mx:FormItem>
<mx:Button label="Write To Server Console" click="writeToConsole()"/>
</mx:Form>
</mx:WindowedApplication>
Java code
public
public SimpleRemoteObject(){
super(); }
class SimpleRemoteObject {
public void writeToConsole(String msg) { System.out.println("SimpleRemoteObject.write: " + msg); }
public String setName(){ System.
out.println("Name changed in Java");
return "Name changed in Java";
And I have configured destination in remote-config.xml
<destination id="sro">
<properties>
<source>SimpleRemoteObject</source>
<scope>application</scope>
</properties>
</destination>
Please help me .You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
In this you define what you wish to do.
More importantly in the remote object you need to define which method you wish to call using the method class like this
<mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1" >
<Method name="javaMethodName" result="r2" fault="f2"/>
<mx:RemoteObject>
r2 is the function where you get the result back from java and can use it to send the alert. -
LiveCycle DS , can't get the return value of fill( arg) from Assembler class
Hi all!
I'm a have small problem , can any one help me? Please
I make a project which very similar to Product project(in
example).
1) Have Assembler class: I work correctly
package flex.samples.stock;
import java.util.List;
import java.util.Collection;
import java.util.Map;
import flex.data.DataSyncException;
import flex.data.assemblers.AbstractAssembler;
public class StockAssembler extends AbstractAssembler {
public Collection fill(List fillArgs) {
StockService service = new StockService();
System.out.print(fillArgs.size());
return service.getStocks();
public Object getItem(Map identity) {
StockService service = new StockService();
return service.getStock(((Integer)
identity.get("StockId")).intValue());
public void createItem(Object item) {
StockService service = new StockService();
service.create((Stock) item);
public void updateItem(Object newVersion, Object
prevVersion, List changes) {
StockService service = new StockService();
boolean success = service.update((Stock) newVersion);
if (!success) {
int stockId = ((Stock) newVersion).getStockId();
throw new DataSyncException(service.getStock(stockId),
changes);
public void deleteItem(Object item) {
StockService service = new StockService();
boolean success = service.delete((Stock) item);
if (!success) {
int stockId = ((Stock) item).getStockId();
throw new DataSyncException(service.getStock(stockId),
null);
some require class is ok.
2) I configure in data-management-config.xml
<destination id="stockinventory">
<adapter ref="java-dao" />
<properties>
<source>flex.samples.stock.StockAssembler</source>
<scope>application</scope>
<metadata>
<identity property="StockId"/>
</metadata>
<network>
<session-timeout>20</session-timeout>
<paging enabled="false" pageSize="10" />
<throttle-inbound policy="ERROR" max-frequency="500"/>
<throttle-outbound policy="REPLACE"
max-frequency="500"/>
</network>
</properties>
</destination>
3) My client app:
I use :
<mx:ArrayCollection id="stocks"/>
<mx:DataService id="ds" destination="stockinventory"/>
ds.fill(stocks); --> Problem here
When I run this app, The StockAssembler on the server work
correctly (i use printout to debug) . But variable stocks can't get
the return value,it is a empty list.
Please help me!Hi,
The executeQueryAsync method is “asynchronous, which means that the code will continue to be executed without waiting for the server to
respond”.
From the error message “The collection has not been initialized”, which suggests that the object in use hadn’t been initialized after the execution of the executeQueryAsync method.
I suggest you debug the code in browser to see which line of code will throw this error, then you can reorganize the logic of the code to avoid using the uninitialized object.
A documentation from MSDN about Using the F12 Developer Tools to Debug JavaScript Errors
for your reference:
http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
Best regards
Patrick Liang
TechNet Community Support -
How to get the return values from a web page
Hi all :
how to get the return values from a web page ? I mean how pass values betwen webflow and web page ?
thank you very much
Edited by: jingying Sony on Apr 15, 2010 6:15 AM
Edited by: jingying Sony on Apr 15, 2010 6:18 AMHi,
What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
Regards,
Karri -
Select_list_from_lov, cant get the returning value
Hi
I try to use a apex_item.select_list_from_lov in a wizard. The LOV that I have is a dynamic list.
everything works fine, only I cant get the return value of the selected items.
multi select list
htp.p(apex_item.SELECT_LIST_FROM_LOV
( 2,
'MOS_ROL_OMSCHRIJVING',
' MULTIPLE HEIGHT=5',
'NO',
null,
null,
null,
null,
'NO')
trying to see what the return values are, but got nothing.
:p12_test := :f02;
(p12_test is a textfield)
any assistance would be greatly appreciated.
Thanks
using apex 4.0.>
trying to see what the return values are, but got nothing.
:p12_test := :f02;
(p12_test is a textfield)
>
f02 is an associative array. See Referencing Arrays in the APEX API Reference for information on how to access values of items created using apex_item methods. -
Get the return value of an RFC function / BAPI
Hello,
I'm a Web Dynpro Java beginner and I try to get the return value (domain: NUMC6) of an RFC function without success.
Here is what I do, could you please tell me what is wrong?
First, here is my context:
Context
|
|---- ZMy_Bapi
|
|---- MyOutputResult
| |
| |---- MyReturnValue
|
|---- MyInput
My model:
MyModel
|
|---- ZMy_Bapi_Input
|
|---- Output
| |
| |---- ZMy_Bapi_Output
| |
| |---- Return_Value
|
|---- Input_Value
The mapping between them:
- MyInput is mapped to Input_Value
- MyReturnValue is mapped to Return_Value
And my code:
ZMy_Bapi_Input bapiInput = new ZMy_Bapi_Input();
wdContext.nodeZMy_Bapi().bind(bapiInput);
bapiInput.setInput_Value("A value");
executeZMy_Bapi();
ZMy_Bapi_Output bapiOutput = new ZMy_Bapi_Output();
wdContext.nodeMyOutputResult().bind(bapiOutput);
IMyOutputResultElement outputElement = wdContext.nodeMyOutputResult().currentMyOutputResultElement();
String result = outputElement.getMyReturnValue();
Finally, here is the code of the executeZMy_Bapi() function:
try {
wdContext.currentZMy_BapiElement().modelObject().execute();
wdContext.nodeMyOutputResult().invalidate();
} catch (Exception ex) {
ex.printStackTrace();
My problem is that "result" keeps being empty
Thanks in advance for your help!It still doesn't work, I'm gonna turn crazy!
But there is one good point: I get the method you mentioned: getZMy_Bapi_OutputElementAt and getMyReturnValue without casting, just as you said first.
Here are the updated context, model, mapping and code.
Context:
MyContext
|
|---- ZMy_Bapi
|
|---- MyOutputResult
| |
| |---- ZMy_Bapi_Output
| |
| |---- MyReturnValue
|
|---- MyInput
Model:
MyModel
|
|---- ZMy_Bapi_Input
| |
| |---- Output
| | |
| | |---- ZMy_Bapi_Output
| | |
| | |---- Return_Value
| |
| |---- Input_Value
|
|
|---- ZMy_Bapi_Output
|
|---- Return_Value
Mapping
ZMy_Bapi --> ZMy_Bapi_Input
MyOutputResult --> Output
ZMy_Bapi_Output --> ZMy_Bapi_Output
MyReturnValue --> Return_Value
MyInput --> Input_Value
Code
ZMy_Bapi_Input bapiInput = new ZMy_Bapi_Input();
wdContext.nodeZMy_Bapi().bind(bapiInput);
bapiInput.setInput_Value("A value");
executeZMy_Bapi();
ZMy_Bapi_Output bapiOutput = new ZMy_Bapi_Output();
wdContext.nodeMyOutputResult().bind(bapiOutput);
String result = "";
for (int i = 0; i < wdContext.nodeZMy_Bapi_Output().size(); i++) {
IZMy_Bapi_OutputElement resultElem = wdContext.nodeZMy_Bapi_Output().getZMy_Bapi_OutputElementAt(i);
if (resultElem.getMyReturnValue() != "" && resultElem.getMyReturnValue() != null) {
result = resultElem.getMyReturnValue();
Edited by: Franis Pignon on Oct 17, 2008 11:16 PM -
I have Adobe Photoshop Elements 10. It came installed on my HP Desktop. I am can not get the warp text tool to work. It has worked in the past. Once I click warp text, the little window does not pop up, and if I try to do anything else after I click warp text, it wont let me. Just sounds the ding, alert, can still slightly navigate the program but can not use any other tools after clicking warp text. I just have to open task manager and close the program. not sure if I'm doing something wrong or maybe I just need to uninstall and re install. Having trouble finding out how to uninstall and reinstall because the program came pre installed on my desktop.
It actually sounds like the warp text window is opening off screen.
Resetting the photoshop elements 10 preferences should fix it.
*Press and hold the Shift+Ctrl+Alt keys just after you start the launch of the photoshop elements 10 editor
*Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop elements setting file
*Press Yes -
After doing the backup and restore how do you know if the iphone is unlocked if you do not get the message: "Unlock Complete. Congratulations, your iPhone has been unlocked. To set up and sync this iPhone, click Continue."
If you don't get the message, your phone is NOT unlocked.
-
How to get the return value of a LOV item using javascript
Hello,
I am trying to put an onchange attribute in the HTML Form Element Attributes field of a LOV item. The javascript should access the new return value of the item. How is this done ? All the methods I have tried give only the display value, not the return value. For example $v() returns the display value.
TiinaIf your item is called P1_ITEM this will give you the return value of a popup (displays description,returns key value)
alert($x('P1_ITEM_HIDDENVALUE').value)
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Analysis not getting the right value off ADM Tool
Hello people,
I'm trying to do one difficult thing, but, first of all the simple thing is not working.
In ADM tool, I have this logic column: avg(Fact_AGR_ESCOPO_MEDIAPPM.MEDIA_PPM_TIPO)
The physical table that have this attribute is: TFAGR_ESCOPO_MEDIAPPM
When I do this Search:
SELECT DISTINCT T3.TIPO_PTB, T2.NOME, T1.MEDIA_PPM_TIPO FROM TFAGR_ESCOPO_MEDIAPPM T1
JOIN TD_ESCOPO T2 ON T1.ESCOPO_SK = T2.ESCOPO_SK
JOIN TD_MOTIVO T3 ON T1.MOTIVO_SK = T3.MOTIVO_SK
WHERE T2.ESCOPO_SK = 1;
I get this TIPO_PTB:
Complaint and Não Complaint.
Now, when I go to the analysis and use the MEDIA_PPM_TIPO att, I got all the TIPO_PTB, not only the Complaint and Nao Complaint.
Someone know whats is this or how I can search for the problem ?The problem was because I'm trying to use some aggregation rule.
When I put none to aggregation rule, I got only the representation of the DB.
But now, I have another problem and is my initial problem:
How can I spread one value to anothers, always getting the last value by month ?
Example:
JAN FEB MAR
10 20 5
JAN FEB MAR
5 5 5
This is what I want. Always spread the last value base on month to the others (The filter is not a good solution because the prompt changes and the last month will not be the same) -
Calling the DTExec from Perl Script and need to get the Return Value (Sucess or Failure)
I am able to execute the SSIS Package from Perl Script using DTExec. But i need to get the return code of the SSIS Execution. Is their any option available to get the Success or Failure information from Perl ?
Exit codes returned from dtexec utility
When a package runs, dtexec can return an exit code. The exit code is used to populate the ERRORLEVEL variable, the value of which can then be tested in conditional statements or branching logic within a batch file. The following table lists
the values that the dtexec utility can set when exiting.
http://technet.microsoft.com/en-us/library/hh231187.aspx
There's a wrinkle if the package is running in the SSIS Catalog:
http://www.mattmasson.com/2012/02/exit-codes-dtexec-and-ssis-catalog/
David
David http://blogs.msdn.com/b/dbrowne/ -
Router not seeing the return value from a webservice
Hello. I have two input fields and a button that calls a web service, is an action that is passed to a router.
So it looks like this form-->execute web service-->router-->decision
I'm passing back a string of success or failure as follows:
@WebMethod
public String doLogin(String userName, String password)
if(userName.equals("1"))
return "failure";
return "success";
It executes the method fine, but the router doesn't see the return value correctly. It always evaluates to false (which is the default)
My text boxes and button is defined as follows:
<af:inputText value="#{bindings.arg0.inputValue}"
label="Username:"
required="#{bindings.arg0.hints.mandatory}"
columns="#{bindings.arg0.hints.displayWidth}"
maximumLength="#{bindings.arg0.hints.precision}"
shortDesc="#{bindings.arg0.hints.tooltip}">
<f:validator binding="#{bindings.arg0.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.arg1.inputValue}"
label="Password:"
required="#{bindings.arg1.hints.mandatory}"
columns="#{bindings.arg1.hints.displayWidth}"
maximumLength="#{bindings.arg1.hints.precision}"
shortDesc="#{bindings.arg1.hints.tooltip}">
<f:validator binding="#{bindings.arg1.validator}"/>
</af:inputText>
<af:commandButton actionListener="#{bindings.doLogin.execute}"
text="doLogin"
disabled="#{!bindings.doLogin.enabled}"
action="doLogin"/>
</af:panelFormLayout>
My loginpagedef.xml is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
version="11.1.1.51.88" id="loginPageDef"
Package="customerportal.pageDefs">
<parameters/>
<executables>
<variableIterator id="variables">
<variable Type="java.lang.String" Name="doLogin_Return"
IsQueriable="false" IsUpdateable="0"
DefaultValue="${bindings.doLogin.result}"/>
<variable Type="java.lang.String" Name="doLogin_arg0"
IsQueriable="false"/>
<variable Type="java.lang.String" Name="doLogin_arg1"
IsQueriable="false"/>
</variableIterator>
</executables>
<bindings>
<methodAction id="doLogin" RequiresUpdateModel="true" Action="invokeMethod"
MethodName="doLogin" IsViewObjectMethod="false"
DataControl="OracleWebServices"
InstanceName="OracleWebServices"
ReturnName="OracleWebServices.methodResults.doLogin_OracleWebServices_doLogin_result">
<NamedData NDName="arg0" NDValue="${bindings.doLogin_arg0}" NDType="java.lang.String"/>
<NamedData NDName="arg1" NDType="java.lang.String"
NDValue="${bindings.doLogin_arg1}"/>
</methodAction>
<attributeValues IterBinding="variables" id="arg0">
<AttrNames>
<Item Value="doLogin_arg0"/>
</AttrNames>
</attributeValues>
<attributeValues IterBinding="variables" id="arg1">
<AttrNames>
<Item Value="doLogin_arg1"/>
</AttrNames>
</attributeValues>
</bindings>
</pageDefinition>
What am I doing wrong? I can never seem to get the router to view the result coming back from the web service. Thanks in advance!Hi,
Can you try this
<method-call id="DepartmentCheck">
<method>#{bindings.DepartmentCheck.execute}</method>
<return-value>#{pageFlowScope.checkResult}</return-value>
<outcome>
<fixed-outcome>result</fixed-outcome>
</outcome>
</method-call>
<router id="routerReturnCheck">
<case>
<expression>#{pageFlowScope.checkResult==true}</expression>
<outcome>succes</outcome>
</case>
<default-outcome>return</default-outcome>
</router>
just put the result of a method in pageFlowScope variable then the flow case go the router where you evaluate the variable
hope this helps -
How to get the return value of a method
hi there
here is the code i write a method
public void time(int x,int y){
int xx;
int yy;
xx++;
yy++;
x=xx;
y=yy;
i want to use the return value of x and y at another place,who can tell if it is possible. thank u very muchYou declare the return type of the method, and then use the return keyword to return a value which you can assign to a variable.
As the other respondent said, you cannot return more than one value from a function. If you need to return two related values, you may want to enclose them in a class and return an instance of that class. For instance:
class TimeValue {
final int x;
final int y;
public TimeValue(int x, int y) {
this.x = x;
this.y = y;
}Then your method could create a new TimeValues and return it:
public TimeValue time(int x,int y){
int xx = x;
int yy = y;
++xx;
++yy;
return new TimeValue(xx, yy);
} -
Why I can not get the email value?
I tried to pull out the email address from database, but for some reason i could not get it. Here is the code.
Javabean:
public class ProgramBean {
private String programId;
private String programTitle;
private String programDesc;
private String sponsorId;
private String sponsorName;
private String providerId;
private String provider;
private String providerEmail;
private String providerPhone;
private String programStatus;
private String receiveDay;
private String receiveMonth;
private String receiveYear;
private String receivedDate;
private String approvedDay;
private String approvedMonth;
private String approvedYear;
private String approvedDate;
private String approvedBy;
private String notifyBy;
private String expiredDay;
private String expiredMonth;
private String expiredYear;
private String expiredDate;
private String attachments;
private String website;
private String programComments;
private String section;
private String notes;
private String requestedMaxCeu;
private String approvedMaxCeu;
private String whoAdded;
private String dateAdded;
private String whoChanged;
private String dateChanged;
public ProgramBean() {
public ProgramBean(String programId,String programTitle, String programDesc, String sponsorId, String sponsorName,String providerId,String provider, String providerEmail, String providerPhone,String programStatus,
String receiveDay,String receiveMonth,String receiveYear, String approvedDay, String approvedMonth, String approvedYear,
String approvedBy,String notifyBy,String expiredDay,String expiredMonth,String expiredYear,String attachments, String website,String programComments,
String section,String notes,String whoAdded,String dateAdded,String whoChanged,String dateChanged){
this.programId = programId;
this.programTitle = programTitle;
this.programDesc = programDesc;
this.sponsorId = sponsorId;
this.sponsorName = sponsorName;
this.providerId = providerId;
this.provider = provider;
this.providerEmail = providerEmail;
this.providerPhone = providerPhone;
this.programStatus = programStatus;
this.receiveDay = receiveDay;
this.receiveMonth = receiveMonth;
this.receiveYear = receiveYear;
this.approvedDay = approvedDay;
this.approvedMonth = approvedMonth;
this.approvedYear = approvedYear;
this.approvedBy = approvedBy;
this.notifyBy = notifyBy;
this.expiredDay = expiredDay;
this.expiredMonth = expiredMonth;
this.expiredYear = expiredYear;
this.attachments = attachments;
this.website = website;
this.programComments = programComments;
this.section = section ;
this.notes = notes;
this.whoAdded = whoAdded;
this.dateAdded = dateAdded;
this.whoChanged = whoChanged;
this.dateChanged = dateChanged;
public void setProgramId(String b_programId){
this.programId = b_programId;
public String getProgramId(){
return programId;
public void setProgramTitle(String b_programTitle){
this.programTitle = b_programTitle;
public String getProgramTitle(){
return programTitle;
public void setProgramDesc(String b_programDesc){
this.programDesc = b_programDesc;
public String getProgramDesc(){
return programDesc;
public void setProgramStatus(String b_programStatus){
this.programStatus = b_programStatus;
public String getProgramStatus(){
return programStatus;
public void setApprovedDay(String b_approvedDay){
this.approvedDay = b_approvedDay;
public String getApprovedDay(){
return approvedDay;
public void setApprovedMonth(String b_approvedMonth){
this.approvedMonth = b_approvedMonth;
public String getApprovedMonth(){
return approvedMonth;
public void setApprovedYear(String b_approvedYear){
this.approvedYear = b_approvedYear;
public String getApprovedYear(){
return approvedYear;
public void setApprovedDate(String b_approvedDate){
this.approvedDate = b_approvedDate;
public String getApprovedDate(){
return approvedDate;
public void setProvider(String b_provider){
this.provider = b_provider;
public String getProvider(){
return provider;
public void setProviderEmail(String b_providerEmail){
this.providerEmail = b_providerEmail;
public String getProviderEmail(){
return providerEmail;
public void setSponsorId(String b_sponsorId){
this.sponsorId = b_sponsorId;
public String getSponsorId(){
return sponsorId;
public void setSponsorName(String b_sponsorName){
this.sponsorName = b_sponsorName;
public String getSponsorName(){
return sponsorName;
public void setProviderPhone(String b_providerPhone){
this.providerPhone = b_providerPhone;
public String getProviderPhone(){
return providerPhone;
public void setProviderId(String b_providerId){
this.providerId = b_providerId;
public String getProviderId(){
return providerId;
public void setReceiveDay(String b_receiveDay){
this.receiveDay = b_receiveDay;
public String getReceiveDay(){
return receiveDay;
public void setReceiveMonth(String b_receiveMonth){
this.receiveMonth = b_receiveMonth;
public String getReceiveMonth(){
return receiveMonth;
public void setReceiveYear(String b_receiveYear){
this.receiveYear = b_receiveYear;
public String getReceiveYear(){
return receiveYear;
public void setReceivedDate(String b_receivedDate){
this.receivedDate = b_receivedDate;
public String getReceivedDate(){
return receivedDate;
public void setApprovedBy(String b_approvedBy){
this.approvedBy = b_approvedBy;
public String getApprovedBy(){
return approvedBy;
public void setNotifyBy(String b_notifyBy){
this.notifyBy = b_notifyBy;
public String getNotifyBy(){
return notifyBy;
public void setExpiredDay(String b_expiredDay){
this.expiredDay = b_expiredDay;
public String getExpiredDay(){
return expiredDay;
public void setExpiredMonth(String b_expiredMonth){
this.expiredMonth = b_expiredMonth;
public String getExpiredMonth(){
return expiredMonth;
public void setExpiredYear(String b_expiredYear){
this.expiredYear = b_expiredYear;
public String getExpiredYear(){
return expiredYear;
public void setExpiredDate(String b_expiredDate){
this.expiredDate = b_expiredDate;
public String getExpiredDate(){
return expiredDate;
public void setAttachments(String b_attachments){
this.attachments = b_attachments;
public String getAttachments(){
return attachments;
public void setWebsite(String b_website){
this.website = b_website;
public String getWebsite(){
return website;
public void SetProgramComments(String b_programComments){
this.programComments = b_programComments;
public String getProgramComments(){
return programComments;
public void SetSection(String b_section){
this.section = b_section;
public String getSection(){
return section;
public void SetNotes(String b_notes){
this.notes = b_notes;
public String getNotes(){
return notes;
public void SetWhoAdded(String b_whoAdded){
this.whoAdded = b_whoAdded;
public String getWhoAdded(){
return whoAdded;
public void SetDateAdded(String b_dateAdded){
this.dateAdded = b_dateAdded;
public String getDateAdded(){
return dateAdded;
public void SetWhoChanged(String b_whoChanged){
this.whoChanged = b_whoChanged;
public String getWhoChanged(){
return whoChanged;
public void SetDateChanged(String b_dateChanged){
this.dateChanged = b_dateChanged;
public String getDateChanged(){
return dateChanged;
public void SetRequestedMaxCeu(String b_requestedMaxCeu){
this.requestedMaxCeu = b_requestedMaxCeu;
public String getRequestedMaxCeu(){
return requestedMaxCeu;
public void SetApprovedMaxCeu(String b_approvedMaxCeu){
this.approvedMaxCeu = b_approvedMaxCeu;
public String getApprovedMaxCeu(){
return approvedMaxCeu;
Servlet:
HttpSession session = request.getSession();
ProgramBean updatedProgramInfo = new ProgramBean();
try
Class.forName("oracle.jdbc.OracleDriver");
conn = DriverManager.getConnection("");
stmt_get_classes = conn.createStatement();
sql = "SELECT p.program_id,upper(p.program_title),upper(p.program_desc),p.sponsor_id,p.provider_id, upper(d.last_name||', '||d.First_name),p.program_status, "+
" to_char(p.date_received,'mm/dd/yyyy'), to_char(p.date_approved,'mm/dd/yyyy'),upper(p.approved_by), Upper(p.notified_by), to_char(p.date_expiration,'mm/dd/yyyy'), nvl2(p.agenda_file,'AGENDA - '||p.agenda_file,'DON''T FORGET THE ATTACHMENTS!'),"+
" p.website, upper(p.program_comments), p.section, upper(p.administrator_notes), upper(p.cre_user), to_char(p.cre_date,'mm/dd/yyyy hh:mm:ss PM'), upper(p.mod_user), to_char(p.mod_date, 'mm/dd/yyyy hh:mm:ss PM'),"+
"d.email;
rs = stmt_get_classes.executeQuery(sql);
while(rs.next()){
updatedProgramInfo.setProgramId(rs.getString(1));
updatedProgramInfo.setProgramTitle(rs.getString(2));
updatedProgramInfo.setProgramDesc(rs.getString(3));
updatedProgramInfo.setSponsorId(rs.getString(4));
updatedProgramInfo.setProviderId(rs.getString(5));
updatedProgramInfo.setProvider(rs.getString(6));
updatedProgramInfo.setProgramStatus(rs.getString(7));
date =rs.getString(8);
updatedProgramInfo.setApprovedBy(rs.getString(10));
updatedProgramInfo.setNotifyBy(rs.getString(11));
date =rs.getString(12);
updatedProgramInfo.setAttachments(rs.getString(13));
updatedProgramInfo.setWebsite(rs.getString(14));
updatedProgramInfo.SetProgramComments(rs.getString(15));
updatedProgramInfo.SetSection(rs.getString(16));
updatedProgramInfo.SetNotes(rs.getString(17));
updatedProgramInfo.SetWhoAdded(rs.getString(18));
updatedProgramInfo.SetDateAdded(rs.getString(19));
updatedProgramInfo.SetWhoChanged(rs.getString(20));
updatedProgramInfo.SetDateChanged(rs.getString(21));
updatedProgramInfo.setProviderEmail(rs.getString(22));
System.out.print(rs.getString(21));
session.setAttribute("ProgramBean",updatedProgramInfo);
response.sendRedirect("UpdateProgram.jsp");
JSP:
<a href="mailto:<c:out value="${sessionScope.ProgramBean.providerEmail}"/>">Email <c:out value="${sessionScope.ProgramBean.provider}"/> </a>
The problem is I could not ge tthe value: ${sessionScope.ProgramBean.providerEmail}, but I have no problem to get the value: ${sessionScope.ProgramBean.provider}.
By the way, the original program was written by someone else, i am kind of new of jsp stuff. I just tried to add an email part which shows on the bold text. Did I do something wrong? Thanks.Mate,
Two things...
1. Please try just printing the email address with a straight: <c:out value="${sessionScope.ProgramBean.providerEmail}"/>, then do a VIEW SOURCE off the result... I SUSPECT that the @ in the email address is being translated by the c:out into a character entity... if that's the case just use escapeXml="false" in your c:out tag... but then you'll need to beware of crosssight scripting attacks, apparently.
See: http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/c/tld-summary.html
... or just use the standard SQL tag library, and avoid the issue completely.
2. When you post, format your code with the \[code\] \[\/code\] tags... and just remove all the superflious code (don't just bold the pertintant bits... It took me longer to read your code then you took to post it, and I won't bother again.
Cheers. Keith. -
Hi
-- I have a PL/SQL in which it return an array value and I need to get the value using Java.... any idea how?
thanksCheck out CallableStatement:
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html
Maybe you are looking for
-
Hi there, I wrote a procedure which calls a function to get the query. The SQL in the query is ok, since I have testet it in SQL scratchpad. But wehen I call the procedure it says "Invalid SQL Statement". Can someone please point me to my mistake. Th
-
Entity object attribute with a list of objects
Does anyone know how one sets up an entity object that has an attribute with a list of objects as the type? (assuming that's supported) as in: CREATE TYPE phones AS VARRAY(10) OF varchar2(10); Create table suppliers (supcode number(5), Company varcha
-
I am using SSRS 2012 for my report. I want to hide certain columns in the report. I don't want to see spaces between columns in my report when a middle column visibility is set to hide. I have an expression that hides or makes visible a certain colum
-
How can we get pages 09 and Keynote back?
I understand from the forums that Pages was changed in order to adapt to the IOS. The IOS should have adapted to Mac. How embarassing. No setup for tool bar as before for the items that you use consistently. Pages 09 worked very well and now it is li
-
Can't download Photoshop trial
[IMG]http://i60.tinypic.com/2wc1ap1.png[/IMG] Keep getting this. What can I do?