 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- Published Web Architecture Reference Code for N-Tier Systems?Is there any published system that includes sample source code, that
illustrates a good presentation / business / data layer partitioning of a
web based n-tier application?
The papers and books I have seen all deal with generalizations that are
mostly obvious and aren't very useful in committing something to code.
Everyone agrees that a well structured application should have presentation
layer, business layer, and data layer. The devil is always in details,
and no one publishes details. I want to see code for a large well
structured system that actually holds together and is easier to expand by
virtue of how it implements a layered multi-tier design.
The sample code I have seen, such as Microsoft's multi-tier sample
applications, appear to be completely amateurish efforts by college students
or people with no real commercial code experience. They are mostly
implemented in absolutely random ways that simply trivialize the value of
good architectural layering. I guess they are mainly meant as ways to run
Microsoft APIs.
I'm particularly interested in seeing:
- How authentication is handled, what kinds of cookies are created, and what
kinds of information is stored in each cookie. If authentication protocols
like Kerberos are being used, how are those integrated? Having code to
show just this piece alone would be highly desirable.
- How is the interface between the presentation layer that creates XML and
the business layer that handles business transactions handled, particularly
when the business layer is run on a separate computer? Getting the right
level of granularity in this interface seems hard. If you have all of the
data validation methods in your business layer, your presentation code is
making too many calls into the business layer, and that hurts performance if
you move that business layer to another machine.
--
Will
- 3
- Jre 1.6 and CDEJRE 1.6 Swing app freezes my Solaris 8 CDE desktop with dtwm running
at 100% of the CPU. It works fine with JRE 1.5. Has anyone had such
problem? Any solutions? Thanks
- 5
- Java problemSee my 7-26-07 message. I get an Error message everytime I try to download
Java software: Error 1722. What does that mean?
Ilhan
- 6
- double "^" operations ???...Greetings all,
I am having a hard time performing exponential operations on doubles.
My code looks like
public double getExpon(double a, double b) {
double ans = a ^ b;
return(ans);
}
and I am getting the compiler error:
operator ^ cannot be applied to double,double
double ans = a^b;
Does anyone know why? I am totally bewildered.
- 10
- Wrap text in the list boxHi All
There are four list boxes in four different columns of a row In the
table in a jsp page. this table has a fixed width. But There are few
long items in the fourth list box, that results in the expansion of the
list box, hence table width too. Now due to the specified reason data
is going outside the specified area, hence affecting the view. I'm
using struts framework.
So is there any way to "wrap the text in listbox" OR "set small font
size for the list items".
Thanks
Rahul
- 10
- The Fence Between Heaven And HellJTK <email***@***.com> wrote in message news:<AUgUb.177317$email***@***.com>...
> anoncoward wrote:
>
> > JTK wrote:
> >
> >>>
> >>> Are you telling me that the greatest nation on earth,
> >>> the nation that installed SH in the first place,
> >>> could not think of a single other way of removing him
> >>> than declaring war and invading?
> >>>
> >>> Give me a break. How naive are you guys?
> >>>
> >> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
> >
> > See, that's exactly what I mean - half assed.
>
> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
>
> > You shouldn't even put your foot in the pool
>
> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
>
> > if you don't know how to swim.
>
> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
Oh dear, the prepubescent is having a hissy fit.
Like I said, if you don't know how to swim,
don't get in the pool.
- 10
- A little puzzle involving servlet parameter passingHi all!
Anyone who wouldn't mind helping me out with a servlet interaction puzzle,
please read on!
I'm putting together a piece of a slightly larger database
project involving servlets and an oracle database. The database holds an
inventory of cars being sold and their attributes: Make, Model, Year,
etc...
I've composed a Listing Manager Page that lists the cars up for sale
by a particular dealer by querying the database. There are some "submit"-
type buttons next to each listing that would ideally allow a user to View,
Edit, or Delete a car from the list. In order to perform any of these
functions on a certain car on the list, I've constructed it so that an
attribute (in this case, inventoryno) would have to be passed to another
servlet which will perform the action. My issue lies in the passing of the
appropriate "inventoryno" parameter. A while loop is employed to retrieve
all the listed cars of the dealer. In each iteration of the loop an
inventoryno variable is assigned a value corresponding to the car being
retrieved from the database. However, naturally, at the end of the loop,
only the last car's inventoryno is stored because the previous one is
overwritten. Thus, when I click on, say, the View button for a car that was
NOT the last car retrieved, still only the inventoryno of the last car is
passed to the receiving servlet and the last car is displayed. Therein lies
the bug. How can I implement a solution that would pass only the
inventoryno of the car listed on the page whose View button was pressed?
I've posted my code below in case it helps and you'll notice that I
tried using an array of strings, to no avail.
Thanks in advance for any suggestions!
import java.io.*;
import javax.servlet.http.*;
import javax.servlet.*;
import java.sql.*;
public class ListingManagerServlet extends HttpServlet {
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
//Get the customerid attribute from LoginServlet.
HttpSession session = request.getSession(true);
String id = (String)session.getAttribute("customerid");
out.println("<html>");
out.println("<head><title>Listing Manager Page</title></head>");
out.println("<body>");
out.println("<div align=\"center\"><font face=\"Helvetica\"");
out.println(" size=\"3\" color=\"#db1260\"><h1>Listing Manager
Page");
out.println("</h1></font></div>");
out.println("Welcome! ");
out.println("<br><p><font color=\"#000080\" face=\"Arial\">The
following are your listed items:</font></p><br><br>");
out.println("</body>");
out.println("</html>");
//Load JDBC Driver and connect to the database.
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@server9.engr.scu.edu:1521:dc81";
String dbuser = "coen2802";
String dbpswd = "coen2802";
Connection con = DriverManager.getConnection(url, dbuser, dbpswd);
String query = "select Condition, Make, Model, Year, Category,
Mileage, MSRP, InventoryNo, InvoicePrice, ListingDate from CarsInfo where
CustomerID = '"+id+"'";
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
while (rs.next())
{
int i = 0;
String[] inventoryno;
inventoryno = new String[20];
String condition = rs.getString("Condition");
String make = rs.getString("Make");
String model = rs.getString("Model");
String year = rs.getString("Year");
String category = rs.getString("Category");
String mileage = rs.getString("Mileage");
String msrp = rs.getString("MSRP");
String invoiceprice = rs.getString("InvoicePrice");
String listingdate = rs.getString("ListingDate");
inventoryno[i] = rs.getString("InventoryNo");
session.setAttribute("inventoryno", inventoryno[i]);
out.println("<table border='1' cellpadding='2' cellspacing='0' ");
out.println("width='600' font face=\"Arial\" size=\"2\">");
out.println("<tr bgcolor=\"#EBF0F3\" height=\"302\" ");
out.println("font-weight: bold>");
out.println("<td height=\"16\"><b>Condition</b></td>");
out.println("<td height=\"16\"><b>Make</b></td>");
out.println("<td height=\"16\"><b>Model</b></td>");
out.println("<td height=\"16\"><b>Year</b></td>");
out.println("<td height=\"16\"><b>Category</b></td>");
out.println("<td height=\"16\"><b>Mileage</b></td>");
out.println("<td height=\"16\"><b>MSRP</b></td>");
out.println("<td height=\"16\"><b>InvoicePrice</b></td>");
out.println("<td height=\"16\"><b>ListingDate</b></td>");
out.println("</tr>");
out.println("<tr height=\"302\">");
out.println("<td height=\"16\">" +condition+ "</td>");
out.println("<td height=\"16\">" +make+ "</td>");
out.println("<td height=\"16\">" +model+ "</td>");
out.println("<td height=\"16\">" +year+ "</td>");
out.println("<td height=\"16\">" +category+ "</td>");
out.println("<td height=\"16\">" +mileage+ "</td>");
out.println("<td height=\"16\">" +msrp+ "</td>");
out.println("<td height=\"16\">" +invoiceprice+ "</td>");
out.println("<td height=\"16\">" +listingdate+ "</td>");
out.println("</tr>");
out.println("</table>");
out.println("<table width='20%'>");
out.println("<td>");
out.println("<form
action=\"/carsonline/servlet/ViewServlet\">");
out.println("<input type=\"submit\" value=\"View\"
name=\"V1\">");
out.println("</form>");
out.println("</td>");
out.println("<td>");
out.println("<form
action=\"/carsonline/servlet/EditServlet\">");
out.println("<input type=\"submit\" value=\"Edit\"
name=\"E1\">");
out.println("</form>");
out.println("</td>");
out.println("<td>");
out.println("<form
action=\"/carsonline/servlet/DeleteServlet\">");
out.println("<input type=\"submit\" value=\"Delete\"
name=\"D1\">");
out.println("</form>");
out.println("</td>");
out.println("</tr>");
out.println("</table>");
out.println("<br><br><br><br>");
i++;
}
out.println("<form action=\"/carsonline/jsp/ListingCreation.jsp\">");
out.println("<input type=\"submit\" value=\"Create New Listing\" ");
out.println("name=\"CN1\">");
out.println("</form>");
out.close();
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
out.println(e);
}
}
}
Here is the receiving servlet's code:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class ViewServlet extends HttpServlet {
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
//Get the inventoryno attribute from ListingManagerServlet.
HttpSession session = request.getSession(true);
String inventoryno = (String)session.getAttribute("inventoryno");
//Load JDBC Driver and connect to the database.
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@server9.engr.scu.edu:1521:dc81";
String dbuser = "coen2802";
String dbpswd = "coen2802";
Connection con = DriverManager.getConnection(url, dbuser,dbpswd);
String query = "select Condition, Make, Model, Year, Category,
Mileage, MSRP, InvoicePrice, Engine, Color, VIN#, Description, ListingDate
from CarsInfo where InventoryNo = '" +inventoryno+ "'";
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
while (rs.next())
{
String condition = rs.getString("Condition");
String make = rs.getString("Make");
String model = rs.getString("Model");
String year = rs.getString("Year");
String category = rs.getString("Category");
String mileage = rs.getString("Mileage");
String engine = rs.getString("Engine");
String color = rs.getString("Color");
String msrp = rs.getString("MSRP");
String invoiceprice = rs.getString("InvoicePrice");
String listingdate = rs.getString("ListingDate");
String description = rs.getString("Description");
out.println("<table border='1' cellpadding='2' cellspacing='0' ");
out.println("width='600' font fact=\"Arial\" size=\"2\">");
out.println("<tr bgcolor=\"#EBF0F3\" height =\"302\" ");
out.println("font-weight: bold>");
out.println("<td height=\"16\"><b>Condition</b></td>");
out.println("<td height=\"16\"><b>Make</b></td>");
out.println("<td height=\"16\"><b>Model </b></td>");
out.println("<td height=\"16\"><b>Year</b></td>");
out.println("<td height=\"16\"><b>Category</b></td>");
out.println("<td height=\"16\"><b>Engine </b></td>");
out.println("<td height=\"16\"><b>Color</b></td>");
out.println("<td height=\"16\"><b>Mileage</b></td>");
out.println("<td height=\"16\"><b>MSRP</b></td>");
out.println("<td height=\"16\"><b>InvoicePrice</b></td>");
out.println("<td height=\"16\"><b>ListingDate</b></td>");
out.println("</tr>");
out.println("<tr height=\"302\">");
out.println("<td height=\"16\">" +condition+ "</td>");
out.println("<td height=\"16\">" +make+ "</td>");
out.println("<td height=\"16\">" +model+ "</td>");
out.println("<td height=\"16\">" +year+ "</td>");
out.println("<td height=\"16\">" +category+ "</td>");
out.println("<td height=\"16\">" +engine+ "</td>");
out.println("<td height=\"16\">" +color+ "</td>");
out.println("<td height=\"16\">" +mileage+ "</td>");
out.println("<td height=\"16\">" +msrp+ "</td>");
out.println("<td height=\"16\">" +invoiceprice+ "</td>");
out.println("<td height=\"16\">" +listingdate+ "</td>");
out.println("</tr>");
out.println("</table>");
out.println("<br><br><br><br>");
out.println(description);
}
out.println("<form
action=\"/carsonline/servlet/ListingManagerServlet\">");
out.println("<input type=\"submit\" value=\"Return to Listing Manager
Page\" ");
out.println("name=\"LMP1\">");
out.println("</form>");
rs.close();
stmt.close();
con.close();
out.close();
}
catch(Exception e)
{
out.println(e);
}
}
}
- 10
- About Polling Chat Server (Personal Chatting)Hello,
I am in the process of writing a Chat Server for Intranet.
I completed the message-to-all part of it.
The Server (Polling Chat Server) part of it act in a non-blocking mode,
it creates new connections with the clients, read message from a client
and sends it to all the clients.
The Client part just accepts the message typed on a text field, send it
to the server and appends the message received from the server to a
text field.
This is the global chatting part.
Now I need help about the personal-chatting of the clients.
Each client must be able to chat with any other client which is
connected to the server in the global chatting.
How to carry out this?
Presently both Client and Server are Single-threaded ones.
Can anybody gives me logical flow of the program to carry out the
personal-chatting stuff? I am able to program using non-blocking
ClientSockets.
How many threads will be there on the Server and on client and what
each thread will do?
Please help me ASAP.
-Sameer Shinde
- 13
- South Florida Software Symposium - May 18 - 20, 2007Greetings!
We are happy to announce the South Florida Software Symposium.
The NFJS Symposium Tour is coming to South Florida on May 18 - 20,
2007. Get ready to have three intensive days of learning and
networking.
The No Fluff Just Stuff Software Symposium Series is designed to cover
the latest in trends, best practices, and newest developments in
Enterprise Java, Java/Groovy, ESB/SOA, Ajax, Web Services, Agility,
and Architecture.
Soon we will have available all the conference details at
http://www.nofluffjuststuff.com and http://www.miamijug.org.
This is the first of the many events we are coordinating to have in
South Florida. With your support and our commitment we will see many
more. We are working hard to promote South Florida within the Global
Software Community.
South Florida Software Symposium is brought to you by NFJS and Miami
Java Users Group.
We are looking forward to see you there,
Maudrit Martinez
Miami Java Users Group Leader
email***@***.com
http://www.miamijug.org
"A designer knows he has achieved perfection not when there is nothing
left to add, but when there is nothing left to take away" ~Antoine de
Saint-Exupery
- 13
- HTML llink JEditor paneFolks
I am creating an application where i am getting a file name by
performing a search.
This file name is displayed in JEditor pane.
I want to make this file as a html link ,so when user clicks the link,
it opens the file
Any help
thanks
- 15
- Why Generics?>> It was the C++ weenies, definitely.You're entirely
>> correct: The C++ saboteurs have contaminated Java with
>> generics simply and only to make the language unattractive
>> and cause its ultimate demise. The Java people have been
>> suckered into kissing the Bjarne Stone.
"Mike Schilling" <email***@***.com> wrote in message
news:_vtee.2703$email***@***.com...
> Why C++, in particular? The next version of C# has generics, and the
> current one has auto-boxing, variable-length argument lists, for-loops
over
> collections, etc. Given that Java competes for mindshare with .NET, I
think
> competition with C# is a more likely motive for the 1.5 changes.
Would be the least bit surprised if C++ weenies infected the C# design as
well.
Or it could be that it's not so much as competing for C# mindshare as
competing to get the C++ mindshare. All those people who bought into C++
because it was hyped as the early 90's "it" language and too late realized
what an amazing piece of ATROCIOUS language design it is, and how much
money it is costing them.
Y'know... if I may..this all reminds me of what I see here in my home state
of NH.
In the 80s NH had the 2nd lowest per-capita taxes in the nation and modest
services. In sharp contrast our southern neighbors in Massachussetts had
very nearly the HIGHEST per-capita taxes (source: US Statistical Abstract).
So in the late 80s and 90s, there was a wave of Mass refugees moving to NH
attracted by the lower taxes. And the first things they started to do was
ask for new government services to be added - the sort of things that caused
their MA tax rates to be so high.
It's like they couldn't make the connection between services and taxes.
I think we might see something similar here with Java.
My understanding is that C++ is dying (I wish *I* could be the one to pull
out the feeding tube). Everyone is hearing about the advantages of the
modern languages like C# and Java.
So they're all moving to these other languages and trying to drag their
familiar C++ methods with them not recognizing that it's their ABSENCE that
made Java and C# so attractive.
- 15
- [ANN] JGui 2.01 releasedChanges :
Added four new components:
* HtmlButton
* ShapeButton
* ShapeToggleButton
* TaskPane/TaskPaneContainer
Bug fixes.
About JGui:
JGui includes:
* Docking windows framework
* Dynamic Tree Framework
* ThreadManager - helps to distribute tasks to a number of threads
* TLToolTipManager - shows hidden parts of JTree's and JLabel's cells.
* JShape - not rectangular translucent components.
* Two layout managers: ToolBarLayout and RainLayout :
o ToolBarLayout - was designed for use as LayoutManager for tool bar's
dock container
ToolBarLayout supports horizontal and vertical orientation, supports
multiple rows and can wrap components around if there are not anough
place. Its usage is very simple - all you need to provide is a Point
object as constraint.
o RainLayout also supports horizontal and vertical orientation and
multiple rows.
It can also order components according to to Comparator provided by its
container (target).
* JGuiTabbedPane - a TabbedPane implementation.
o tabs are real JToggleButtons
o don't get lost anymore in dozen of tabs - JGuiTabbedPane provides tab
sorting and filtering
o change tab placement with drag and drop
o vertical tabs orientation for left and right tabs placement
o auto mnemonics
o full keyboard navigation
* JGui provides also easy way to rotate (90 or 270 grad) JButtons,
JToggleButtons and JLabels.
* TabContainer
* ButtonPanel / FoldableButtonPanel
* IconifyBar / TaskBar
* TaskPane / TaskPaneContainer
* GSplitPane - this JSplitPane-like component can be splitted infinitely and
used with both (!) Swing and AWT. GSplitPane is fully integrated into JGui
Docking system.
* ScrollPaneNavigator
* JHistogram
* ImagePanel - this component always has (possibly translucent) border which
makes work with images a bit easier.
* Buttons:
o SToggleButton and SCheckBoxMenuItem - selected state of buttons is
shared through SelectableAction.
o ShapeButton and ShapeToggleButton - buttons with arbitrary shape.
o HtmlButton
--
Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
- 15
- get and set Attribute for EJB Context (Storing objects)Are there any methods like getAttribute and setAttribute off the EJB
Context object like there is for Servlet context?
Currently I did not see any in the API. How then are we supposed to
store objects that we want to exist for the life of the app server and
to be accesible by our beans?
Thanks for any suggestions.
- 15
- war or earhi there, I'm a newbie here. what is the difference between enterprise
archive & web archive? anyone has a url that explains this? also, is there a
complete design specification of the J2EE Petstore application. url anyone?
many thanks. lai...
- 16
- Insert picture in MySQL using JDBCI'm working on a project using Netbeans IDE 5.5 with Visual Web Pack
and MySQL as its database.
The project is about displaying the information about an item selected
by a user from a drop-down list.
I managed to display the information in the database when a user
selected the keyword but don't know how to store picture in the
database and retrieve it to display to the user along with the
information.
I tried to use BLOB, but it didn't work out. Maybe, I did the wrong
way.
Anyone please help me? I really need help.
Thank you in advance.
|
| Author |
Message |
Unagi

