I using MVC formwork in UI. When Jsp file link a css file. So it will be execute twice doGet mothed in servlet. When I don't link this css file. It will be Ok. Please tell me what problem? Web container is weblogic. :roll:
This sounds to me like a mapping problem in your web.xml. When the browser loads the result of your servlet execution, it sees the link to the css. The browser then makes a get request to the server to load your css. Now, if your mapping causes this get request to be routed to the servlet, this would result in the doGet method being call for your css. Make sure your mapping is such it will only get called on the appropriate get requests.
Since the CSS is grabbed by the browser just like any other resource, why not use the HTML <base> tag to establish the base url? Then the browser will look relative to that base. You should not have to do anything to web.xml. Bill
Joined: Jun 13, 2000
What I'm afraid is he has a servlet mapping like
And the link to the style sheet is:
subject: Why execute twice doGet mothed in servlet!