cancel
Showing results for 
Search instead for 
Did you mean: 

Error in reverse proxy

Former Member
0 Kudos

Hi,

I'm following the pdf to create a reverse proxy using Netweaver Studio. However, I receive errors in the java code.

******************************************************

"Implicit super constructor HttpServletRequestWrapper is undefined for default constructor. Must define an explicit constructor.

Implicit super constructor HttpServletResponseWrapper is undefined for default constructor. Must define an explicit constructor.

The constructor RequestWrapper(HttpServletRequest) is undefined.

The constructor ResponseWrapper(HttpServletRequest, HttpServletResponse) is undefined.

**********************************************************

Any ideas?

Regards,

Jin Bae

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You should define the default constructor.

In the Developer Studio, for the java source file in error,

Right Click mouse.

Click Source.

Click Add Constructors from Super Class.

You will now see the constructors added.

Remove the // TODO Auto-generated constructor stub line.

Example:-

public Z_JTEST2Bean() {

super();

}

Now save the file.

This should fix the problem.

Hope this helps.

Ads.

Former Member
0 Kudos

Ads,

Thanks for you help. However, this line of code:

*********************************************************

ServletResponse sResponse = new ResponseWrapper((HttpServletRequest)sr, (HttpServletResponse)response);

**********************************************************

still responds with this error:

"The constructor Responsewrapper(HttpServletRequest, HttpServletResponse) is undefined."

Is this result of having wrong parameter in the ResponseWrapper constructor class?

Thanks for the help,

Jin

Former Member
0 Kudos

Hi,

The ResponseWrapper inherits from HttpServletResponseWrapper

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponseWrapper.html

which has one constructor, namely

HttpServletResponseWrapper(HttpServletResponse response)

So the correct code should be


ServletResponse sResponse = new ResponseWrapper((HttpServletResponse)response);

Cheers

Dagfinn