|
Posted: 2004-5-4 15:18:00 |
Top |
java-programmer, Jeff and his Trackball
Just seen:
New image of Jeff Relf and His Trackball.
http://www.ottawaathleticclub.com/images/trackballs.jpg
Yes, Jeff, the buttons are falling apart...the contacts worn, the MicroCrud
drivers bit-cracking with every click -- XP has made the TrackBall unusable
-- that's right -- a M$ product, destroying any backwards compatibility to
the insipid FOOLS who purchased a trackball.
BUT you go, you go on, clinging to your track ball -- muttering 'my driver,
my driver' and weeping, near a poorly sealed medical waste canister near
Harborview...
--
W '04 <:> Open
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Defaults for JFileChooser?Any idea how the look and feel mechanism loads the text items for
JFileChooser? I began digging in the source code for UIManager.java,
BasicFileChooserUI.java, and others, and rapidly got lost.
Ultimately a call is made to, e.g.,
UIManager.getString("FileChooser.helpButtonToolTipText", someLocale),
but I can't figure out how the UIDefaults that UIManager uses to locate
this string is actually initialized.
Thanks,
Laird
- 2
- In Swing, using the RTFEditorKit, how to copy/cut Formatting *and* text to the Clipboard?Hi Folks:
Any idea on the best approach to support copy/cut of all style/formatting as
well as plain text for a JTextPane? I googled quite a bit and located a
word processing program that supports JTextPane but they specifically
mention it only places "plain text" to the Clipboard and ignores the
formatting information when transfering.
I was thinking about implementing the Transferable interface and using the
Clipboard.setContents(..) method but I'm not sure yet by which procedure I
implement the getTransferData() as it wants to return an Object. I could
use a byte[] stream and return a ByteArrayOutputStream who's contents would
be filled with the Document's data (ie, plain text *and* the control/style
information). I just don't know if that would work yet but I plan to try
that.
Seems like there's very little (if anything) mentioned in the sun
developer's forum on how to do this as well as in google...
First of all, is Java's support for RTF still somewhat "primative"??? I
have a full blown word processor going which looks like Word and supports
font changes, size changes, find/replace operations, etc... It's just that
the cut/copy only transfers the plain text (despite my attempts to call
setContentType("text/rtf")) to the clipboard and not the style information.
thanks for any insight, Theron
- 3
- Download file problem in netscapeConsider this example..
I have a pdf file which is embedded in the browser and I have a
download link which is used to download that pdf file. When I click on
the download link, it is not functioning since it is the same url as
the embedded pdf and because the adobe reader is already there in the
browser it will automatically opens or the embedded pdf will goes off.
To prevent this scenario, we can use a mechanism. First create a
hidded iFrame in the same window using the following code..
<iframe style="DISPLAY: none" name="iframe1" src="">
Now make a small change to your download link so that the url target
is pointing to the hidden frame as shown below..
<a href="..." target="iframe1">Download</a>
This will solve the problem. However this method will not work with
Internet Explorer. For IE we can use another method and that method
can be choosen automatically by the browser.
More java tips @ http://sourcecentral.blogspot.com
- 4
- Java license explanationCan someone explain to me if Java can be used freely like other
softwares like C++.Perl, PHP or I have to pay for its license once I
used it in programming in a company or in a website or e-commerce.
Is Java really opensource or not?
And so when will be the time you have to pay for its license?
Thanks!!!
- 5
- Painting overHello,
I have written code to generate "Fractal Landscap", we can consider that
it is set of painted in different colors ovals.
Now I would like to paint ON IT. I mean paint star in one part of
"Fractal Landscape", than remove this star and paint it somewhere else.
I dont want to repaint() "Fractal Landscape" because it is very slow,
how to paint on it, without replacing content of Landscape.
thx
M
- 6
- How Can I put XSL tag inside HTML form tag?Hello Dudes,
Sorry I couldn't find a XML/XSL group
I can only post these groups close to my subject.
In JSP (Java Server Page) you can do something
like this
<%
String v = myBean.getValue();
%>
<form .... >
<input name="myTag" value="<%= v %>">
</form>
You can do the similar thing in PHP.
But when I try in XSL I got error.
I have an XML file
<myTag attribute1="value1" />
Now I want to transform it into HTML form tag used XSL template
But XSL doesn't like this
<input name="myTag" value='
<xsl:value-of select="@attribute1" />
'></input>
How can I solve this problem?
Thank Q very much in advance!
- 7
- Newbie-help! API 0 Results = errorpage.jsp, i need the 0 returnedHi,
Im using the Google API in a JSP project which fires off queries to
google. In the returned object im interested in the
getEstimatedTotalResultsCount() statistic, I just need to know how many
results have been returned, including if 0 have been returned.
However, when I enter a term which should produce 0 results the JSP
throws an exception and directs me to the errorpage.jsp instead of
reurning a GoogleSearchResult object with 0
getEstimatedTotalResultsCount().
Other people on this forum dont seem to have this problem.
Would very much appreciate the help.
nickname-at-oppositeOfColdMail.com
- 8
- Problem With ReportViewer ObjectHello,
i have a problem eith the class mencioned in above ( ReportViewer.class) that
i've downloaded and puted in my aplication GUI.
Aparently everything is ok, just in the moment that i try to use that object.
the code that i used is:
void jButton1_mouseClicked(MouseEvent e) {
try{
ReportViewer b = new ReportViewer();
b.setReportName("http://localhost:8080/?report=file:c:
/SAMPLE_REPORTS/BalanceSheet.rpt");
b.setShowGroupTree(false);
b.init();
}catch(Exception e1){
}
.....
the error that appears is:
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
can anybody help me ???
- 9
- print a db field with html tagJ've developpe a java web application (jsp,tomcat,java) and j've used a
replacement for field "textarea" and it work fine but store in a db (oracle)
field information with html tag ... there is a program (freeware or
shareware) can j use to print this field without loss this information?
crystal report is OK but it's too expensive!!!
thank in advance
Marco
sorry for my poor english
- 10
- java.sql.SQLException: ORA-00020: maximum number of processes (100) exceededHello Friends,
I am getting the following error.
java.sql.SQLException: ORA-00020: maximum number of processes (100)
exceeded
I am closing all my resultsets and all my connections in the try
block.
should i close ResultSets and Connections in the catch block aswell?.
or the problem is due to the connection pool settings in weblogic or
on the oracle side instead of in my application.
Thanks in Advance
s
- 11
- Java Fonts under Microsoft JVMHello,
I have an applet which I want to run under various VM's, including the
Microsoft VM that (used to) be part of Internet Explorer.
When I create a font for a component, as so:
setFont (new Font ("DIALOG", Font.PLAIN, 20));
the font show up just right -- it's 20 units high. Except when the applet
is running inside the Microsoft VM, which always shows the same, small,
sans-serif font.
Has anyone else experienced this, and found a workaround?
Thanks!
Gregory Hassett
- 12
- how do I encode image as stringI am trying to pass an image that I am manipulating in a java applet to
a javascript fuction, to be used there as either the source for an img
tag, or to save and/or print. Another possibility is to pass the image
up to a php script for further processing on the server. I know that
you can use ImageIO to save the image to a ByteArrayOutputStream, and
then use the stream's toString to get a string, but passing that string
to javascript truncates the image after the first 4 characters, due to a
null character (hex 0). I have been able to encode the string to
base64, but I do not know if anything more is needed to be done for the
javascript function to use it as an image.
I know that you can embed images in HTML by storing a special string
representation of the image in a javascript variable, but I do not know
what this format is. If I knew this format, I could encode the image in
Java, and then pass this string on. Any one know anything that could
help me?
Darcy Kahle
- 13
- 14
- Download the JAVA , .NET and SQL Server interview question with answersDownload the JAVA , .NET and SQL Server interview sheet and rate
yourself. This will help you judge yourself are you really worth of
attending interviews. If you own a company best way to judge if the
candidate is worth of it.
http://www.questpond.com/InterviewRatingSheet.zip
2000 Interview questions of .NET , JAVA and SQL Server Interview
questions (worth downloading it)
http://www.questpond.com/InterviewQuestions.zip
Core Java and OOP's Interview questions
http://www.questpond.com/OOPsAndCoreJava.zip
Servlets / JSP Interview questions
http://www.questpond.com/ServletsJSP.zip
Architecture Interview Question
http://www.questpond.com/ArchitectureInterviewQuestions.zip
Project Management Interview questions must to read for all aspiring
project managers
http://www.questpond.com/ProjectManagementInterviewQuestions.zip
Full Address book application in C# with technical specification ,
estimation and test cases
http://www.questpond.com/AddressbookProject.zip
Web services Interview questions
http://www.questpond.com/WebServicesAndRemoting.zip
SQL Server 2005 Database optimization Interview questions
http://www.questpond.com/DatabaseOptimization.zip
SQL Server 2005 DTS Interview questions
http://www.questpond.com/DTSInterviewQuestions.zip
SQL Server datawarehoue and Data mining Interview questions
http://www.questpond.com/DatawareHousingandDataMining.zip
SQLCLR Interview questions
http://www.questpond.com/SQLCLRInterviewquestion.zip
SQL Server XML Interview questions
http://www.questpond.com/SQLServerXML.zip
Basic .NET Framework interview questions
http://www.questpond.com/FrameWorkSampleInterviewQuestions.zip
.NET Interop and COM Interview questions
http://www.questpond.com/InteropdotnetInterviewQuestions.zip
ASP.NET Caching Interview questions
http://www.questpond.com/CachingInterviewQestions.zip
Do not know how estimations are done here's a complete book on it
http://www.questpond.com/HowtoPrepareSoftwareQuotations.zip
- 15
- help with multidimensional arraysHi
I am a newbie in the world of Java programming. I have recently started
learning the language. Apart from other hickups one which has been on
my nerves is the concept of multidimensional arrays. As far as my
understanding goes these are array of arrays.
1. WHAT DOES THIS MEAN?
2. ARE ARRAYS RESTRICTED TO THREE DIMENSIONS ONLY OR THERE IS ANY OTHER
LIMIT AND HOW DOES THREE DIMENSIONAL OR HIGHER DIM ARRAYS WORK?
Does two dim arrays represent a pigeon hole type thing in which you
find a particular hole by giving row and column address e,g. box
located at row 5 and column 2.
3. IF THIS CONCEPT OF TWO DIMENSIONAL ARRAYS IS CORRECT THEN HOW DOES
THREE DIMENSIONAL OR HIGHER DIM ARRAYS WORK.
Presently I am going through a book written by Herber Schildt known as
Java 2 complete reference, Following is a program which demonstrates
the two dim arrays. I am unable to understand the make of the program
may be so many loops are troubling me. I am especially confused about
the functioning of the question mark steps please help me out there.
// Demonstration of concept of two dimensional arrays
class twoD {
public static void main (String args [ ]) {
int [ ][ ] twoD = new int [4][5];
int i,j,k = 0;
for (i=0; i<4; i++)
for (j=0; j<5; j++) {
twoD [i][j] = k; ?
k++; ?
}
for (i=0; i<4; i++) {
for (j=0; j<5; j++)
System.out.println (twoD[i][j] + " ");
System.out.println();
}
}
}
4. HOW AND WHY SO MANY LOOPS ARE FUNCTIONING TOGETHER?
(While replying please be patient and keep in mind that u r talking to
an absolute beginner in the world of Java programming)
|
|
|