specifications

WebLogic Server :: The server does not support version 3.0 of the J2EE Web module specification

不羁的心 提交于 2019-12-07 13:49:15
问题 When I try running an application using the WebLogic 11g 10.3.5 server, it shows that "The server does not support version 3.0 of the J2EE Web module specification." How to overcome this? Thanks! 回答1: Develop your application using the supported version of the specification (Servlet 2.5), or use another application server supporting the version 3.0, or wait for the version of WebLogic that supports version 3.0. 回答2: Weblogic 11 does not support Servlet 3.0 You need to move on to Weblogic 12.

Why does the Java ecosystem use different character encodings throughout their software stack?

江枫思渺然 提交于 2019-12-07 04:29:25
问题 For instance class files use CESU-8 (sometimes also called MUTF-8), but internally Java first used UCS-2 and now it uses UTF-16. The specification about valid Java source files says that a minimal conforming Java compiler only has to accept ASCII characters. What's the reason for these choices? Wouldn't it make more sense to use the same encoding throughout the Java ecosystem? 回答1: ASCII for source files is because at the time it wasn't considered reasonable to expect people to have text

How can I specify https protocol in routing spec with rspec?

岁酱吖の 提交于 2019-12-07 03:04:07
问题 In my routes file I have: resources :subscription, :only => [:show], :constraints => {:protocol => "https"} I'm trying to add a spec for this route like this: it "recognizes and generates #show" do { :get => "/subscription", :protocol => 'https' }.should route_to(:controller => "subscriptions", :action => "show") end However, the spec still fails. If I remove the :protocol => 'https' , the spec also fails: ActionController::RoutingError: No route matches "/subscription" 回答1: The (undocumented

Where are ioctl parameters (such as 0x1268 / BLKSSZGET) actually specified?

安稳与你 提交于 2019-12-07 02:47:08
问题 This question was migrated from Unix & Linux Stack Exchange because it can be answered on Stack Overflow. Migrated 6 years ago . I am looking for a definitive specification describing the expected arguments and behavior of ioctl 0x1268 (BLKSSZGET). This number is declared in many places (none of which contain a definitive reference source), such as linux/fs.h , but I can find no specification for it. Surely, somebody at some point in the past decided that 0x1268 would get the physical sector

Rationale behind OverflowException thrown with negative array size?

徘徊边缘 提交于 2019-12-07 02:13:20
问题 After writing code that can be boiled down to the following: var size=-1; var arr=new byte[size]; I was surprised that it threw an OverflowException. The docs for OverflowException state: The exception that is thrown when an arithmetic, casting, or conversion operation in a checked context results in an overflow. I couldn't see how providing a negative size for and array length fits into the description given for this exception, so delved a little deeper and found that this is indeed the

Interpretation of “background colour index” in GIF specification

老子叫甜甜 提交于 2019-12-07 00:37:32
If you look in the GIF specification and search for "Background Color Index", you see the following description: vii) Background Color Index - Index into the Global Color Table for the Background Color. The Background Color is the color used for those pixels on the screen that are not covered by an image. If the Global Color Table Flag is set to (zero), this field should be zero and should be ignored. There is an ambiguity here, which is that if the "Global Color Table Flag" is set to zero and this field is ignored, then it is undefined what background colour of a GIF actually should be if the

In proper HTML, must an <input> be in a <form>?

江枫思渺然 提交于 2019-12-06 17:30:50
问题 I need a few input elements, but their values won't be submitted anywhere - they're just going to be manipulated by some client-side JavaScript. Do I have to place them in a <form> to have legit HTML, or can they just be free-standing? 回答1: For additional information, in xhtml strict you have to place in one of these elements: "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" 回答2: No. You only need a form if you're submitting to a server. 来源: https:/

org.specs2.mock.Mockito matchers are not working as expected

我是研究僧i 提交于 2019-12-06 16:02:10
Here is the code I am trying to run: import org.specs2.mock.Mockito import org.specs2.mutable.Specification import org.specs2.specification.Scope import akka.event.LoggingAdapter class MySpec extends Specification with Mockito { "Something" should { "do something" in new Scope { val logger = mock[LoggingAdapter] val myVar = new MyClassTakingLogger(logger) myVar.doSth() there was no(logger).error(any[Exception], "my err msg") } } } When running this, I get the following error: [error] org.mockito.exceptions.misusing.InvalidUseOfMatchersException: [error] Invalid use of argument matchers! [error

Scala Spec2 Mockito: Argument matchers with complex types

余生长醉 提交于 2019-12-06 15:14:21
I'm trying to write a mock for a web service with Mockito. The mock should simulate a POST request using the play WS library. /** * Mock for the Web Service */ case class WSMock() extends Mockito { val wsRequestHolder: play.api.libs.ws.WS.WSRequestHolder = mock[play.api.libs.ws.WS.WSRequestHolder] val wsResponse: play.api.libs.ws.Response = mock[play.api.libs.ws.Response] wsResponse.status returns 200 wsResponse.body returns "BODY RESP FROM WS" val futureResponse = scala.concurrent.Future { wsResponse } wsRequestHolder.post(any[Map[String,Seq[String]]]) returns futureResponse } When running

Rails generators not generating the proper test templates

耗尽温柔 提交于 2019-12-06 12:13:48
My project lives here: https://github.com/jonesdeini/ICanHazSandvich I'm getting setup using minitest-rails add I can't get the generators to generate the correct test templates. from my application.rb: config.generators do |g| g.test_framework :mini_test, :spec => true, :fixture => false end even with "g.test_framework nil" I still get the same test templates generated: Output: rails g model Foo invoke active_record create db/migrate/20120827160129_create_foos.rb create app/models/foo.rb invoke test_unit create test/unit/foo_test.rb invoke factory_girl create test/factories/foos.rb Even with