Ravaa Bal

Ranch Hand
+ Follow
since Apr 15, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ravaa Bal

I'm currently using the instructions found at this website regarding Axis2 and Tomcat (http://codediaries.blogspot.com/2009/02/web-services-example-using-axis-2-and.html), but step 3 says the following:

Compile the code using,

..workspace\Axis2TomcatHelloWorld>javac -d web_bin web_src\*.java

With this I have two qestions.

1) What does javac -d mean? I've used 'javac' but the '-d' is new to me.

2) This doesn't compile for me, probably because I haven't set the java classpaths since I normally rely on Netbeans to do it for me. Would it be possible to execute the above command via Netbeans?

Thanks
14 years ago
Sorry Bear, I'll be sure to keep that in mind. And apologies to everyone else as well as I found it to be due to a simple file extension error. When I saved the index file as a jsp Vista saved it as "index.jsp.txt". I've unchecked the hidden extensions option for Vista so now I'm able to properly edit the extension.

In either case, thanks for the help!

14 years ago
Hi all, I'm using an online tutorial to get to grips on displaying a jsp page using tomcat. The instructions are as follows:

Go to C:\apache-tomcat-6.0.14\webapps\ folder and create a new directory with the name of "star". You can give it any name you want but for this example we'll stick with "star".

Now create a new file and save it as 'index.jsp' in the "star" directory created above. Copy the following text into 'index.jsp' file and save it :

<html>
<head>
<style>p { font-family:tahoma; font-size:14pt; }</style>
</head>
<body>

<%
String name = "Your Name";
%>
<p>Hello <%= name %>!</p>

</body>
</html>

Start Tomcat server and point your browser to http://localhost:8080/star/index.jsp to see the JSP page running.

Except the page doesn't show up for some reason...what am I doing incorrectly?

Thanks in advance
14 years ago
Oh wow, I had no idea lol. Thanks for the help!
14 years ago
Hello all, complete newbie to all this so I'd greatly appreciate any help. I'm following the instructions from a website helping me to work with SOAP with Java, and I'm currently stuck at a part where I need to set the classpath of tomcat.bat to add the xerces.jar file. Here's the site: http://javaboutique.internet.com/tutorials/SOAP/

Here's the set of instructions I'm stuck on:
After you have downloaded the binary distribution of the SOAP version 2.2, unpack it in some folder within your system. Although SOAP can work with any Servlet/JSP container, we will choose Jakarta tomcat 3.2.1 for our model. Once you have the tomcat set up in your system,

* Go to the /lib directory of your soap installation and copy the soap.jar file to the /lib directory of the tomcat installation.
* Get xerces.jar file and place it in the /lib directory of the tomcat installation. Now here is a point. Tomcat already comes with a parser.jar and jaxp.jar. So there will be a potential conflict with the newly installed xerces.jar. To avoid this:
* Edit the tomcat.bat file and go to the section where the classpath is being set. Put he classpath of xerces.jar in front of them so that xerces.jar gets loaded first in the classpath.
* Place the soap.war file from the lib directory of the SOAP binary distribution and place it in the /webapps directory of the tomcat. Once you restart tomcat, this soap.war file will be expanded.
* Now restart tomcat.


I'm not sure how to do this editing bit exactly. Any light shone on the matter would be great Thanks.
14 years ago
Wow awesome, thank you all for your input
14 years ago
Is leaving methods blank considered bad practice? For example in a preset Java interface, there may be a method 'close()' which you won't really need to use for the rest of the program, would it be okay to code it as:

public void close()
{
}

Thanks.
14 years ago
I'm puzzled about the use of public/private/protected/ etc. From what I've read I understand what they essentially do, but I don't see why I should set something to anything other than public if it isn't necessary. Or is it? I'm guessing it has to do with resources, something or other. Is there a very good reason why setting everything to public is a bad idea?

And if it is necessary, should I set every class to private until I find that it needs public access?

Thanks.
14 years ago
Afraid so, as soon as the second sequencer is started after the first one is started the second sequencer 'takes over' the playback. Not quite sure what's going on as sequencers apparently should be able to play at the same time without threads.
14 years ago
lol oh dear, thanks for pointing that out!
14 years ago
Hey guys, I have an issue with interfaces in general (didn't want to create a new topic for it).

If say I wanted to implement Sequencer after all like so:



Why do I get an error highlighting the implement line saying something like this?
"ClassOne is not abstract and does not override abstract method setLoopCount(int) in ...etc etc... Sequencer"

Cheers.
14 years ago
Hi all, apologise for the multiple topics.

If I have a method as so:



And I have two Sequencers obtained in the same class as the above method:


How could I start both of these sequencers at once? I'm thinking along the lines of threads but I'm not sure how to do that with both sequencers and the method...is there a better way?

Thank you.
14 years ago
Yatta!

Thanks Campbell Ritchie, I did something silly and returned a null after a try catch block without having a return *inside* the try catch block.
14 years ago
Hi,



I'm getting the error "non-static method connect cannot be referenced from a static context" in the main method, so I tried something like this:



This fixed that error, but then when ran I got this:

Exception in thread "main" java.lang.NullPointerException
at Connection.connecter(Connection.java:84)
at Connection.<init>(Connection.java:35)
at Connection.main(Connection.java:22)

Any insight on what I could be doing incorrectly would be welcome, thank you.
14 years ago