Using a Variable in the Get PRoperty Tag???
This is what I tried:
<% String colname="code02"; %>
<jsp:getProperty name='Input' property='<%=colname%>' />
Produced this:
Internal Servlet Error:
org.apache.jasper.JasperException: Cannot find any information on property '' in a bean of type 'com.infomed.InputBean'
at org.apache.jasper.runtime.JspRuntimeLibrary.getReadMethod(JspRuntimeLibrary.java:616)
at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerator.java:101)
at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener.java:771)
at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventListener.java:220)
at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseEventListener.java:175)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
Any Help you can give would be greatly appreciated, what I need to do is cycle through code01, code02....code15
and use the string to do it, but use a counter integer to create the string, ie..'code0' + i and then use the sting to access
on of the member properties in the been...(Code01, Code02) ertc.
If I simply do a
<jsp:getProperty name='Input property='code02'/>
everything works great.
when I try to replace the property='code02' with a variable, so that I can run through a loop, I run into the problems
Any ideas would be of great help as I am pounding my head against the brick wall
Expressions aren't allowed in the getProperty tag:
http://java.sun.com/products/jsp/pdf/card11.pdf
Similar Messages
-
Read a property in the set-property tag
How i can read a custom property defined in struts-config by adding <set-property property="customproperty" value="CustomValue"/> ??
I want to put some extra info about every action in the struts-config.xml and then read it from the action or actionMapping classes in run-time.Hi,
I found it!!
The answer is: extend the ActionMapping (or the BC4JActionMapping for Oracle jdev developers) And add the extra-atributes (with the same name as the value in the <set-property> tag ) with their setter and getter methods.
Then add to <action> in the struts-config.xml the atribute className:
<action path="/logon" className="MyActionMapping">
<set-property property="customProperty" value="SomeValue" >
</action>
or,
change in the web.xml the mapping param:
<init-param>
<param-name>mapping</param-name>
<param-value>MyActionMapping</param-value>
</init-param>
Then, in the Action wich receive the ActionMapping object, cast to MyActionMapping and get the atributes with their setter and getter methods:
((MyActionMapping)mapping).getCustomProperty();
i hope this help to others with the same problem. -
Using a variable as the comparison set with the IN clause
I am attempting to use a variable as the comparison set in an IN clause:
if <var> is not null and <var> in (<variable>) then ...
if <var> = 'X' and <variable> = 'X','Y' this statement evaluates to FALSE. If, however, I write
if <var> is not null and <var> in ('X','Y') then ...
the statement evaluates to TRUE. Is there a way to force evaluation of a variable prior to executing the statement?Kumar
That is neat trick and an good example of lateral thinking. However, there is a slight problem with it in that this is true:
instr('1APC2', 'APC')
whereas this is false
'APC' IN ('1APC2')
However, it did inspire me to produce an even neater trick:
create or replace function my_in
(in_value IN varchar2, in_string_list IN varchar2)
RETURN boolean
AS
larray_string DBMS_UTILITY.uncl_array;
ln_count INTEGER;
return_value BOOLEAN := FALSE;
lv_comparator VARCHAR2(4000);
BEGIN
DBMS_UTILITY.comma_to_table(in_string_list, ln_count, larray_string);
FOR rownum IN 1..ln_count
LOOP
IF larray_string(rownum) = in_value
THEN
return_value := TRUE;
EXIT;
END IF;
END LOOP;
RETURN return_value;
END;
Note that the in_string list parameter must be COMMA separated, and spaces will be treated as values. Hence
declare
lb boolean;
begin
lb := my_in('APC', 'DEF,APC,ABC');
if lb = TRUE
THEN
dbms_output.put_line('FOUND');
else
dbms_output.put_line('NOT FOUND');
end if;
lb := my_in('APC', 'DEF, APC, ABC');
if lb = TRUE
THEN
dbms_output.put_line('FOUND');
else
dbms_output.put_line('NOT FOUND');
end if;
end;
produces the following output:
SQL> @tstrun
FOUND
NOT FOUND
PL/SQL procedure successfully completed.
SQL>
Kindest regards, APC -
How to use bind variables in the following query
CREATE OR REPLACE PROCEDURE MMDB.test IS
sel_qtn VARCHAR2 (10);
CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
AND run_id = 100
a PT_QUANTITY%ROWTYPE;
BEGIN
FOR i IN PT_QUANTITY
loop
sel_qtn := i.quanttity-1;
While sel_qtn>=1
loop
insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
sel_qtn :=sel_qtn -1;
End loop;
commit;
end;Don't duplicate threads: How to use bind variables in the following query
-
Creating variables in Process Flows and using thse variables in the filter
Hi,
I am new to OWB and in learing stage. Need to information.
*1. as to how pass/create/use variables to OWB mapping ?*
*2. Creating variables in Process Flows and using thse variables in the filter operator of the OWB mapping?*
*3. Other mechanisms of how to create/use variables within OWB mapping itself ?*
can you please provide the above details and guide me / help me in this regard.
Thanks,
skms.1. Add parameters to your mapping using the MAPPING INPUT PARAMETER from the pallette.
2. Add parameters to the START operator in the process flow. Bind the process flow parameter to the Mapping parameter.
3. May be appropriate to use CONSTANTS instead of parameters.
Regards
Si -
Use a variable for the integer in Fmt offset modifier
I'm trying to pluck values out of a long array of comma separated string
values.
I'm doing this within a loop and would like to use the loop interation to
point to the starting point in the array.
Here's what I have working so far:
Fmt (scratch,"%s<%s[i0t44]",transmitBuf);
Works great.
Now if I go in and change i0 to i3 then my modifier doesn't start looking
for a comma "," until after the 3rd character. Still working great. However....
If I try to use an integer called "loop" instead of the literal offset
value it blows up:
Fmt (scratch,"%s<%s[iloopt44]",transmitBuf);
Is there a way that I can use a variable for the integer portion of the
offset modifer?
Thanks All!Hi Roberto
Thank you. I actually need to use a symbolic value for the interger section of the modifer vs. the specifier.
So, in my example:
Fmt (scratch,"%s<%s[i0t44]",transmitBuf);
I want to make the following substitution (Assume z=0)
Fmt (scratch,"%s<%s[izt44]",transmitBuf);
Some background...
I'm looking to loop index through a long CSV string array (transmitBuf) that looks like this:
1,PEEP,7,6,,,21,20,
So on my first loop when I use the following:
Fmt (scratch,"%s<%s[i0t44]",transmitBuf);
scratch = "1"
... Perfect. I now do a string length of scratch (which equals 1)
and add 1 to it, I'm ready for my next loop which would
literally read like this:
Fmt (scratch,"%s<%s[i2t44]",transmitBuf);
However, I want to put this inside a loop, so I would like to
increment a variable (++z) and use the following:
Fmt (scratch,"%s<%s[izt44]",transmitBuf); ---- Ka-Boom!
So it's the use of the variable in the modifer that blows up
the Fmt command.
appreciate any thoughts...
Thanks
Mark -
Using attribute variables in the planning folders
Hi all,
Is there way to use attribute variables in the planning folders?
There is a following situation. We have a number of cost centers (0COSTCENTER). Cost center has responsible person (0RESP_PERS) as attribute.
We planning some costs for cost center.
To select certain cost center to cost planning we created
variable ZVAR1 as type CHAR and placed this variable in the header of planning folder.
Now we have to restrict list of cost center for selection according to selected responsible person.
Of course, I can add 0RESP_PERS to my cube, create variable ZVAR2 as type CHAR based on this character. Then place this variable to folder. For variable ZVAR1 use type of replacement as "User Exit" and ABAP routine will restrict list of available cost centers based on value of ZVAR2.
But... Is there way to use variable with type of attribute and place this variable to header of folder?
Thanks in advance!Hi Dmitry,
Yes, you can use the attribute variable in your folder.
Just create attribute variable with 0COSTCENTER as the basic char and 0RESP_PERS as attribute.then when you create your folder with UPSPM, make sure to choose notweb-enable type then under the variable category you will see the the attribute vairable you just created at BPS0, just drug it to you folder, you are done. -
I have a simple sharepoint workflow that sends and email to users. I know that the mail portion works because I can put a user's email address in the to: field and it sends fine. If I use a string variable with the email address, I get a workflow
error.
Simple steps to repro for me:
Create a new workflow in SPD (I have tried a list workflow and site workflow)
Create a workflow variable named email.
Set the variable to an email address where the user is in the site
Send email and do a variable lookup to the email variable just set.
The workflow just hangs in this scenario
I do get an error:
Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP BadRequest to https://[tenant].sharepoint.com/_api/sp.utilities.utility.SendEmail
Correlation Id: 568e9c68-ea75-d057-ab9f-d86f6cae3021 Instance Id: 9cc721a4-78e6-456f-812b-67351dfc9710
The e-mail message cannot be sent. Make sure the e-mail has a valid recipient.
Retry nowSimple answer... When I used the variable, I marked it as a string. There is an email address setting.
-
Using EL variable in struts bean:message tag(not struts EL tag)
Is there any work around to use an EL variable inside struts bean:message tag as key:
I have like this:
<bean:message key="${bean.keyName}"/>
which is throwing error , I know this can be resolved by using struts-el tags but i cannot use them for specific reasons.
I dont want to use bean:define tag to define my 'bean' and then use like this:
<bean:message key="<%=bean.getKeyName%>"/> (this actually works, but i want to use EL variable)
Is there any work around to use EL variable and make the message display on the jsp.
i tried multiple ways like scriplets and jsp:useBean but nothing worked, Please let me know..
Thanks in advanceIm pretty sure that EL does not work in the normal struts tag unless its struts-el tag.Have you tried it?
As I said, in a properly configured JSP2.0 container you can use EL expressions anywhere you could traditionally use a standard runtime expression <%= expr %>.
What server are you using? What JSP version?
The Struts-el tags were written so that you could use EL with struts in JSP1.2 containers.
The c_rt tags were written so you could use runtime expressions with JSTL tags in JSP1.2 containers. Their use was discouraged even then. Now I consider their use absolutely unnecessary.
Please read this thread: http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0
Cheers,
evnafets -
I can't give my variable to the get method
Hello togheter
At the moment I work with JDOM. It is possible to get access to an XML File with JDOM, but I want to pass the String I get, to another Method in a different class. My problem is, that my getMethod doesn't get the variable. The variable is always "null". What is the problem, please help me.
I will also give you my code:
Here is the code for class 1, I take the String from this class. See the arrow
package FahrplanXML;
import java.io.File;
import java.io.IOException;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;
import org.jdom.Attribute;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.xml.sax.InputSource;
public class FileAuswahl {
private File filenames;
private String scheduledtdversion;
public void ablauf() throws JDOMException, IOException {
FileAuswaehlen();
saxwer();
grundoberflaeche xmloberflaeche = new grundoberflaeche();
xmloberflaeche.grundoberflaechen();
public void FileAuswaehlen() {
JFileChooser datei = new JFileChooser();
datei.setFileFilter(new FileFilter()
@Override public boolean accept (File f)
return f.isDirectory() ||
f.getName().toLowerCase().endsWith(".xml");
@Override public String getDescription()
return "XML-Files";
int state = datei.showOpenDialog(null);
if (state == JFileChooser.APPROVE_OPTION )
filenames = datei.getSelectedFile();
System.out.println (filenames);
if (filenames != null)
try {
System.out.print(filenames);
saxwer();
} catch (JDOMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
else
System.out.println("Kein File ausgew�hlt");
else
System.out.println("Auswahl abgebrochen");
System.exit(0);
//Ausgew�hlter Dateiname an saxwer �bergeben
public File getNames() {
System.out.println (filenames);
return this.filenames;
public void saxwer() throws JDOMException, IOException {
//FileAuswahl filename = new FileAuswahl();
File files = getNames();
System.out.println (files);
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(files);
Element schedulemessage = doc.getRootElement();
//Root Element auslesen
String sch_msg_dtdversion = schedulemessage.getAttributeValue ("DtdVersion"); // <---
scheduledtdversion = sch_msg_dtdversion;
new grundoberflaeche().grundoberflaechen();
public String getDtdVersion() {
System.out.println (scheduledtdversion);
return this.scheduledtdversion;
} Now, you will see the class in which I pass the String. See also arrow...
package FahrplanXML;
import java.awt.Component;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.text.Caret;
import org.jdom.Attribute;
import org.jdom.JDOMException;
public class grundoberflaeche {
// Layout f�r Laender vorbereiten
static void addComponent (Container cont,
GridBagLayout diversemoegl,
Component laenderdetails,
int x, int y,
int width, int height,
double weightx, double weighty )
GridBagConstraints grundoberflaechen = new GridBagConstraints();
grundoberflaechen.fill = GridBagConstraints.BOTH;
grundoberflaechen.gridx = x; grundoberflaechen.gridy = y;
grundoberflaechen.gridwidth = width; grundoberflaechen.gridheight = height;
grundoberflaechen.weightx = weightx; grundoberflaechen.weighty = weighty;
diversemoegl.setConstraints(laenderdetails, grundoberflaechen);
cont.add(laenderdetails);
//Ausw�hlen des XML Files
public void XMLAuswaehlen() {
JFrame xmlauswahl = new JFrame("Fahrplan ausw�hlen");
xmlauswahl.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container laenderdetails = xmlauswahl.getContentPane();
GridBagLayout diversemoegl = new GridBagLayout();
laenderdetails.setLayout(diversemoegl);
JButton dateiauswahl = new JButton ("Datei ausw�hlen");
addComponent(laenderdetails,diversemoegl,dateiauswahl,1,1,1,1,1,1);
ActionListener ersterdateiauswaehler = new ActionListener()
public void actionPerformed( ActionEvent e)
try {
new FileAuswahl().ablauf();
} catch (JDOMException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
dateiauswahl.addActionListener(ersterdateiauswaehler);
xmlauswahl.setSize(150,70);
xmlauswahl.setVisible(true);
//Layout machen
public void grundoberflaechen() {
JFrame fahrplan = new JFrame("Fahrplanauswahldetails");
fahrplan.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container laenderdetails = fahrplan.getContentPane();
GridBagLayout diversemoegl = new GridBagLayout();
laenderdetails.setLayout(diversemoegl);
//Klassenobjekt aufbauen
FileAuswahl fileauswahl = new FileAuswahl();
// Labelsbauen und einbauen in den Fahrpl�nen
String dtdversion = fileauswahl.getDtdVersion(); // <---
System.out.println(dtdversion);
JTextField DtdVersion = new JTextField(1);
DtdVersion.setText(dtdversion);
JTextField fahrplanzeit = new JTextField(1);
fahrplanzeit.setText("123");
JTextField fahrplanzeita = new JTextField(1);
fahrplanzeita.setText("piips");
//JButton oesterreich = new JButton("�sterreich");
//JButton italien = new JButton("Italien");
//JButton frankreich = new JButton("Frankreich");
//JButton spanien = new JButton("Spanien");
addComponent(laenderdetails,diversemoegl,new JLabel("Fahrplandetails"),0,0,1,1,0,0);
addComponent(laenderdetails,diversemoegl,DtdVersion,1,0,1,1,0,0);
addComponent(laenderdetails,diversemoegl,fahrplanzeit,2,0,1,1,0,0);
addComponent(laenderdetails,diversemoegl,fahrplanzeita,3,0,1,1,0,0);
// Action Listener f�r Dateiauswahl
// Action Listener f�r das Speichern der Datei
//addComponent(laenderdetails,diversemoegl,frankreich,2,1,1,1,0,0);
//addComponent(laenderdetails,diversemoegl,spanien,3,1,1,1,0,0);
fahrplan.setSize(600,750);
fahrplan.setVisible(true);
}Thank you very much for your help....
Your Java LearnerReposted here, rather than bumping up this topic:
http://forum.java.sun.com/thread.jspa?threadID=736492 -
How to use presentaion variable in the SQL statement
Is there any special syntax to use a presentation variable in the SQL Statement?
I am setting a presentation variable (Fscl_Qtr_Var)in the dashboard prompt.
If i set the filter as ADD->VARIABLE->PRESENTATION, it shows the statement as 'Contract Request Fiscal Quarter is equal to / is in @{Fscl_Qtr_Var} '.
And this works fine but when i convert this to SQL, it returns
"Contract Request Date"."Contract Request Fiscal Quarter" = 'Fscl_Qtr_Var'
And this does not work.It is not being set to the value in the prompt.
I need to combine this condition with other conditions in the SQL Statement. Any help is appreciated. ThanksTry this: '@{Fscl_Qtr_Var}'
-
Using a variable for the "format" parameter for disk/directory name
In the interest of maintainability, I'm trying to use an environment variable in the format parameter. I've found that RMAN is able to interpret the $ORACLE_HOME and $ORACLE_BASE variables, but others give the error:
RMAN-03006: non-retryable error occurred during execution of command: backup
RMAN-07004: unhandled exception during command execution on channel t1
RMAN-10035: exception raised in RPC: ORA-07217: sltln: environment variable cannot be evaluated.
RMAN-10031: ORA-19583 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
Is there any more specific documentation about what variables are supported within RMAN? (I've found nothing in the manuals beyond the excerpt I included below.) Does anyone know if the "port-specific directory" mentioned in the excerpt below
can be modified/customized?
Thanks....
format 'format_string'
specifies the filename to use for the backup piece. Any name that is legal as a sequential filename on the platform is allowed, provided that each backup piece has a unique name. If backing up to disk, then any legal disk filename is allowed, provided it is unique. If you do not specify the format parameter, RMAN stores the backup pieces in a port-specific directory ($ORACLE_HOME/dbs on UNIX).i have used a different directory other then port-specific one and i am able to backup .
format '/disk2/app/oracle/test/%d_%s_%t' , i have given full path names instead of substitution variables. i am not sure how
they(variables) will work though in rman. -
Is it possible to use a variable in the name of other variables?
Trying to avoid a long post; is there some command in Java that would allow a variable to be read before the rest of the statement it is in?
For example, using a pair "@" to encapsulate a variable with the mystery command I'm looking for:
*public class Example {*
*public static void main (String[] args) {*
Char variable = "A";
int @variable@_Status = 0;
So that this application would create an integer named "A_Status" and assign it a value of 0. Obviously, I'm not looking to be told that "int A_Status = 0" is the best way to do that, I'd like "variable" to be able to be defined by input or change somehow in the code. I have a gut feeling that this is impossible due to the compiler, but I'd like a more professional opinion. Anyone?The variable "name" is a lot less important than you think. In fact, when your code is compiled, the computer doesn't care one jot about the name of the variable.
You should not worry about trying to do this, but rather should tell us the reason why you would even want this. If we knew that, we could show you a better way, guaranteed. -
I'm using TestStand 2.0/Labview 6i to do a string value test. Is there any way to use a string variable in the edit string value test instead of an actual string?? This forces you to hard code a string to test against.
Hi ART,
You can also use the LimitLoader step to load your string into to step similar to the Numeric Step type.
There should be an example of this in the Resource Library | TestStand
Regards
Ray Farmer
Regards
Ray Farmer -
How can use a variable in the folowing code?
How can use a variable 'W_ROWNUM2' in the folowing code?
MOVE '1' TO CNT.
LOOP AT L_T_PM2.
CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
perform DYNPRO_FIELD using FLD2
L_T_PM2-vari12_con.
CNT = CNT + 1.
CONDENSE CNT.
ENDLOOP.
I need to increment the value of W_ROWNUM2.
Please ,it is urgent!!Hello
CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
Try using spaces between parts of the resulting string.
CONCATENATE 'F110V-VARI' W_ROWNUM2 '(01)' INTO FLD2
Regards
Greg Kern.
Maybe you are looking for
-
Not playing correctly in itunes
hi, I'm having some trouble with itunes that has only started today. I try to play songs and upon double clicking they do not begin to play, even when clicking the play button at the top still no reaction. All of these songs now appear to have "album
-
I've got an Adobe Photoshop CS6 Extended Student and Teacher Edition and serial number doesn't work
I've got an Adobe Photoshop CS6 Extended Student and Teacher Edition and serial number doesn't work
-
My lad has changed my password and now i carnt get on my i pod
My lad has changed my password & now im locked out as he carnt remember it
-
Can adobe patch files be deleted what are they whay do they take up so much space
Can adobe patch files be deleted? What are they and why does it take up so much space?
-
Batch Renaming Event Clips Issue
Hello, I have been trying to batch rename my event clips. I know how to do it with the option and then the gear, and choosing all of the options I want in the title. The problem is, when it renames a bunch of clips it throws them all out of order.