Problem with passing parameters from HTML
Im unsure as to where to turn next with this problem. What is making it all the more infuriating is that I have had this code working previously and now cant for the life of me figure out how I did it.
What Im trying to do is I have a HTML page with two buttons on, one called "Submit Application" and the other "Submit Resource" and when I click on one I want a JSP page to be called and a certain piece of SQL to be executed, likewise when I click on the other "Submit Application" button I want a separate bit of SQL to be executed. (I know in this example both bits of SQL are identical but that is just while I get the functionality correct).
Whats happening is that the first bit of SQL will execute if I click the "Submit Resource" button, however when I click the "Submit Application"
button I get a "Error 500:" displayed. Im at the end of my tether as to what to do next and as I say it makes it all the more infuriating in that I had it working before. So any help would be greatly appriciated.
The code is as follows, I have highlighted the two IF statements :-
<HTML>
<FORM>
<BODY>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.sql.*" %>
<%@ page import="javax.naming.*" %>
<HTML>
<HEAD>
<TITLE>Resource Level Report</TITLE>
<table width="200" border="1" align="center">
<tr>
<th scope="row"><img src="color_teradata_logo.gif"> </th>
<td></td>
<td><img src="lloydslogo.gif"></td>
</tr>
</table>
<br>
</HEAD>
<BODY leftmargin=0 topmargin=0 marginwidth="0" marginheight="0">
<%
String dbURL="jdbc:oracle:thin:@lloyds.unitedkingdom.ncr.com:1521:smacdev";
String dbUSER="agents";
String dbPW="smac_us";
String Resrce = request.getParameter("Resrce"); String Appln = request.getParameter("app"); String Subres = request.getParameter("Submit Resource"); String Subapp = request.getParameter("Submit Application"); Connection con = null;
if (!Subres.equals (null)) {
try
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection(dbURL, dbUSER, dbPW); } catch(SQLException e) { System.err.println("Failure to connect " + e.getMessage()); }
if (!Subres.equals (null)) {
try
String sqlstring = "Select app.application, res.resorce, res.system, res.status, res.unitofworkname, res.unitofworkvalue, res.capturetimestamp from agents.Resorce res, agents.applicationresource app where res.resorce = app.resorce and res.system = app.system and upper(res.resorce) = upper('"+ Resrce + "') order by 3";
//out.println(sqlstring);
//out.println(Subapp);
//out.println(Subres);
//commented this out, but enable you to see SQL that is been executed !!!
Statement stmt = con.createStatement();
ResultSet res = stmt.executeQuery(sqlstring);
int count =0;
%>
<table width ="380" border="0" align="center">
<h1 align="center">Resource Level Reporting</h1>
</table>
<br>
<table width="200" border="6" align="center" >
<th bgcolor="#FF9933">System<th bgcolor="#FF9933">Resource<th
bgcolor="#FF9933">Application<th bgcolor="#FF9933">Unit Of Work Name<th
bgcolor="#FF9933">Timestamp <th bgcolor="#FF9933">Unit Of Work Value<th
bgcolor="#FF9933">Status<tr>
<%
while (res.next()){
String app= res.getString(1);
String resorce = res.getString(2);
String system = res.getString(3);
String status = res.getString(4);
String unitofworkname = res.getString(5);
String unitofworkvalue = res.getString(6);
String capturetimestamp = res.getString(7);
String timestampmod = capturetimestamp.substring (0,19);
String status1 = status.trim();%>
<% if (status1.equals ("SYNC")) { %>
<tr>
<td bgcolor="#00FF33">
<%out.print(system);%>
<td bgcolor="#00FF33">
<%out.print(resorce);%>
<td bgcolor="#00FF33">
<%out.print(app);%>
<td bgcolor="#00FF33">
<%out.print(unitofworkname);%>
<td bgcolor="#00FF33">
<%out.print(timestampmod);%>
<td bgcolor="#00FF33">
<%out.print(unitofworkvalue);%>
<td bgcolor="#00FF33">
<%out.print(status);%>
<% }
else if (status1.equals ("OOS")) { %>
<tr>
<td bgcolor="red">
<%out.print(system);%>
<td bgcolor="red">
<%out.print(resorce);%>
<td bgcolor="red">
<%out.print(app);%>
<td bgcolor="red">
<%out.print(unitofworkname);%>
<td bgcolor="red">
<%out.print(timestampmod);%>
<td bgcolor="red">
<%out.print(unitofworkvalue);%>
<td bgcolor="red">
<%out.print(status);}%>
<%
res.close();
stmt.close();%>
<tr>
</table>
<%
catch (SQLException e) {
out.println("Sql error here " + e.getMessage());
finally {
con.close();
%>
<%
if (!Subapp.equals (null)) {
try
String sqlstring = "Select app.application, res.resorce, res.system,
res.status, res.unitofworkname, res.unitofworkvalue, res.capturetimestamp
from agents.Resorce res, agents.applicationresource app where res.resorce =
app.resorce and res.system = app.system and upper(res.resorce) = upper('"+
Resrce + "') order by 3";
//out.println(sqlstring);
//out.println(Subapp);
//out.println(Subres);
//commented this out, but enable you to see SQL that is been executed !!!
Statement stmt = con.createStatement();
ResultSet res = stmt.executeQuery(sqlstring);
int count =0;
%>
<table width ="380" border="0" align="center">
<h1 align="center">Resource Level Reporting</h1>
</table>
<br>
<table width="200" border="6" align="center" >
<th bgcolor="#FF9933">System<th bgcolor="#FF9933">Resource<th
bgcolor="#FF9933">Application<th bgcolor="#FF9933">Unit Of Work Name<th
bgcolor="#FF9933">Timestamp <th bgcolor="#FF9933">Unit Of Work Value<th
bgcolor="#FF9933">Status<tr>
<%
while (res.next()){
String app= res.getString(1);
String resorce = res.getString(2);
String system = res.getString(3);
String status = res.getString(4);
String unitofworkname = res.getString(5);
String unitofworkvalue = res.getString(6);
String capturetimestamp = res.getString(7);
String timestampmod = capturetimestamp.substring (0,19);
String status1 = status.trim();%>
<% if (status1.equals ("SYNC")) { %>
<tr>
<td bgcolor="#00FF33">
<%out.print(system);%>
<td bgcolor="#00FF33">
<%out.print(resorce);%>
<td bgcolor="#00FF33">
<%out.print(app);%>
<td bgcolor="#00FF33">
<%out.print(unitofworkname);%>
<td bgcolor="#00FF33">
<%out.print(timestampmod);%>
<td bgcolor="#00FF33">
<%out.print(unitofworkvalue);%>
<td bgcolor="#00FF33">
<%out.print(status);%>
<% }
else if (status1.equals ("OOS")) { %>
<tr>
<td bgcolor="red">
<%out.print(system);%>
<td bgcolor="red">
<%out.print(resorce);%>
<td bgcolor="red">
<%out.print(app);%>
<td bgcolor="red">
<%out.print(unitofworkname);%>
<td bgcolor="red">
<%out.print(timestampmod);%>
<td bgcolor="red">
<%out.print(unitofworkvalue);%>
<td bgcolor="red">
<%out.print(status);}%>
<%
res.close();
stmt.close();%>
<tr>
</table>
<%
catch (SQLException e) {
out.println("Sql error here " + e.getMessage());
finally {
con.close();
%>
</BODY>
</FORM>
</HTML>
I think the error messages I am getting are :-
[15/09/04 12:38:36:535 BST] 45b5f97b WebGroup I SRVE0180I: [SMAC Web Front End] [smac] [Servlet.LOG]: /JSP/Resreports.jsp: init
[15/09/04 12:39:08:510 BST] 7abd7978 WebGroup I SRVE0180I: [SMAC Web Front End] [smac] [Servlet.LOG]: /JSP/Resreports.jsp: init
[15/09/04 12:39:15:273 BST] 7abd7978 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
at org.apache.jsp._Resreports._jspService(_Resreports.java:117)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
You make your comparisons like this:
if (!Subapp.equals (null))
Well, what happens if Subapp IS equal to null. The .equals method call will be called from a NULL and you will get a NullPointerException.
When testing for null you do:
if (Subapp == null) (or if (Subapp != null)
This is okay when dealing objects even with the mantra of 'don't use == to compare objects, because what you are really testing is if the reference points anywhere, and == will compare the reference.
Also, next time you post, make sure to use the [code] tags as described in the [Formatting Help] link. It will make it easier to read.
Also, you should try to remove the SQL from the JSP. Move it into a Servlet which builds a List that forwards to another JSP for display, or use a bean. Using java classes like Servlets and JavaBeans makes it easier to debug, and makes your JSP code easier to manage.
Similar Messages
-
Crystal Report - problem with passing parameters from J2EE app
i'm trying to pass a few parameters from my java application to a crystal report using the code below:
ParameterField pfield1 = new ParameterField();
ParameterField pfield2 = new ParameterField();
Values vals1 = new Values();
Values vals2 = new Values();
ParameterFieldDiscreteValue pfieldDV1 = new ParameterFieldDiscreteValue();
ParameterFieldDiscreteValue pfieldDV2 = new ParameterFieldDiscreteValue();
pfieldDV1.setValue("1056");//dform.getSelectedPeriod());
pfieldDV1.setDescription("termId");
vals1.add(pfieldDV1);
pfield1.setReportName("");
pfield1.setName("@p_termId");
pfield1.setCurrentValues(vals1);
fields.add(pfield1);
// check here for null condition otherwise will throw nullpointerexception
pfieldDV2.setValue("elect");
pfieldDV2.setDescription("allocType");
vals2.add(pfieldDV2);
pfield2.setReportName("");
pfield2.setName("@p_allocType");
pfield2.setCurrentValues(vals2);
fields.add(pfield2);
this report calls a stored procedure (sql server). the report displays the data but the same is not the case when i call ity from my java application. with a single parameter it works fine (even though i get a "Some parameters are missing values" ERROR on the console. But when i pass, say 2 parameters, it give me the above error first and then "JDBC Error: Parameter 2 not set or registered for output"
Can anyone bail me out of this one?
thanks,
ptalkadI don't know about naming conventions, but could the @ signs in the variable names cause a problem?
How have you set up the mapping in Crystal?
Is this parameter 2 an "out" parameter returning a value?
What version of Java are you using?
Version of Crystal?
What JDBC driver? -
Issue with passing parameters from JSP to Backing bean
hi ,
I have an issue in passing parameters from my JSP to backing bean. I want to fetch the parameter from my URL in backing bean .This is how i am coding it right now. But the parameter companyID returns me null.
URL http://localhost:8080/admin/compadmin.jsp?companyID=B1234.
In my backing bean
FacesContext context = FacesContext.getCurrentInstance();
String companyID = (String)context.getExternalContext().getRequestParameterMap().get("CompanyID");
public void setCompanyID(String companyID)
this.companyID=companyID;
public String getCompanyID()
return this.companyID;
faces-config.xml :
<managed-bean-name>admincontroller</managed-bean-name>
<managed-bean-class>com.admin.controller.AdminController</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>companyadminbean</property-name>
<property-class>com.admin.model.AdminBean</property-class>
<value>#{companyadminbean}</value>
</managed-property>
<managed-property>
<property-name>companyID</property-name>
<value>#{param.companyID}</value>
</managed-property>Please let me know if iam missing something.Appreciate your help in advance
ThanksThanks very much for your input. I made changes to my bean accordingly. Actually the method getAdminType() is a not a getter of a property. It's just a method which iam calling in AdminController bean constructor to verify whether the person is System Admin or Client admin. So now the issue is inspite of making changes still the link "Copy Users" shows up for Client admin too which is incorrect.
My Administrator bean:
public class Administrator {
boolean GSA=false;
boolean SA=false;
public Administrator(){}
public boolean isGSA()
return GSA;
public boolean isSA()
return SA;
public void setGSA(boolean value)
this.GSA=value;
public void setSA(boolean value)
this.SA=value;
}My backing bean:
public class AdminController {
private AdminBean adminbean = new AdminBean();
public AdminController(){
int userID=1234;
this.getAdminType(userID);
public void getAdminType(int userID)
Administrator admin = new Administrator();
if (userID<0) return;
try{
if(Rc.isGlobalSystemAdmin(userID)){
admin.setGSA(true);
}else if(Rc.isClientSystemAdmin(userID)){
admin.setSA(true); // i could see these values setup correctly in the admin bean when i print them
adminbean.setAdmin(admin);
} catch (Exception e){ }
Admin Bean:
public class AdminBean {
private Administrator admin;
public Administrator getAdmin()
return this.admin;
public void setAdmin(Administrator admin)
this.admin = admin;
faces-config.xml
<managed-bean>
<managed-bean-name>admincontroller</managed-bean-name>
<managed-bean-class>com.controller.AdminController</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>adminbean</property-name>
<property-class>com.model.AdminBean</property-class>
<value>#{adminbean}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>adminbean</managed-bean-name>
<managed-bean-class>com.model.AdminBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<managed-property>
<property-name>admin</property-name>
<property-class>com.model.Administrator</property-class>
<value>#{admin}</value>
</managed-property>
</managed-bean> My JSP:<h:outputLink id="ol1" value="/companyadmin/copyusers.jsp">
<h:outputText id="ot1" value="Copy Users" rendered="#{adminbean.admin.isGSA}" /><f:verbatim><br/></f:verbatim>
</h:outputLink> so now the issue is thelink copy users is displayed even #{adminbean.admin.isGSA} is FALSE. please advise.
Thanks
Edited by: twisai on Oct 15, 2009 7:06 AM -
Facing Problem with passing Values from One report to another
Hi,
I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
Please, let me know whats going wrong.
Thanks for the help.sorry for the late updation.
My First Report, Summary level is a Pivot Table.
I tried the same report with Table option, the value is passing correctly.
Is there a way to get rid of this situation using Pivot table.
Thanks for your help.
below is the original request.
Hi,
I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
Please, let me know whats going wrong.
Thanks for the help. -
How to pass parameters from html to xacute query
hi experts,
I need to pass a variable from html to xacute query.i need the correct syntax for that .
Thanks in advance.
lokeshHi Lokesh,
I apologize if my message came off sounding rude - passing parameters to queries is fundamental to xMI, one of the basic concepts. I only meant that if you haven't had xMII training, you could benefit greatly
Kind Regards,
Diana Hoppe -
Help with passing parameters from a servlet to an applet
dear all
i m working on a application which will check weather a file is present in a server (webserver) if it is present then it will take the file name and put it into a drop down list and there is a button on click of which i m taking the call to an applet and then on that i need the file name if it is there then i use it to draw a graph
i m struck on how to take parameter from Servlet -> Applet
thanks
Nakulhi,
I understood your question,The context "servlet" cannot communicate to
an applet becoz applet runs at clients browswer, rather you can communicate from an applet to servlet(HTTPURLCONNECTION class).
Well coming to the problem, this is how i have understood your problem,
basically uou get the list of files from the server using normal servelt programing and you will display in an html LIst box and then click the button to view the graph or chart ,
then you just want to pass the filename which is there in the listbox to an applet and applet will display some image.
As we know all that using <PARAM NAME=XX VALUE=YY> WE CAN GET THE VALUE IN APPLET BY USING GETPARAMTER() METHOD. and Im very sure that you are not asking that question. your question is like " both the applets and
the listboxes will be loaded at once and when he selects one of the file from the list box then without refreshing the page , how to display the graph.
Im i right?
If so i guess you have to use javascript to do that stuff, and i think its like gave an id for the tag shown <applet id="yes">
then in the javascript , you can call the Java applet methods (I have never tried before but seen some demos(i dont have that links- google it for inf))
but i can give clue like.. trying the <PARAM VALUE=""> IF POSSIBLE
CHAING THE HTML CONTENT IS POSSIBLE IN IE which is again through javascript by calling yes.innerHTML="<PARAM><PARAM><PARAM><PARAM>..."
Im sure that you can call Java methods from javascript but i never tried and even you can pass an arguments to it.. Let me check out like
becoz even im interested to know abt it
bye
with Regars
Lokesh T.C -
Passing parameters from HTML to forms 9i
I am currently trying to design an application which is called from the web but the application is on forms 9i.
Once the URL is called the user id needs to be entered and then this needs to be passed on to the main form . As I understand it this user id needs to be passed form HTML into the first form on 9i.
Can anyone help me with the way this can be done
Thanks in anticipation
SurojeetThanks for all your replies but I still am not sure. Let me expain my problem in a little detail. I have an apps server which connects to the database using an user id and password. This is what is defined in the formsweb.config.
However the users are given non database userids which are authenticated before they connect to the main form. I need to pass this user id to the main form as i use this user id to write into audit columns , the user id password entered in formsweb.config is fine but the one i am looking for is something that I authenticate with before calling the main form which is not the database userid.
All in all when i enter a user id and password on a webpage and click a button when the url to call the mai n form start working as it has the label associated with the .fmx and defined in the formsweb.config and calls the main form so I need to pass that user id to the main form????
Does this give a better idea of my problem???
Many thanks in anticipation
Surojeet -
Query regarding passing parameters from HTML to oracle forms 9i
I am currently trying to design an application which is called from the web but the application is on forms 9i.
Once the URL is called the user id needs to be entered and then this needs to be passed on to the main form . As I understand it this user id needs to be passed form HTML into the first form on 9i.
Can anyone help me with the way this can be done
Thanks in anticipation
SurojeetYou can do that using PSP ( PL/SQL Server Pages ) using basic autentication. If you want to get information about you can install Oracle 8.1.7 or higher and invoke the following URL : http://localhost and make click in mod_plsql.
[email protected]
Joel P�rez -
Problem with .PDF files from .html files at pagebreaks
I am using DW CS5. When I make a .pdf from the .html file it is not handling the images with captions correctly, or even consistently, at the bottom of the .pdf page.
Here is the Link to the .html code:
http://www.schembs.com/0_PDF_PAGE_PROBLEM.htm
and to the .css, if you need it:
http://www.schembs.com/0_PDF_files/2011_ZachBuch_No_Lines.css
The test page repeats the same image with caption several times.
See at the bottom of page 1. There is not enough space for Image #3 so it correctly puts it at the top of page 2. However it puts the caption for Image #3 in the vertical position as if there were no page break and Image #3 were positioned just below the caption for Image #2. Here is a screenshot of the bottom of page 1:
It then places image #4 below the caption for Image #3, which results in Image #4 being on top of Image #3.
At the bottom of page 2 there is not space for Image #6 so it puts it at the top of page 3. It properly places the caption below Image #6 and properly places Image #7. Here is the bottom of page 2;
At the bottom of page 3 there is not space for all the lines of the caption, so it puts the last line of the caption for Image #8 at the top of page 4. This is o.k. Here is the bottom of page 3:
I can live with it breaking up the caption (not ideal) but not with the caption overwriting the image or images overwriting images.
Thanks very much for your ideas on how to fix this.
jds zigzagHello Jim,
in my IE 8 your website looks great, I don't see any overlaps. To show you what I did, here you can follow and check my proceeding by using my (German) "Adobe Acrobat 9 Pro".
Step 1:
Step 2:
Step 3:
Step 4:
I'm sure that you can understand the used German terms, if not, bitte frage mich nachher noch einmal.
Good luck! (German: Glück auf!)
Hans-Günter
P.S.
Would you say where in one of these countless "St. Alban's" did you find these "Fratzensteine"? -
Problem with return link from html page back to css page
Here is the site..almost ready for publication
http://www.matriley.com/glensite/index.html
1) Go to properties for sale
2)Choose a suberb
3)click on a property with a video
4) watch the crazy video if you like
5) Click go back to properties
^) Yes the page is there but the property page is now
inactive...why?
8)The whole thing works fine on Firefox but we do have this
Glitch on IE
PLEAASSE Can someone help
Regards Matthew [email protected]
Everything works well but for the problem return link to the
properties page after you have gone to the video.The property page
becomes inactiveYour page is a monster -
Empty Cache
10.6K 1 HTML/Text
1.5K 1 Stylesheet File
985.4K 25 Images
997.7K Total size
27 HTTP requests
25 images with aggregate weight of ~1MB is much too large,
you know?
Anyhow, I cannot reproduce your problem in IE7. Are you
referring to IE6,
instead?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"fredbillmatt" <[email protected]> wrote in
message
news:fv0m9k$a7a$[email protected]..
> Here is the site..almost ready for publication
>
http://www.matriley.com/glensite/index.html
>
> 1) Go to properties for sale
> 2)Choose a suberb
> 3)click on a property with a video
> 4) watch the crazy video if you like
> 5) Click go back to properties
> ^) Yes the page is there but the property page is now
inactive...why?
> 8)The whole thing works fine on Firefox but we do have
this Glitch on IE
> PLEAASSE Can someone help
> Regards Matthew [email protected]
> Everything works well but for the problem return link to
the properties
> page
> after you have gone to the video.The property page
becomes inactive
> -
JDBC ojdbc6.jar problem with passing parameters for PreparedStatements.
The JDBC Driver being used in ojdbc6.jar. I am using this driver because I of its compatibility with Java 6 which is on my machine
The database I am connecting to is 10.2 (10g) Oracle database.
The connection works fine its the parsing of the SQL query that is giving the problem Below is the code specific to this
// never mind the syntax this is a JavaFX module and the query syntax doesn't use the '+' concats.
sql = "select sfrracl_pidm,\n"
" sfrracl_term_code, \n"
" sfrracl_source_cde, \n"
" sfrracl_reg_access_id \n"
"from SFRRACL \n"
"where sfrracl_term_code=? \n"
"and sfrracl_pidm =\n"
" (select spriden_pidm from spriden\n"
" where spriden_id=? \n"
" and spriden_id like 'G%'\n"
" and spriden_change_ind is NULL);";
//stmt = conn.createStatement(sql);
try{
ps = conn.prepareStatement(sql);
ps.setString(1, stud_id);
ps.setString(2, term_code);
catch(fr:SQLException)
fr.printStackTrace();
try{
//ps.executeUpdate();
System.out.print('Student ID: ');
System.out.println(stud_id);
System.out.print('Term Code: ');
System.out.println(term_code);
System.out.println(sql);
ps.executeQuery(); // error occurs here
The output and exception thats thrown is below
//debug output
Student ID: GXXXXXXXX
Term Code: 201020
//sql statement thats in string
select sfrracl_pidm,
sfrracl_term_code,
sfrracl_source_cde,
sfrracl_reg_access_id
from SFRRACL
where sfrracl_term_code=?
and sfrracl_pidm =
(select spriden_pidm from spriden
where spriden_id=?
and spriden_id like 'G%'
and spriden_change_ind is NULL);
// end debug output
java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
at sfrracl.Main.buttonOnMouseClicked(Main.fx:215)
at sfrracl.Main.buttonOnMouseClicked(Main.fx:215)
at sfrracl.Main.invoke$(Main.fx:117)
at sfrracl.Main.invoke$(Main.fx:117)
at com.sun.javafx.functions.Function1.invoke(Function1.java:44)
at com.sun.javafx.functions.Function1.invoke$(Function1.java:38)
at javafx.scene.Node.impl_processMouseEvent(Node.fx:2917)
at javafx.scene.Node.preprocessMouseEvent(Node.fx:2946)
at javafx.scene.Scene$MouseHandler.process(Scene.fx:1499)
at javafx.scene.Scene$MouseHandler.process(Scene.fx:1361)
at javafx.scene.Scene.impl_processMouseEvent(Scene.fx:679)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.fx:956)
at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.doMouseEvent(SwingScene.java:446)
at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.mouseClicked(SwingScene.java:454)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
BUILD FAILED (total time: 31 seconds)
The invalid character that this is claiming are the ? marks however that would mean my setString
is not working I am following what the documentation says why is this?http://forums.oracle.com/forums/forum.jspa?forumID=99 is the JDBC forum
-
Problems with passing parameters for WEB template in URL in NW2004s
Servus,
We have NW2004s, BI 7.0, SP9
does anybody know where do I make a mistake? There are 9 variables which the user has to fill out.
Passing the parameters in URL string for a web template like: http://server:50100/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=TEMPLATENAME&var_name_1=ZvarX&var_value_ext_1=2000 ....
but this doesn't function, I get only the first variable screen and not what's set in my URL.
Is it a bug? Any suggestions?
Thank you very much
StandaI solved it.
Solution:
URL Link "http://......./TEMPLATE=nameofthepage&TEMPLATE=nameofthepage
&VARIABLE_VARIANT=nameofthevariant" -
Live view doesn't correctly pass URL parameters from HTML docs?
Running into something that I wonder if anyone else has seen. I've created a site in DW CS5 with a local testing server (XAMPP on Win7), and if I use LiveView to view an HTML page that has a link to a PHP page that includes a URL parameter, the parameter shows up in the LiveView address bar, but the page doesn't seem to use it (trying to display an image where the file is built using $_GET to retrieve the parameter). The same HTML page, displayed in a browser, works. And if I then save the HTML page as a PHP page in DW, identical code, LiveView works. Sure looks like LiveView will does not properly handle URL parameters from HTML documents...
Sorry if I wasn't clear... the navigation works correctly; I get to the page I'm tyring to get to. One of the things that page should do is display an image, the I use a URL parameter to build the image file name to retrieve. The link in the first page is something like <a href="gallery.php?pg=1">. Works fine if the first page (the one I'm navigating from) is a PHP page, doesn't work (with the same code which is only HTML) if the page is an HTML page.
-
Can't pass parameter from HTML form of multipart/form-dta type to JSP
I am using request.getParameter(passed variable name) to pass data from HTML form to JSP with no problem. WHen I try to pass data from HTML form of multipart/form-dta type to JSP as following:
< form enctype="multipart/form-data" name="theForm" method="post" ACTION="http://titan.ssd.loral.com:7778/ifs/jsp-bin/ifs-cts/stringsecond.jsp">
The passed value is null. Why?
How can I pass data successfully from this form to JSP?
How can I pass data from JavaScript to JSP?
Thank youI am using request.getParameter(passed variable name)
to pass data from HTML form to JSP with no problem.
WHen I try to pass data from HTML form of
multipart/form-dta type to JSP as following:
< form enctype="multipart/form-data" name="theForm"
method="post"
ACTION="http://titan.ssd.loral.com:7778/ifs/jsp-bin/if
-cts/stringsecond.jsp">
The passed value is null. Why?because the jsp most likely does not handling of POST parameters like this.
How can I pass data successfully from this form to
JSP?jsp's are not meant to read such amounts of data. this (= uploading) is a typical task for a specialized servlet. there you have full control over input and output. if you need to, you can still forward to a jsp after processing in the servlet.
How can I pass data from JavaScript to JSP???? i'm not sure what exactly you mean. normally you put it into an url and submit it.
robert -
Calling a Stored Procedure with output parameters from Query Templates
This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
We encountered a problem while calling a stored procedure from MII Query Template as follows-
1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
a) Input1 - CLOB
b) Input2 - CLOB
c) Input3 - CLOB
d) Output1 - CLOB
e) Output2 - CLOB
f) Output3 - Varchar2
2. There are two ways to get the output back.
a) Using a Stored Procedure by declaring necessary OUT parameters.
b) Using a Function which returns a single value.
3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
characters)
6. So the method 2-a is ruled out.
7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
Thanks in Advance.
RajeshRajesh,
please check if this following proposal could serve you.
Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
Here is an example how this could be defined.
Package:
type return_cur IS ref CURSOR;
Procedure:
PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
OPEN myReturnCur FOR SELECT val1, val2, val3 FROM dual;
Query:
DECLARE
MYRETURNCUR myPackage.return_cur;
BEGIN
myPackage.myProc(
MYRETURNCUR => ?
END;
Good luck.
Michael
Maybe you are looking for
-
X86 Generic/Text Only Printer Driver
Ive got a HP Thin Client that I need to setup a Epson TM88 Receipt printer on. The issue is the software will only recognise this printer if its setup with the Generic/Text Only Windows Printer Driver which HP decided not to include in the standard i
-
Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.oracle.demos......? I am currently testing a simple sample application with a java code similar to the one shown at the bottom of this post. However during deployment/compilation
-
View what queries have been run in SQL 2005
I've been asked to have a look at building an MI mart from a transactional DB. The source Db is in SQL 2005. The transaction logs are showing that there are approx. 35-40 timeouts per day while the quantity of transactions written is <1000 per day.
-
I recently did an apps update and now the update is locked and I have 15 apps I can't open. Any ideas on what may have caused this and to fix it?
-
working with FCE HD 3, getting the hang of it pretty good. but it keeps crashing. any ideas on ways to cut down on that? i don't run anything processor intensive (e.g. iTunes) at the same time. restarting doesn't necessarily improve things. PowerBook