Apache subdomain redirect into Tomcat

I'm pretty new to Apache HTTP, and sysadmin-ing in general, so i have this question I have a domain (www.doamin.com) with an Apache listening to port 80, also I have an Apache Tomcat on the same domain configured to port 8080.

Is there a way to configure a subdomain (i.e, tomcat.domain.com) so it will redirect into my tomcat specific application, so user can access applications through app1.domain.com and app2.domain.com (and it will be served by Tomcat)?

I've seen a lot of mentioning to

mod_jk

and

mod_proxy

but all of the post assumed prior knowledge with Apache. can someone walk me thorugh?

Many thanks, -PK.

How to Search within json document in apache solr lucene

below is the json sample i have imported to solr where id is unique and json_doc field contains whole json.

{ "id" : "cust_123", "json_doc" : "{ "\first_name\":\"xyz\", \"last_name\":\"ABC\", \"address\":\"#s3,Apple store,New York,USA}\" }" }

Now i want to search within the json document like Apple store as query or New york as query or USA .... and i should get the document ...

Want help to define schema.xml for this kind of request.

if you use space tokenizer then it will tokenize on space ... so if i will search for "apple store" then it will not match ....

Please help me

OpenNLP Name Finder

I am using the NameFinder API example doc of OpenNLP. After initializing the Name Finder the documentation uses the following code for the input text:

for (String document[][] : documents) {

  for (String[] sentence : document) {
    Span nameSpans[] = nameFinder.find(sentence);
    // do something with the names
  }

  nameFinder.clearAdaptiveData()
}

However when I bring this into eclipse the 'documents' (not 'document') variable is giving me an error saying the variable documents cannot be resolved. What is the documentation referring to with the 'documents' array variable? Do I need to initialize an array called 'documents' which hold txt files for this error to go away?

Thank you for your help.

Starting apache fails (could not bind to address 0.0.0.0:80)

Update: Already fixed, it seems that one of VirtualHosts configurations files was wrong in sites-enabled.

I have Ubuntu 11.10

When I run the command to start apache2:

sudo /etc/init.d/apache2 start

I get the following error message:

Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed.

I run this command in order to get the process that is using the port 80:

sudo netstat -ltnp | grep ':80'

Which returns this output:

tcp6       0      0 :::80                   :::*                    LISTEN      1176/

To know which process is I run this command:

ps -wlp1176

That returns:

F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
5 D    33  1176     1  0  80   0 -     0 exit   ?        00:00:00 apache2

But if I try to kill the process:

sudo kill -9 1176

It doesn't kill it, if I run again the netstat command still appears listening and apache start fails.

Any suggestions?