Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2008, 08:51 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 422
Nicholas Jordan is on a distinguished road
[SOLVED] Web-App not avaliable under ^-N
NetBeans: recent installation.

I have an app that could gain a great relibility boost by seeing how NetBeans would do it. The help files says to do a File/New and select Web Application. All I can see in the wizard is standalone with main(); JSwingDesktop; Library Project; FreeForm Project; and Java Project From Existing Sources.

I just got NetBeans two days ago so it must be current. I have one or two get-going projects underway.

A Forms from example sources.

A Swing app for first MyApp

A Lib I just compiled but do not know where to put.

I have a server with Tomcat up on the open wire, I have no idea whether NetBeans IDE tried to load Tomcat locally, but Tomcat does not show up on the Process List / local development platform.
__________________
Please provide your feedback on our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2008, 12:45 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 257
fishtoprecords is on a distinguished road
Do the NetBeans new -> web app thing, let it generate the code, put "hello world" in it, and make that all run.

Then you can add in real classes to do real stuff
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2008, 02:58 AM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 422
Nicholas Jordan is on a distinguished road
I already have all that ready for drop-in.
Quote:
Originally Posted by fishtoprecords View Post
Do the NetBeans new -> web app thing, let it generate the code, put "hello world" in it, and make that all run.
I have the base jsp page coded, as a simple copy paste of the index page that already works. I have come up with package kitty - so that I will have a package name. I am using TemporaryOrderForm so that I use 'meaningful class names' as a mental note to be sure and not leave this running untested. I have
Code:
public class TemporaryOrderForm extends HttpServlet
with the same base html copy pasted into
Code:
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
and am looking at doPost(..... wondering whether I should just put what I have already in there as getting this MeanBean is so that I can deploy on Tomcat with a reasonably tested prototype.

I have three states:

1/ ship a base html page
2/ Order processing
3/ Flush the order

This stuff is not all that hard to write, it does take some contemplation and I have a great deal of it prototyped already in doPost() as I have it. A short test run on local would make prototyping more effective. Everything I have up now is in /kitty/ on the public server. Everything that comes in to kitty goes to someplace in this project I now have open in NetBeans.

Server level 3 help rewrote my .htaccess and provided pointers on a /kitty/index.html that would point to /kitty/kitty.html - which is where I have the page right now.

What I have in processRequest is the equivalent of kitty.html

I figured out I need to have a final static Character for " to avoid manually escaping literals.

{ choking on Humble Pie: }
Try really hard to focus on loading and testing my first web application, I am hurting to get a simple app up - maybe I will not have to manually fix 193 lines of html again. This is at least the tenth time to do that, I have to get the server to issue something so that I can subject it to wc3 checker and so on. Sometimes simple sample drive the project in unwanted directions.
__________________
Please provide your feedback on our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-04-2008, 03:27 AM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 422
Nicholas Jordan is on a distinguished road
OrderFormRequestObject
Okay, I put OrderFormRequestObject, a simple Java class that does not extend something in the Libraries and serves OO by putting the Order Form Request Infomation all in one place copy-pasted onto a source code file generated by using the wizards. The IDE has not found anything wrong with it but I am totally commited that it will want to refactor this and other things. I have line 105 through 197 slapped up there as doPost and the thing is moanin already because some of the placeholder stuff is not used, probably will show up now that I have doPost copy-pasted over.

I would not load someone else like this, fishtop, it is just that you have some miles already with me on this, I know you can keep the kittens and the mice separated.
__________________
Please provide your feedback on our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-04-2008, 05:33 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 257
fishtoprecords is on a distinguished road
Hmmm, Just to keep in sync, I fired up my NB 6.1 setup and I can't find Tomcat. I'll have to look. I remember that NB 6.* had a new 'feature" where TomCat wasn't as transpartent as it was in 5.5.

More as I know more
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 07-04-2008, 06:00 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 257
fishtoprecords is on a distinguished road
Yep, seems they have a new "feature" and tomcat is not there by default. Sorry.

This may help get you going.
NetBeans Wiki: InstallingNetbeans6.0OnUbuntu7.10
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 07-04-2008, 07:30 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 422
Nicholas Jordan is on a distinguished road
features are fearless
Quote:
Originally Posted by fishtoprecords View Post
Hmmm, Just to keep in sync, I fired up my NB 6.1 setup and I can't find Tomcat. I'll have to look. I remember that NB 6.* had a new 'feature" where TomCat wasn't as transpartent as it was in 5.5.
I did a right-click on context drop down menu that said ( basically - I do not have it open right now ) Run it! and it fired up a server and took over one of the five or ten browser windows I had open. Presumably the one it works from normally as I did not loose anything I had open. The kitty page came up right there looking rather normal. I will place some comment markers in html comments in each of the doGet / doPost methods so I can differentiate the get requests being served from the doGet or doPost calls in the servlet.

Design logic hinges on doPost looking for some name values an just passing to doPost if things do not match up. Amazing that the tool spotted I had not made an accessor method for the Map, but did not force a recompile and book buy. I think they're sneaking up on me. ( humor, folks - fishtop can deal with it I assure you )

I saw doGet calling the base service method where I had placed what was essentially the same html as the static kitty.html. I do not care whether this html is served from the servlet or static html when it gets on the commercial open wire ~ code has to remain almost totally in sync there or I lose my path of control design logic. State machine is we are either in service on an active transaction with a human who can think or we are serving static html :: one or the other but not both.

I had spec'd to use Tomcat during the install.
__________________
Please provide your feedback on our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 07-04-2008, 07:46 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 422
Nicholas Jordan is on a distinguished road
Feature or fissure?
Quote:
Originally Posted by fishtoprecords View Post
This may help get you going.
I was smart enough to select tomcat in the install, I also probaly selected the kochi thing as a servlet mapping because I had read about servlet mapping and so on in Marty Hall's book.

What I need help on right now is assistance finding the 'Make avialable Globally to all Projects' PayPal's drop in Mason Jar by dropping it into the correct directory so that I can begin reading their developer docs and sign up for the sandbox prototyping area.

Putting it in the libs dir for this paticular project is totally acceptable. I already put a libs dir in this project ( kitty / kochi ) on the advice of the IDE so that it could JUnit test. That would be not hard to find and as well as avoid cluttering the global development space. I have made this mistake before, what I want to avoid is having the IDE take over some dir on some place on my machine that it has no business fiddling with. The Mason Jar is zipped.

{ Mason Jar is VanHook's Shell Hook library. }

edit: this is the kit I obtained:
Code:
//PayPal_Java_WPS_Toolkit.zip
somewhere else before I arrived at that point I read the libs are shipped as a drop in jar. I have not backtracked to where I read that or found it. They use BC, I saw that already.
__________________
Please provide your feedback on our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Last edited by Nicholas Jordan : 07-04-2008 at 08:19 PM.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 07-05-2008, 03:34 AM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 422
Nicholas Jordan is on a distinguished road
to stay within sight of each other
Wrote this this afternoon, about to saturate. Simple helper class. One of those things I might get hammered on later. Fixed the static synchronized accesssor in the serlvet / sevice ~ I had left off when I was about to write an accessor method and laid down for a few hours to get the IDE functional. When I loaded the doPost in the IDE the fancy tool spotted it with all the nervous flitter that makes it glitter. Commented out some other placeholders, will be studying some other packages I looked at today. Looks promising for kitty. This is a utility class that has some tangential to the other thread about the schduler. I place it here because this work was from scratch in the IDE. Getting this much done in one of those things in one afternoon requires I keep the other tools handy.

Sometimes crossovers find things, they do it in accounting.

Code:
package kitty; /** * Discussion of opinion in a technical forum. * No legitimate derivative use. */ public class Background extends java.util.TimerTask { java.security.SecureRandom sr;// java.util.LinkedList<Integer> victor = new java.util.LinkedList<Integer>(); java.lang.Boolean isValid;// java.lang.Boolean isLoaded;// java.lang.Integer size; public Background(int size) { this();// if(this.isValid.booleanValue()) { this.size=new java.lang.Integer(size);// return; } else { this.size=new java.lang.Integer(0); } } private Background() { super();// try { sr = java.security.SecureRandom.getInstance("SHA1PRNG");// this.isValid=new java.lang.Boolean(true);// } catch(java.lang.Exception e) { this.isValid=new java.lang.Boolean(false);// } } // Determines valid state of this. public synchronized boolean validState() { return Background.this.isValid.booleanValue(); } // Cancels this timer task. public boolean cancel() { return super.cancel(); } // The action of this timer task is the generation of SecureRandom Integers // for use in authenticaion and session management. This is in addition to // the server's idea of a session. We could do if victor.size() < minSize or // otherwise replenish the cache here if we want to do scaleable work during // prototyping. That's one of those where experience either rules or can help. public void run() { if(Background.this.validState()) { if(Background.this.size.intValue() > 0) { int index = 0;// do { Background.this.victor.add(new java.lang.Integer(sr.nextInt()));// } while(++index < Background.this.size.intValue()); Background.this.isLoaded = Boolean.valueOf(true);// } } else { Background.this.isLoaded = Boolean.valueOf(false);// } } public synchronized boolean Loaded() { if(Background.this.isValid.booleanValue()) { if(Background.this.isLoaded.booleanValue()) { return true;// } else { return false;// } } else { return false;// } } //Returns the last time this was run public long scheduledExecutionTime() { return super.scheduledExecutionTime(); } // Pull an int from the fifo. public synchronized Integer getInteger() { if(Background.this.isValid.booleanValue()) { if(Background.this.isValid.booleanValue()) { if(Background.this.victor.size() > 0) { // Ahhh,..... return Background.this.victor.removeFirst(); } } } return new Integer(0); } }
We have a design flaw that could creep in pulling elements and so on. Details.
__________________
Please provide your feedback on our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Last edited by Nicholas Jordan : 07-05-2008 at 04:07 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +3. The time now is 04:59 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org