LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Java JSP/Servlet > Tomcat 6/Spring/Struts with AJP

Reply
 
Thread Tools Display Modes
  #1  
Old 10-06-2008, 11:55 PM
apache apache is offline
New Member
 
Join Date: Mar 2008
Posts: 6
Exclamation Tomcat 6/Spring/Struts with AJP

I managed to configure Tomcat with Litespeed few times without any problem and this is my first time to configure Tomcat with Litespeed for a webapp that using spring and struts framework. I'm able to view JSP files but not action name e.g http://localhost/home.meta, it's shows eror 404

Litespeed: 3.3.19
OS: Linux
Tomcat: 6.0.18 with AJP 1.3
Java: 1.6.0


Suffixes: jsp, meta
Handler Type: Servlet Engine
Handler Name: [Server Level]: Catalina

Part of my web.xml as below:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatch er</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.meta</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>


localhost:8009 is working and no error found in log files, any idea guys?
Reply With Quote
  #2  
Old 10-07-2008, 06:30 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You need to add a servlet context for url "/home.meta", regular expression can be used, so LSWS can have an idea which request should be forwarded to servlet engine.
Reply With Quote
  #3  
Old 12-23-2009, 09:14 AM
triedia09
Guest
 
Posts: n/a
Default Tomcat 6/Spring/Struts with AJP

thx for reply naveen,

but I have a doubt with it, is there some thing like Service Provider relating TOMCAT or any other web container...
Reply With Quote
  #4  
Old 12-23-2009, 05:02 PM
Elik Elik is offline
Member
 
Join Date: Nov 2009
Posts: 24
Default Struts issues

Hello,

I am having the same issue as this guy is having for one of my customer. I did follow the details you posted about adding the context for it, so I have it configured as servlet mapping with /*.do to match the web.xml in his directory as follows:

servlet-mapping
servlet-name action /servlet-name
url-pattern *.do /url-pattern
/servlet-mapping

So I have it configured in his virtual host this setting as follows:

1st Context:
WebApp Context Definition
URI /
Location /home/taberuka/public_html/rss/
Servlet Engine [VHost Level]: TomcatAJP

2nd Context:
Servlet Context Definition
URI /*.do
Servlet Engine [VHost Level]: TomcatAJP

But it is still giving errors still at taberukana.com under the two links at the top, for the search. It is shiny blue buttons, which if you click, it returns the search.

When it is accessed at taberukana.com:8080, it works perfectly for it.
Reply With Quote
  #5  
Old 12-26-2009, 06:45 AM
amazert amazert is offline
New Member
 
Join Date: Dec 2009
Posts: 7
Quote:
Originally Posted by Elik View Post
Hello,

I am having the same issue as this guy is having for one of my customer. I did follow the details you posted about adding the context for it, so I have it configured as servlet mapping with /*.do to match the web.xml in his directory as follows:

servlet-mapping
servlet-name action /servlet-name
url-pattern *.do /url-pattern
/servlet-mapping

So I have it configured in his virtual host this setting as follows:

1st Context:
WebApp Context Definition
URI /
Location /home/taberuka/public_html/rss/
Servlet Engine [VHost Level]: TomcatAJP

2nd Context:
Servlet Context Definition
URI /*.do
Servlet Engine [VHost Level]: TomcatAJP

But it is still giving errors still at taberukana.com under the two links at the top, for the search. It is shiny blue buttons, which if you click, it returns the search.

When it is accessed at taberukana.com:8080, it works perfectly for it.
The problem is that there are no working examples available. I also have same problem but there is no working example available on the site.
Reply With Quote
  #6  
Old 12-26-2009, 03:39 PM
Elik Elik is offline
Member
 
Join Date: Nov 2009
Posts: 24
Default Hmmmm

Hmmm...none of the developers able to respond to this issue about this problem?
Reply With Quote
  #7  
Old 12-26-2009, 06:06 PM
amazert amazert is offline
New Member
 
Join Date: Dec 2009
Posts: 7
@Apache
were you able to resolve the issue. If yes, i will be glad if you can share the things you did.
__________________
------

Looking for help
Reply With Quote
  #8  
Old 12-26-2009, 08:46 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
2nd Context:
Servlet Context Definition
URI /*.do
Servlet Engine [VHost Level]: TomcatAJP
The problem is the URI configuration, it does not work like that, you need to use regular expression like

Quote:
exp: \.do$
Reply With Quote
  #9  
Old 12-26-2009, 11:26 PM
Elik Elik is offline
Member
 
Join Date: Nov 2009
Posts: 24
Default Didn't work for this

404 Not Found
The resource requested could not be found on this server! Powered By LiteSpeed Web Server
LiteSpeed Technologies is not responsible for administration and contents of this web site!

That what I get when I changed it to that expression. Note that there is no real files or pages with .do but generated from Tomcat itself for this.
Reply With Quote
  #10  
Old 12-26-2009, 11:56 PM
amazert amazert is offline
New Member
 
Join Date: Dec 2009
Posts: 7
Yup, doesn't work, since java applications often use mapping.

There must be a way where litespeed server can handle the control to tomcat for *.do files even when *.do files actually exists on server on not.

This might be a bug in Litespeed Server, hopefully mistwang may come up with a solution
__________________
------

Looking for help
Reply With Quote
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:19 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.