Please help to upload with java servlet
I want to install a java servlet uploader on my web site and i try to do it many times but i can't beacuse i dont know what are the essentials that should be found on the server to install java servlet in right way ..
so please help me to do this .. and tell me what i need to upload files correctly with java servlet .
any help will be appreciated ..
thank you !
Hello newton ..
I only want to know what are the requirments that let me use the java servlet on linux system .. because i want use an uploader using java servlet ..
thank u newton ..
any help will be appreciated
Similar Messages
-
PLEASE HELP!!! using servlet to generate an image in jsp page
Hi,
I am so stuck on this... please help.
I have a servlet that generated a gif image dynamically. It uses a bean that stores the gif image in a byte array.
The servlet outputs the byte data to the output stream. The code is really simple and looks like this:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//HttpSession session = request.getSession();
try {
ServletOutputStream stream = response.getOutputStream();
ImageByteInformation imageByteInfo = (ImageByteInformation) request.getAttribute("imageByteInformation");
response.setContentType("image/gif");
response.setContentLength(imageByteInfo.getByteData().length);
stream.write(imageByteInfo.getByteData(), 0, imageByteInfo.getByteData().length);
stream.flush();
}catch( Exception e){
System.out.println("You are hooped!: " + e.getMessage() + " " + e.toString());
}When I redirect from the dispatch servlet straight to this servlet an image shows up in the browser window.
However when I try to use this jsp page to display the image nothing happens...
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h2>Hello World!</h2>
<img src="servlets/Map24ImageDisplayServlet"/>
//I also tried src/servlets/Map24..., /src/servlets/Map24..., /display, servlets/display
<h2>Did you see the image?</h2>
</body>
</html>My web.xml is here if it helps...
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>HelloProject</display-name>
<servlet>
<display-name>ServletDispatcher</display-name>
<servlet-name>ServletDispatcher</servlet-name>
<servlet-class>servlets.ServletDispatcher</servlet-class>
</servlet>
<servlet>
<display-name>Map24ImageDisplayServlet</display-name>
<servlet-name>Map24ImageDisplayServlet</servlet-name>
<servlet-class>servlets.Map24ImageDisplayServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletDispatcher</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
<error-page>
<error-code>404</error-code>
<location>/404_error.html</location>
</error-page>
<servlet-mapping>
<servlet-name>Map24ImageDisplayServlet</servlet-name>
<url-pattern>/display</url-pattern>
</servlet-mapping>
</web-app>I can never get an image to come up. In fact I can never get the jsp page to run the servlet at all! HELP!!! What am I doing wrong?
Thanks
Edited by: Kind_of_Green on May 5, 2008 3:55 PM
Edited by: Kind_of_Green on May 5, 2008 4:00 PMOK... so you WERE absolutely right about the src path for the image tag.
However I also had another problem that was quite a bit more insidious and mostly just a symptom
of how little I know about what goes on under the hood of a web app.
My bean storing the image info was stored as a request attribute. When the servlet was called from the
jsp page the request object was either reset or just never initialized. Anyway it is not the same request
object I assumed it was being passed in the doGet method. I added my bean as a session
attribute and everything is sparkly :)
I can only assume that when a request is neither forwarded nor included (as is the case with
calling the servlet from the img tag) it is disappeared.
Anyway, thanks a mint man. I so totally appreciate your time.
Ciao :) -
Please help me out with some fundamentals in BW
Hello,
Please guide me regarding the below mentioned questions.
1. what is the key date in query designer.
2. when do we perform attribute change run
like once the master data is loaded then we perform attribute change run and load the transactional data ?
3.what is the disadvantage of using aggregates.
4. what is full repair options?
please help me out with these questionsHI,
Repair full request :
If you indicate a request in full update mode as a repair request, then it is able to be updated in all data targets. This is also true if they already contain data from initial runs or deltas for this DataSource / source system combination, and they have overlapping selections.
Consequently, a repair request can be updated at any time without checking each ODS object. The system supports loading in an ODS object by using the repair request without having to check the data for overlapping or request sequencing. This is because you can also delete selectively without checking an ODS object.
Posting such requests can lead to duplicate data records in the data target.
Hierarchy/attribute change run after loading master data;
When hierarchies or attributes of characteristics change, the aggregate affected by the change can be adjusted manually or calculated automatically in process chains.
Aggregates:
Aggregates are materialized, pre-aggregated views on InfoCube fact table data. They are independent structures where summary data is stored within separate transparent InfoCubes. The purpose of aggregates is purely to accelerate the response time of queries by reducing the amount of data that must be read in the database for a given query navigation step. In the best case, the records presented in the report will exactly match the records that were read from the database.
Aggregates can only be defined on basic InfoCubes for dimension characteristics, navigational attributes (time-dependent and time-independent) and on hierarchy levels (for time-dependent and time-independent hierarchy structures). Aggregates may not be created on ODS objects, MultiProviders or Remote Cubes.
Queries may be automatically split up into several subqueries, e.g for individual restricted key figures (restricted key figures sales 2001 and sales 2002). Each subquery can use one aggregate; hence, one query can involve several aggregates.
If an aggregate has less than 15 components, BW 3.x puts each component automatically into a separate dimension that will be marked as line item (except package and unit dimension); these aggregates are called flat aggregates. Hence, dimension tables are omitted and SID tables referenced directly. Flat aggregates can be rolled up on the DB server (i.e., without loading data into the application server). This accelerates the roll up (hence the upload) process.
Disadvantage : The more aggregates exist, the more time-consuming is the roll-up process and thus the data loading process; the change run is also affected.
Hope this info Helps.
Thanks,Ramoji. -
My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to listen I had to put on loud speaker or to use hands free please help me out with this problem if some body have answer?
Hi Venkata from NZ,
If you are having an issue with the speaker on your iPhone, I would suggest that you troubleshoot using the steps in this article -
If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
Thanks for using Apple Support Communities.
Best,
Brett L -
the apps we have downloaded are not working, please help, extremely frustrated with our ipod 4
See my previous reply for for the apps closing.
For the wifi problem:
Does the iOS device connect to other networks?
Does the iOS device see the network?
Any error messages?
Do other devices now connect?
Did the iOS device connect OK before?
Try the following to rule out a software problem:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Power off and then back on your router
.- Reset network settings: Settings>General>Reset>Reset Network Settings
- iOS: Troubleshooting Wi-Fi networks and connections
- Wi-Fi: Unable to connect to an 802.11n Wi-Fi network
- iOS: Recommended settings for Wi-Fi routers and access points
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
If still problem make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
firefox is not able to load any websites... i tried everything given in the support forum under the topic firefox is not able to load any websites but other programs can.. but still i am facing the same problem. so please help me out with this issue!!
firefox is not able to load any websites... i tried everything given in the support forum under the topic firefox is not able to load any websites but other programs can.. but still i am facing the same problem. so please help me out with this issue!!
-
Please help me out with the function code of print option in module pool
please help me out with the function code of print option in module pool, along with CASE condition.
regards,
asifHi
you can use the Function module
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LP01' "'Printer name
list_name = 'TEST'
list_text = 'SUBMIT ... TO SAP-SPOOL'
immediately = ' '
line_size = '2000'
no_dialog = 'X' "pass space to Pop screen for Print option
IMPORTING
out_parameters = wa_pri_params
valid = w_valid.
"next call below things
NEW-PAGE PRINT ON NO DIALOG PARAMETERS wa_pri_params.
"and try to Print the values inside the new-page
NEW-PAGE PRINT OFF.
Prabhudas -
How to access the activities created by an end user especially when the end user has left the organization?Please help me out with the possible solution
Hi Ramesh,
In the web UI we have business role IC_manger where you can search the activities based on employee responsible and you can use business transaction assignment functionality to assign those activities to any other end user or team.
Else you can also use Agent inbox functionality if you have configure the agent inbox for those activity.
Hope this helps solving your query -
My apple account is disabled, please help me deal with as soon as possible!
My apple account is disabled, please help me deal with as soon as possible!
Change the password, but did not receive the letter to change the password
-
PLEASE HELP!! with this java problem...
Ok so I have this assignment regarding Loan calculations: Compute the Monthly Payments given> the APR, #of payments, and amount borrowed. The formula for this is...P= Cr(1+r)^N / (1+r)^N -1 Where P is aount payable each month, r is APR which needs to be converted into months by /12, N is number of payments, and C is total amount owed. I got this:
import java.lang.Math;
import java.util.Scanner;
public class ComputeSomething
public static void main (String s[])
//obtain input from the user
//validate input
//proceed if input is valid
//process input
//repeat the above four steps until "quit"
Scanner input = new Scanner (System.in);
double payable_amount; // P
double amount_owed; //C
int number_of_payments; //N
double rate; //r
double numerator, denominator;
System.out.print("Enter the value of amount borrowed/owed: ");
amount_owed = input.nextDouble ();
System.out.println ();
System.out.print ("Enter the value of number of payments: ");
number_of_payments = input.nextInt ();
System.out.println ();
System.out.print ("Enter the value of rate as a percentage, e.g., 10 for 10%: ");
rate = input.nextDouble ();
System.out.println ();
rate = rate/(100*12) ;
numerator = amount_owed * rate * Math.pow ((1+rate),number_of_payments);
denominator = Math.pow ((1+rate),number_of_payments) - 1;
payable_amount = numerator/denominator;
System.out.println("The amount payable per month = " + payable_amount);
// // implement the second formula
// numerator = Math.log (payable_amount/amount_owed) - Math.log ((payable_amount/amount_owed) - rate);
// denominator = Math.log (1+rate);
// number_of_payments = (int)Math.round (numerator/denominator);
NOW I have to change it around for the second formula and this is where I am lost cause it has logarithms....This formula goes like this N= ln P/C - ln (P/C-r) / ln(1+r) Where N is the number of monthly payments, C is the sum of actual amount borrowed which is given and r is APR, and P is the monthly payment and ln is the natural logarithm. SO in this formula I have to calculate the NUMBER of payments given the other input.... This project is just a simple command line format so the user just types in the inputs. ALSO there needs to be a command to end the session and the program needs to handle incorrect input too!!
**I dont know how to do the second formula PLEASE HELP ME.....the formulas in picture format are located at http://www.efunda.com/formulae/finance/loan_calculator.cfm**Oh man sorry..what I mean to say is that yes it is a command line type program (no menus) and its going to be in the following format: you type 1 for calculating monthly payments, type 2 for #of payments, and then type 0 to quit. When you type 1 or 2 then the correct formula for each option will then be utilized by asking the input for the fields kinda like this program for a simple fahrenheit to celsius conversion:
import java.util.Scanner;
public class TempConverter
// solution to inclass assignment
public static void main (String s[])
double temp_in_celsius;
double temp_in_fahrenheit;
Scanner input = new Scanner (System.in); // create a connection 'object' to read data from the k/b
// create the menu that is displayed to the user
System.out.println ("Choose 1 to convert temp. from C to F, 2 to convert temp. from F to C and any other value to quit");
int choice = 0;
if (input.hasNextInt ())
System.out.println ("correct data type");
choice = input.nextInt ();
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
// while choice is either one or two, continue; quit otherwise.
while(choice == 1 || choice == 2)
if (choice == 1)
//code for converting temp from C to F
System.out.println ("Enter the value of temp. in the C scale: " );
if (input.hasNextDouble ())
temp_in_celsius = input.nextDouble ();
temp_in_fahrenheit = ( (9/5.0) * temp_in_celsius ) + 32;
System.out.println ( temp_in_celsius + " in degrees C is " + temp_in_fahrenheit + " in degrees F");
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
else if (choice == 2)
//code for converting temp from F to C
System.out.println ("Enter the value of temp. in the F scale: " );
if (input.hasNextDouble ())
temp_in_fahrenheit = input.nextDouble ();
temp_in_celsius = (5/9.0) * (temp_in_fahrenheit-32); //convert the temp to the C scale
System.out.println (temp_in_fahrenheit + " in degrees F is " temp_in_celsius " in degrees C");
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
else
System.out.println ("Quitting");
System.out.println ("Choose 1 to convert temp. from C to F, 2 to convert temp. from F to C and any other value to quit");
if (input.hasNextInt ())
System.out.println ("correct data type");
choice = input.nextInt ();
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
} -
Please help: deploy Bean with "No resource available" error for M:N relationship
Hi all,
I wonder any one comes across with deploying beans with M:N relationship with
"No resource available".
I defined the relationship in ejb-jar.xml and dbms in the
weblogic-cmp-rdbms-jar.xml, but when I deployed the beans I got
the following error
------ Error message-----
weblogic.common.ResourceException: No resources available at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:568) at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:400) at weblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
cator.java:368) at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
ava:166) at weblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
Pool.java:127) at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
Source.java:194) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
ce.java:219) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
ersistenceManager.java:317) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.createDefaultDBMSTab
le(RDBMSPersistenceManager.java:1149) at weblogic.ejb20.utils.TableVerifier.verifyTableExistsAndCreateMaybe(Ta
bleVerifier.java:428) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTablesExist(RD
Unable to deploy EJB: CustomerBean from \ejb:
Errors encountered ''The Container-Managed Persistence Entity EJB failed while
creating its SQL Type Map. The error was: Invalid object name 'localcustomer_localsubscription'.
Severity 16, State 1, Procedure 'IVM_SERVER null', Line 1', 'Error encountered
while attempting to create Default DBMS Table: 'localcustomer_localsubscription'.
Error Text: 'weblogic.common.ResourceException: No resource s available'.''
---------------End error ----------------------
---------------my ejb-jar.xml
<ejb-jar>
- <enterprise-beans>
- <entity>
<ejb-name>AddressBean</ejb-name>
<local-home>customer.LocalAddressHome</local-home>
<local>customer.LocalAddress</local>
<ejb-class>customer.AddressBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
- <cmp-field>
<field-name>addressID</field-name>
</cmp-field>
- <cmp-field>
<field-name>street</field-name>
</cmp-field>
- <cmp-field>
<field-name>city</field-name>
</cmp-field>
- <cmp-field>
<field-name>zip</field-name>
</cmp-field>
- <cmp-field>
<field-name>state</field-name>
</cmp-field>
<primkey-field>addressID</primkey-field>
</entity>
- <entity>
<ejb-name>CustomerBean</ejb-name>
<local-home>customer.LocalCustomerHome</local-home>
<local>customer.LocalCustomer</local>
<ejb-class>customer.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>CustomerBean</abstract-schema-name>
- <cmp-field>
<field-name>customerID</field-name>
</cmp-field>
- <cmp-field>
<field-name>firstName</field-name>
</cmp-field>
- <cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<primkey-field>customerID</primkey-field>
- <query>
- <query-method>
<method-name>findByLastName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
- <query>
- <query-method>
<method-name>findByFirstName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
</entity>
- <entity>
<ejb-name>SubscriptionBean</ejb-name>
<local-home>customer.LocalSubscriptionHome</local-home>
<local>customer.LocalSubscription</local>
<ejb-class>customer.SubscriptionBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>SubscriptionBean</abstract-schema-name>
- <cmp-field>
<field-name>type</field-name>
</cmp-field>
- <cmp-field>
<field-name>title</field-name>
</cmp-field>
<primkey-field>title</primkey-field>
- <query>
- <query-method>
<method-name>findAllSubscriptions</method-name>
<method-params />
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM SubscriptionBean AS o
]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
- <relationships>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalAddress</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomer-Has-LocalAddresss</ejb-relationship-role-name>
<multiplicity>one</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>addresses</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalAddress-Has-LocalCustomer</ejb-relationship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>AddressBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customer</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalSubscription</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomers-Have-LocalSubscriptions</ejb-relationship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>subscriptions</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalSubscriptions-Have-LocalCustomers</ejb-relationship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>SubscriptionBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customers</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
</relationships>
- <assembly-descriptor>
- <container-transaction>
- <method>
<ejb-name>AddressBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>CustomerBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>SubscriptionBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
------------------End of ejb-jar.xml---------------
Please help
Thanks in advance
MikeHi Gaurav,
Other applications used the same the datasource, which I used for this application,
are running fine.
I think there is some bug in the wlserver 6.1 to create the join table. I think
it is the time I should ask the bea wlserver 6.1.
Mike
"Gaurav Khanna" <[email protected]> wrote:
This implies that there are no database connections available. You need
to
check if you can log into your database instance. By default there are
30
connections specified for an instance in Oracle. FYI.
"Mike" <[email protected]> wrote in message
news:[email protected]...
Hi all,
I wonder any one comes across with deploying beans with M:Nrelationship with
"No resource available".
I defined the relationship in ejb-jar.xml and dbms in the
weblogic-cmp-rdbms-jar.xml, but when I deployed the beans I got
the following error
------ Error message-----
weblogic.common.ResourceException: No resources available atweblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:568) atweblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
java:400) atweblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
cator.java:368) atweblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
ava:166) atweblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
Pool.java:127) atweblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
Source.java:194) atweblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
ce.java:219) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
ersistenceManager.java:317) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.createDefaultDBMSTab
le(RDBMSPersistenceManager.java:1149) atweblogic.ejb20.utils.TableVerifier.verifyTableExistsAndCreateMaybe(Ta
bleVerifier.java:428) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTablesExist(RD
Unable to deploy EJB: CustomerBean from \ejb:
Errors encountered ''The Container-Managed Persistence Entity EJB failedwhile
creating its SQL Type Map. The error was: Invalid object name'localcustomer_localsubscription'.
Severity 16, State 1, Procedure 'IVM_SERVER null', Line 1', 'Errorencountered
while attempting to create Default DBMS Table:'localcustomer_localsubscription'.
Error Text: 'weblogic.common.ResourceException: No resource savailable'.''
---------------End error ----------------------
---------------my ejb-jar.xml
<ejb-jar>
- <enterprise-beans>
- <entity>
<ejb-name>AddressBean</ejb-name>
<local-home>customer.LocalAddressHome</local-home>
<local>customer.LocalAddress</local>
<ejb-class>customer.AddressBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
- <cmp-field>
<field-name>addressID</field-name>
</cmp-field>
- <cmp-field>
<field-name>street</field-name>
</cmp-field>
- <cmp-field>
<field-name>city</field-name>
</cmp-field>
- <cmp-field>
<field-name>zip</field-name>
</cmp-field>
- <cmp-field>
<field-name>state</field-name>
</cmp-field>
<primkey-field>addressID</primkey-field>
</entity>
- <entity>
<ejb-name>CustomerBean</ejb-name>
<local-home>customer.LocalCustomerHome</local-home>
<local>customer.LocalCustomer</local>
<ejb-class>customer.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>CustomerBean</abstract-schema-name>
- <cmp-field>
<field-name>customerID</field-name>
</cmp-field>
- <cmp-field>
<field-name>firstName</field-name>
</cmp-field>
- <cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<primkey-field>customerID</primkey-field>
- <query>
- <query-method>
<method-name>findByLastName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
- <query>
- <query-method>
<method-name>findByFirstName</method-name>
- <method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
]]>
</ejb-ql>
</query>
</entity>
- <entity>
<ejb-name>SubscriptionBean</ejb-name>
<local-home>customer.LocalSubscriptionHome</local-home>
<local>customer.LocalSubscription</local>
<ejb-class>customer.SubscriptionBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>SubscriptionBean</abstract-schema-name>
- <cmp-field>
<field-name>type</field-name>
</cmp-field>
- <cmp-field>
<field-name>title</field-name>
</cmp-field>
<primkey-field>title</primkey-field>
- <query>
- <query-method>
<method-name>findAllSubscriptions</method-name>
<method-params />
</query-method>
- <ejb-ql>
- <![CDATA[ SELECT OBJECT(o) FROM SubscriptionBean AS o
]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
- <relationships>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalAddress</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomer-Has-LocalAddresss</ejb-relationshi
p-role-name>
<multiplicity>one</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>addresses</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalAddress-Has-LocalCustomer</ejb-relationship
-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>AddressBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customer</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
- <ejb-relation>
<ejb-relation-name>LocalCustomer-LocalSubscription</ejb-relation-name>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalCustomers-Have-LocalSubscriptions</ejb-rela
tionship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>CustomerBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>subscriptions</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
- <ejb-relationship-role>
<ejb-relationship-role-name>LocalSubscriptions-Have-LocalCustomers</ejb-rela
tionship-role-name>
<multiplicity>many</multiplicity>
- <relationship-role-source>
<ejb-name>SubscriptionBean</ejb-name>
</relationship-role-source>
- <cmr-field>
<cmr-field-name>customers</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
</relationships>
- <assembly-descriptor>
- <container-transaction>
- <method>
<ejb-name>AddressBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>CustomerBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>SubscriptionBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
------------------End of ejb-jar.xml---------------
Please help
Thanks in advance
Mike -
Please help on uploading a CSV file on APEX through file browse
Hi All,
I need to upload a csv file in the table through file browse button.For that i have created the below process and function.This method is working perfectly fine when the file size is small.But i need to upload the file of 16 MB size and when i try to upload that file it gives error wwv_flow.accept error.Any expert of APEX please help me out on this error.As i am very new to APEX and i need to get this done as early as possible.Please provide any solution ,i will be really grateful to the person.
function_
create or replace function hex_to_decimal
--this function is based on one by Connor McDonald
--http://www.jlcomp.demon.co.uk/faq/base_convert.html
( p_hex_str in varchar2 ) return number
is
v_dec number;
v_hex varchar2(16) := '0123456789ABCDEF';
begin
v_dec := 0;
for indx in 1 .. length(p_hex_str)
loop
v_dec := v_dec * 16 + instr(v_hex,upper(substr(p_hex_str,indx,1)))-1;
end loop;
return v_dec;
end hex_to_decimal;
Process_
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_clob_data CLOB := 'anything';
dest_offset NUMBER := 1;
src_offset NUMBER := 1;
blob_csid NUMBER := dbms_lob.default_csid;
lang_ctx INTEGER := dbms_lob.default_lang_ctx;
warning INTEGER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len number := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array wwv_flow_global.vc_arr2;
v_rows number;
v_sr_no number := 1;
BEGIN
delete from scg_recievables2;
-- Read data from wwv_flow_files</span>
select blob_content into v_blob_data
from wwv_flow_files
where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER)
and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- Read and convert binary to char</span>
WHILE ( v_position <= v_blob_len ) LOOP
dbms_lob.converttoclob(v_clob_data, v_blob_data, v_blob_len, dest_offset,src_offset,blob_csid,lang_ctx,warning);
v_char := dbms_lob.getlength(v_clob_data);
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved </span>
IF v_char = CHR(10) THEN
-- Convert comma to : to use wwv_flow_utilities </span>
v_line := REPLACE (v_line, ';', ':');
-- Convert each column separated by : into array of data </span>
v_data_array := wwv_flow_utilities.string_to_table (v_line);
if IsNumber(substr(v_data_array(9),1,1)) = 1 then
v_data_array(9) := substr(v_data_array(9),1,11);
else
v_data_array(9) := '01-JAN-1900';
end if;
v_data_array(9) := NVL(v_data_array(9),'01-JAN-1900');
-- Insert data into target table </span>
EXECUTE IMMEDIATE 'insert into scg_recievables2 (Account_receivable_number, the_account_number, bill_history_tran, service_number, item_type, the_amount_billed, the_remaining_amount,source_of_payment)
values (:1,:2,:3,:4,:5,:6,:7,:8,:9)'
USING
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4),
v_data_array(5),
v_data_array(6),
v_data_array(7),
v_data_array(8);
-- Clear out
v_line := NULL;
v_sr_no := v_sr_no + 1;
END IF;
END LOOP;
END;As noted, this confuses the issue, since a possible answer was posted in the OTHER thread.. Check your server logs, you are probably timing out.. From prior threads with a similar issue:
Have a look at the httpd.conf file (or get your system administrator to look at it) and see what the value of TimeOut is set to. You may need to increase it in order to export large tables via APEX.
http://www.apacheref.com/ref/http_core/Timeout.html
Thank you,
Tony Miller
Webster, TX
A lady came up to me on the street, pointed at my suede jacket and said "Do you know a cow was murdered to make that jacket?"
"I didn't know there were any witnesses", I replied " Now I'll have to kill you too" -
Please help whats wrong with my program(XTAPI+JTAPI)
hi, everybody ,I want to ask one problem about xtapi
i have download xtapi.jar and mstapi from http://sourceforge.net/projects/xtapi/
Now i am unable to understand this statement
terminal = myprovider.getTerminal("0");
i cannot understand wt parameter shuld be passed here if i pass here names of the ports LTP1, H323,etc it gives me exception InvalidArgumentException
i cannot understand what parameter should be passed here if i pass here 2,3,5,6 it works but it does not detect events observer in jtapi
Please tell me wt should i pass here so that i can observe my modem as terminal
Please help me i will be very thankful to you
MY CODE
import javax.telephony.*;
public class InCommingCall {
public InCommingCall() {
* Create a provider by first obtaining the default implementation of
* JTAPI and then the default provider of that implementation.
Provider myprovider = null;
try {
//JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("net.xtapi.XJtapiPeer");
myprovider = peer.getProvider(null);
catch (Exception excp) {
System.out.println("Can't get Provider: " + excp.toString());
excp.printStackTrace();
* Locate the Terminal associated with our near end and place a call
* observer on it. This will instruct the implementation to add a call
* observer once a telephone call comes to the Terminal. We are assuming
* Terminals are named after a primary telephone number on that terminal.
Terminal terminal;
try {
Terminal[] T=myprovider.getTerminals();
for(int i=0;i<T.length;i++){
System.out.println(T.getName());
terminal = myprovider.getTerminal("0");
terminal.addCallObserver(new CallAndDTMFObserver());
System.out.println("Now standing by for phone calls");
catch (Exception excp) {
excp.printStackTrace();
public static void main(String argv[]) {
InCommingCall callReceiver = new InCommingCall();
}Duplicate of:
http://forum.java.sun.com/thread.jspa?threadID=623891 -
Please Help! Problems with Windows Vista 32-bit on Boot Camp (Wireless/Etc)
We recently purchased a new aluminum Mac Book (13 inch) with Leopard (10.5.4). I attempted to install Boot Camp and Windows Vista 32-bit. I can successfully alternate between both operating systems with no problems. However, I am having 2 problems:
1) I cannot connect to wireless internet. No connections will even show up when I attempt to connect, its almost as if an adapter hasn't been installed.
2) I cannot set up the trackpad to do right click.
I've read articles everywhere and nothing has helped. Can anybody please help me??? Any support/advice is greatly appreciated. Thanks in advance!
- PiercedpierceNKC:
Welcome to the Apple discussions.
It appears that you may not have installed the boot camp drivers. Boot into Windows and insert your Leopard installation disk in the CD/DVD drive. This should automatically begin installation of the necessary drivers. Reboot the computer when instructed and all the hardware should work as designed.
The right click is accomplished by placing two fingers on the trackpad and then depressing the trackpad button. This should also work after the drivers are installed as instructed above.
Axel F. -
Can anyone please help me? I haven't the slightest clue on how I would undo emptying my trash with a Mac laptop. I have been told that even though you've emptied your trash, it's never really emptied it can always be found hidden somewhere! I'm hoping that is true. I lost over 6000 photos and videos dating back 8 years :( and to think I was finally organizing them all to back up on an external hard drive lol. Any suggestions much appreciated :)
Well you must stop using the Mac if you want to have any hope of recovering any of them.
Then you are going to need sofware such as list on http://data-recovery-software-review.toptenreviews.com/mac-recovery-software/dat a-rescue-review.html
Yopu will also need another disk for any recovered files
Allan
Maybe you are looking for
-
I have a combo box (combo1), and on changing the value selected in it, a second combo box (combo 2) is displayed on the screen. I need to be able to add some java script code for Combo2, as depending on the value selected in it, some further action h
-
Pragraph format of standard.
In a smartform, we are using standard text. Now I need to choose a paragraph format for this standard text. when I put pragraph format say "P1" in "Std paragraph" box. NO change will get reflected. When gave "P1" in "First paragraph" box only the 1st
-
PSE 9 - how to export online album to web?
Hi everyone - I know all the PSE versions from PSE5 on, but version 9 is driving me nuts :-) Most recently I'm struggling with the online albums - where did the option to publish it to a FTP server go? When clicking "share" I only see "Photoshop Show
-
Cannot change Firefox start page on XP, always Dell Start page.
I cannot change the start page on Firefox on my Dell XP. I can change it on I.E., Seamonkey, and Netscape. Firefox always becomes the Dell/Google start page. I don't have the GoogleAFE nor the Browser Address Redirect programs. I don't have the My Wa
-
I would like to use the data I have in an access database. I can't get it right, the only idea is that I have a page where there are 15 thumbnails, with text from the database. Clicking the thumb would open a page with more information and photo's fr