HTTP Request redirect problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere HTTP Server > HTTP Request redirect problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    HTTP Request redirect problem  
druide24


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-28-04 05:33 PM

Hi,

I have installed WAS 5.1 + IBMHttpServer 1.3.26 on the same machine ( Linux 
Red Hat 8.0 ). Then i have developped a J2EE Application with an EJB module 
and a WEB module, with "/" as the root context.

Everything is working fine except except this :

I have a file system directory with PDF files ( let's say /home/j2eeProject/pdf ), and 
i want to access to any of these files with [url]http://myServer/pdf/myPdfFile.pdf[/url
] ( it seems quite simple but ... )

My PDF files are likely to be updated regularly using FTP, and I don't want 
to redeploy my Web component each time i make a change. That's why i didn't 
put that directory in my WEB module. Besides, I would like my Web server to 
serve directly my PDF files
without passing by the application server !

So, i created a "/pdf" Alias on the Web server that points to my directory.

Unfortunately, and because my web module context root is "/", every URL pass
ed to the web server and beginning with "http://myServer/" is redirected to 
the Application server, and my "/pdf/" Alias has no effect at all ! ( error 
404 )

Does anyone have an idea how to config my Web Server / Application Server or
 plugin-cfg.xml file in order to redirect all HTTP requests beginning with "
http://myServer/" to the application server except the ones beginning with "
http://myServer/pdf" ?

Thanks.





[ Post a follow-up to this message ]



    Re: HTTP Request redirect problem  
Sunit Patke


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-28-04 06:33 PM

Create a symbolic link between /home/j2eeProject/pdf  and  <web application
root>/pdf
This will get you going i.e. pdf files will start being served but it will
be the appserver that will serve the pdf files and not the HTTP server.

Sunit

"druide24" <druide@akiway.com> wrote in message
news:1073773145.1083169428869.JavaMail.wasadmin@swg3ws006...
> Hi,
>
> I have installed WAS 5.1 + IBMHttpServer 1.3.26 on the same machine (
Linux Red Hat 8.0 ). Then i have developped a J2EE Application with an EJB
module and a WEB module, with "/" as the root context.
>
> Everything is working fine except except this :
>
> I have a file system directory with PDF files ( let's say
/home/j2eeProject/pdf ), and i want to access to any of these files with
http://myServer/pdf/myPdfFile.pdf ( it seems quite simple but ... )
>
> My PDF files are likely to be updated regularly using FTP, and I don't
want to redeploy my Web component each time i make a change. That's why i
didn't put that directory in my WEB module. Besides, I would like my Web
server to serve directly my PDF files without passing by the application
server !
>
> So, i created a "/pdf" Alias on the Web server that points to my
directory.
>
> Unfortunately, and because my web module context root is "/", every URL
passed to the web server and beginning with "http://myServer/" is redirected
to the Application server, and my "/pdf/" Alias has no effect at all ! (
error 404 )
>
> Does anyone have an idea how to config my Web Server / Application Server
or plugin-cfg.xml file in order to redirect all HTTP requests beginning with
"http://myServer/" to the application server except the ones beginning with
"http://myServer/pdf" ?
>
> Thanks.







[ Post a follow-up to this message ]



    Re: HTTP Request redirect problem  
Aaron W Morris


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-30-04 08:33 PM



druide24 wrote:

> Hi,
>
> I have installed WAS 5.1 + IBMHttpServer 1.3.26 on the same machine ( Linu
x Red Hat 8.0 ). Then i have developped a J2EE Application with an EJB modul
e and a WEB module, with "/" as the root context.
>
> Everything is working fine except except this :
>
> I have a file system directory with PDF files ( let's say /home/j2eeProject/pdf ), an
d i want to access to any of these files with [url]http://myServer/pdf/myPdfFile.pdf[/u
rl] ( it seems quite simple but ... )
>
> My PDF files are likely to be updated regularly using FTP, and I don't want to red
eploy my Web component each time i make a change. That's why i didn't put that direc
tory in my WEB module. Besides, I would like my Web server to serve directly my PDF 
fil
es without passing by the application server !
>
> So, i created a "/pdf" Alias on the Web server that points to my directory
.
>
> Unfortunately, and because my web module context root is "/", every URL pa
ssed to the web server and beginning with "http://myServer/" is redirected t
o the Application server, and my "/pdf/" Alias has no effect at all ! ( erro
r 404 )
>
> Does anyone have an idea how to config my Web Server / Application Server 
or plugin-cfg.xml file in order to redirect all HTTP requests beginning with
 "http://myServer/" to the application server except the ones beginning with
 "http://myServer/pdf" ?
>
> Thanks.

You can turn off file serving on the application server.  That will
force the web server to serve static content and only JSPs and servlets
will be passed to the application server.

--
Aaron W Morris <aaronmorris@mindspring.com> (decep)






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:43 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register