http status- 404 "/j_security_check", for accessing a remote application

Hi,

I have 2 web applications A and B.

In web app A i have a servlet which takes all the requests and processes it.

and the ur mapping for this servlet in web.xml is

<servlet-mapping>

<servlet-name>testservlet</servlet-name>

<url-pattern>/</url-pattern>

</servlet-mapping>

for each and every request the servlet internally opens a urlconnection to application B with the given uri and query string and writes the response back to the client.

I have given a request for index.jsp

http://host:port/A/index.jsp

servlet opens a url connection like "http://host:port/B/index.jsp", but the application B has secured with Form based authentication it throws login page of application B, which will be written back to the client of A by the servlet.

when I given the username, password and press enter, it has to be processed by servlet on A and need to open a connection for B, but I am getting a error saying that "HTTP Status 404 - /j_security_check"

Appserver I am using is Sun Java System Application Server 8.1 2005Q4

OS windows XP

Your help will be greatly appriactied.

Thanks in advance.

[1227 byte] By [Gudalaa] at [2007-11-14]
# 1
Here I am proxing requests from A to B.
Gudalaa at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 2

What you observe is normal - you are effectively trying to make a user of one web application to be authenticated with another one. This is forbidden by the servlet spec.

You should simply keep all your sessions within the same web application by repackaging your 2 web apps into a single one. See also this thread where sharing sessions between 2 web apps is discussed: http://forum.java.sun.com/thread.jspa?threadID=5100931&tstart=0

Sultala at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 3
Txs for the response, but the same approach is working fine with Sun One 7 and Sun One 8.2I am facing the problem only with Sun One 8.1.
Gudalaa at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 4
The above applications also working in WAS5.1, 6 and Web Logic 8.x
Gudalaa at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 5
Then it might be a bug in appserver 8.1. There are a few login/security related bugs fixed in recent appserver 8.1ur2 patches. You might want to try one of them.
Sultala at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 6
I am presently using Sun Java System Application Server Platform edation 2005Q4, is there any patches for this?Please give me the links.Thanks in advance.
Gudalaa at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 7

Depending on the OS and whether you use file-based or packaged based install, it could be one of the following:

119166-21,119167-21,119168-21,122848-06,119169-13,119170-13,119171-13,

119172-13.

You can find links to those those on sunsolve.sun.com or by simply typing patchid in google.

Sultala at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 8

Hi,

Thanks for the response, I have gone through the patches, but they are for Sun Java System Application Server Platform edation 2005Q1, where as the one iam using is Sun Java System Application Server Platform edation 2005Q4.

Still do u think i can resoles this problem with the above patches?

Thanks for spending ur valauable time.

Gudalaa at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 9

PE patches are: 119173-13,119174-13,119175-13,119176-13.

Speaking of whether or not the patch will resolve the issue I would say your chances are 50/50.

By the way, if you use 8.1PE, there is no stopping you from moving onto 8.2PE which you say works fine. It would have been an issue for 8.1EE since 8.2EE will be out in Feb - March timescale.

Sultala at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...
# 10

Hi Everybody, I'm new to J2EE and just wrote one simple program. The program shows up a login html file. A servlet accepts the inputs, check them and displays a message depending on the input. After deploying i used the following url:

http://localhost:8080/root/servlet/login.html

where "root" is the context root. I'm using Sun Application Server 8.0 and Windows XP.

The path for the servlet class is:

C:\Sun\AppServer\Register\register.java

The html page comes up but after that "http 404 status" is reported. Do i need to write any xml file. I'm so confused please help. I will very grateful.

sanzuktaa at 2007-7-8 > top of java,Application & Integration Servers,Application Servers...