on 01-25-2005 2:56 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.