Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Naveen Akshaye

Greenhorn
+ Follow
since Apr 12, 2009
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 Naveen Akshaye

Any guy have suggestions?

Thanks in advance.
11 years ago
Hi,

I am using antenna to build my J2ME application and I want to deploy application to my servlet server.
I configured correct settings for wtk.home, antenna.home. The antenna works well except the wtkdeploy, it always gives me this error message:
/home/naveen/development/eclipse/ant/build.xml:59: java.io.IOException: Internal Server Error (500)

The target of deploy is as follows:
<target name="deploy" depends="package">
<wtkdeploy jarfile="${release.dir}/${midlet.name}.jar"
jadfile="${release.dir}/${midlet.name}.jad"
target="${deploy.target}"
login="${username}"
password="${password}"
delete="${do.delete.on.deploy}">
</wtkdeploy>
</target>

The other targets such as wtkbuild, wtkjad, wtkpackage work very well except this one.
When performing this target, I checked the tomcat logs, it shows as:
127.0.0.1 - - [05/Sep/2009:14:59:35 -0400] "PUT /antenna/firstMIDlet.jar?delete=false&login=admin&password=admin HTTP/1.1" 500 1641

The servlet is at http://localhost:8181/antenna. I followed the instructions at antenna website to setup servlet (copy web.xml from etc dir into WEB-INF, copy antenna-bin.jar into WEB-INF/lib), but didn't work it out. Errors are always there. Didn't figure out how to upload the packaged suites to the web server.

Any body can give some ideas what could the problem be?

Naveen.
11 years ago
Hi all,

I'm using Netbeans 6.7 to write servlets and depoly to Tomcat server 5.5, but everytime the deployment failed. It always outputs the following error message:


The servlet file is a very simple one, and the build of the project is successful to generate the WAR. The tomcat server works well if I manually copy the .war file into the "webapps" folder. The catalina base and appBase is set to one folder under my $HOME directory, so that I have the privilege to write. However, the Netbeans always failed to deploy it into server. I have specified correct locations for $CATALINA_HOME and $CATALINA_BASE in server configuration. I also tried the default system configuration, got the same error msg.

Anyone has idea about this?

Thanks,
Naveen.

Joe Ess wrote:

Naveen Akshaye wrote:Hi,
The default tomcat webapp folder is /var/lib/tomcat5.5.



I believe the default webapp folder is /var/lib/tomcat5.5/webapps, at least it is on my Ubuntu server.
As for changing CATALINA_BASE, it is defined in catalina.sh as: "Base directory for resolving dynamic portions of a Catalina installation. If not present, resolves to the same directory that CATALINA_HOME points to", so that is not what you are looking for either.
What you probably want to do is change the appBase attribute of the Host tag in server.xml. You could also configure the docBase in a web application context. This would let you control the directory on a per-application basis.



Yes, you are right. The default webapps folder is /var/lib/tomcat5.5/webapps associated to virtualhost of "localhost:8180".

I want to put all my web projects under another location. Although I can create a link of it under "/var/lib/tomcat5.5/webapps", I want to separate my data from system's apps on "localhost:8180". So I want to create a different virtual host listening to the port 9029 and with the docBase being another location like "/home/naveen/mywebproject/webapps".

Here is what I have done, but didn't work it out.
1. I installed apache connector package: libapache2-mod-jk, and configured it with worker properties. (Prerequisites of package installation are finished, apache, tomcat, apache connector)

2. I created a virtual host under /etc/apache2/sites-enabled/tomcat-host with following content:

When I go to "localhost:9029", it lists out all files under this folder. It's not what I expected.

3. I edited the file of /etc/tomcat5.5/server.xml


4. I checked the folder under /etc/tomcat5.5/Catalina, there is only one folder of "localhost". I know that's for use of default tomcat application which is under "/var/lib/tomcat5.5/webapps". There are xml files in which I can specify the docBase element. But even though I can change the "ROOT.xml" to point the root path to my project folder, the application deployed in this way is actually still on virtual host of "localhost:8180", which is not what I expected, "localhost:9029". Do I need to create another folder with different host name?

Really appreciate of any helps.

Thanks.
Naveen.
11 years ago
Hi,

I'm setting up the tomcat web container, with the apache-connector on debian.

The default tomcat webapp folder is /var/lib/tomcat5.5.

I wonder how to change the default folder into another location where I usually save my personal project data, like $HOME/webproject.

Is it enough to change the CATALINA_BASE="/var/lib/tomcat5.5" to CATALINA_BASE="$HOME/webproject"?

I read some articles on Internet, there is another step to install apache-connector, I also installed, and created a new virtual host for tomcat, and set the directory of my webproject as the documentroot for apache to recognize. But it turns out no effect. When I start apache, and enters the url "http://localhost:9029"; (9029 is the port I set for tomcat virtual host use in apache), it lists all files under the folder. It doesn't look to me that it is interpreting any pages.

Any one can help with this, to customize the default webapp directory?

Thanks very much.
Naveen.

11 years ago

Jeanne Boyarsky wrote:Naveen,
As far as books go, "Head First Servlets/JSPs" and "EJB 3 in Action" are both excellent, easy to read and good for peole new to the topic. The official tutorial is ok, but it's book length and somewhat dry to read.

The tools you use don't matter if you like to explore - which is good to do in any case. If you like following instructions verbatim, you are better off using the tools the tutorial/book describe.



Thanks for your recommendations, Jeanne.

I'll start from "Head First Servlet/JSPs", and then "EJB3 in Action".

Jeanne Boyarsky wrote:Naveen,
As you've noticed Java Enterprise Edition consists of many pieces. I think the best way to go about it is to learn one piece at a time. My suggested order:

  • servlets/jsps - this is the most common part of JEE (If you are only going to be working with back end components, you can skip this
  • packaging structure - how things fit together and get built
  • ejb 3 session beans - basic components
  • ejb 3 jpa - optional if you'll be using it
  • ejb 3 message driven beans - optional if you'll be using it


  • Thanks very much, Jeanne. I have two more questions about this learning path.

    1) I just wonder if there are any good guides for each section. I searched on Google and found some one recommending the online tutorial by Sun Microsystems:http://java.sun.com/j2ee/1.5/docs/tutorial/doc/. The PDF file is about 1126pages. Is this tutorial good for learning?

    Otherwise I have to get tutorials for each section: Servlet/JSP, EJB3 (Session Bean, Entity Bean), any recommendations?

    2) Sun's tutorial uses the Netbeans and Sun's Application Server as development environment. Does it matter very much if I use another one. Because I want to use Eclipse and JBoss as my working environment. I don't know if there are much differences and if it's easy to change from one to the other.

    Best wishes,
    Naveen.

    Hi Friends,

    I'm a student working in research area of Java Component security. Now I'm starting to learn more about JEE technology that contains the core component technology. I only learned J2SE before and passed SCJP. I I read the overview of JEE technology, there are so many things that I don't know where to start.

    Could anyone give any advices of how to start learning JEE quickly (I mean as quick as I can)?? Any roadmaps with guides and resources are really appreciated.

    Thank you very much.
    Naveen.
    11 years ago
    Hi Friends,

    I'm a student working in research area of Java Component security. Now I'm starting to learn more about JEE technology that contains the core component technology. I only learned J2SE before and passed SCJP. I I read the overview of JEE technology, there are so many things that I don't know where to start.

    Could anyone give any advices of how to start learning JEE quickly (I mean as quick as I can)?? Any roadmaps with guides and resources are really appreciated.

    Thank you very much.
    Naveen.